Struct isla_lib::smt::Model [−][src]
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
Auto Trait Implementations
impl<'ctx, B> RefUnwindSafe for Model<'ctx, B> where
B: RefUnwindSafe,
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,
B: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,