pub struct Model<'s, 'ev, B> { /* private fields */ }Expand description
A model, as parsed from the SMT solver output, contains a list
of function declarations (which can have arity 0 for
constants) for each declare-const and declare-fun in the
model. A model can also be parameterised by a set of
events. The two lifetime parameters correspond to the
underlying smtlib model 's and the events 'ev.
Implementations§
Source§impl<'s, 'ev, B: BV> Model<'s, 'ev, B>
impl<'s, 'ev, B: BV> Model<'s, 'ev, B>
Sourcepub fn parse(events: &[&'ev str], model: &'s str) -> Option<Self>
pub fn parse(events: &[&'ev str], model: &'s str) -> Option<Self>
Parse a model from a string of the form (model (define-fun …) (define-fun …) …)
Sourcepub fn interpret(
&mut self,
f: &str,
args: &[SexpVal<'ev, B>],
) -> Result<SexpVal<'ev, B>, InterpretError>
pub fn interpret( &mut self, f: &str, args: &[SexpVal<'ev, B>], ) -> Result<SexpVal<'ev, B>, InterpretError>
Interprets a function in the model
Sourcepub fn interpret_rel(
&mut self,
rel: &str,
events: &[&'ev str],
) -> Result<Vec<(&'ev str, &'ev str)>, InterpretError>
pub fn interpret_rel( &mut self, rel: &str, events: &[&'ev str], ) -> Result<Vec<(&'ev str, &'ev str)>, InterpretError>
Inteprets a relation (an Event * Event -> Bool function) over a set of events. Note that all events in this set must have been used to parameterise the model in Model::parse.
Sourcepub fn interpret_bits(&mut self, val: &Val<B>) -> Result<B, InterpretError>
pub fn interpret_bits(&mut self, val: &Val<B>) -> Result<B, InterpretError>
Interpret either a bitvector symbol in the model, or just return the bitvector directory if the val is concrete
Auto Trait Implementations§
impl<'s, 'ev, B> Freeze for Model<'s, 'ev, B>
impl<'s, 'ev, B> RefUnwindSafe for Model<'s, 'ev, B>where
B: RefUnwindSafe,
impl<'s, 'ev, B> Send for Model<'s, 'ev, B>where
B: Send,
impl<'s, 'ev, B> Sync for Model<'s, 'ev, B>where
B: Sync,
impl<'s, 'ev, B> Unpin for Model<'s, 'ev, B>where
B: Unpin,
impl<'s, 'ev, B> UnsafeUnpin for Model<'s, 'ev, B>
impl<'s, 'ev, B> UnwindSafe for Model<'s, 'ev, B>where
B: UnwindSafe,
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