pub struct Actlit { /* private fields */ }
Expand description
An activation literal is an opaque wrapper around a usize
.
Obtained by a call to Solver::get_actlit
.
Implementations
sourceimpl Actlit
impl Actlit
sourcepub fn write<W>(&self, w: &mut W) -> SmtRes<()>where
W: Write,
pub fn write<W>(&self, w: &mut W) -> SmtRes<()>where
W: Write,
Writes the actlit as an SMT-LIB 2 symbol.
sourcepub fn implies<Expr>(&self, expr: Expr) -> CondExpr<Expr>
pub fn implies<Expr>(&self, expr: Expr) -> CondExpr<Expr>
Builds an implication between an actlit and an expression.
Allows to use normal assert
function over Solver
.
let mut solver = Solver::default_z3(()).expect("failed to spawn solver");
let actlit = solver.get_actlit().expect("failed to declare actlit");
let conditional = actlit.implies("(> 0 1)");
solver.assert(&conditional).expect("failed to assert conditional expr");
let is_sat = solver.check_sat_assuming(Some(&actlit)).expect("failed to perform check-sat");
assert!(!is_sat);
Methods from Deref<Target = usize>
Trait Implementations
sourceimpl Expr2Smt<()> for Actlit
impl Expr2Smt<()> for Actlit
Auto Trait Implementations
impl RefUnwindSafe for Actlit
impl Send for Actlit
impl Sync for Actlit
impl Unpin for Actlit
impl UnwindSafe for Actlit
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more