Struct isla_lib::smt::Model[][src]

pub struct Model<'ctx, B> { /* fields omitted */ }

Interface for extracting information from Z3 models.

Model generation should be turned on in advance. This is currently Z3’s default, but it’s best to make sure:

let mut cfg = Config::new();
cfg.set_param_value("model", "true");
let ctx = Context::new(cfg);
let mut solver = Solver::<B64>::new(&ctx);
solver.add(DeclareConst(x, Ty::BitVec(4)));
solver.add(Assert(Bvsgt(Box::new(Var(x)), Box::new(Bits(vec![false,false,true,false])))));
assert!(solver.check_sat() == SmtResult::Sat);
let mut model = Model::new(&solver);
let var0 = model.get_var(x).unwrap().unwrap();

Implementations

impl<'ctx, B: BV> Model<'ctx, B>[src]

pub fn new(solver: &'ctx Solver<'ctx, B>) -> Self[src]

pub fn get_var(&mut self, var: Sym) -> Result<Option<Exp>, ExecError>[src]

pub fn get_exp(&mut self, exp: &Exp) -> Result<Option<Exp>, ExecError>[src]

Trait Implementations

impl<'ctx, B> Debug for Model<'ctx, B>[src]

impl<'ctx, B> Drop for Model<'ctx, B>[src]

Auto Trait Implementations

impl<'ctx, B> RefUnwindSafe for Model<'ctx, B> where
    B: RefUnwindSafe

impl<'ctx, B> !Send for Model<'ctx, B>

impl<'ctx, B> !Sync for Model<'ctx, B>

impl<'ctx, B> Unpin for Model<'ctx, B>

impl<'ctx, B> UnwindSafe for Model<'ctx, B> where
    B: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.