pub struct WeakestPrecondition {
pub stmt: String,
pub post: String,
}Expand description
Weakest precondition transformer.
Fields§
§stmt: String§post: StringImplementations§
Source§impl WeakestPrecondition
impl WeakestPrecondition
pub fn new(stmt: impl Into<String>, post: impl Into<String>) -> Self
Sourcepub fn compute_wp(&self) -> String
pub fn compute_wp(&self) -> String
Compute the weakest precondition WP(stmt, post). Returns a textual description of the WP.
Sourcepub fn is_valid_hoare(&self) -> bool
pub fn is_valid_hoare(&self) -> bool
Check whether {WP(stmt,post)} stmt {post} is a valid Hoare triple.
Auto Trait Implementations§
impl Freeze for WeakestPrecondition
impl RefUnwindSafe for WeakestPrecondition
impl Send for WeakestPrecondition
impl Sync for WeakestPrecondition
impl Unpin for WeakestPrecondition
impl UnsafeUnpin for WeakestPrecondition
impl UnwindSafe for WeakestPrecondition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more