pub struct Z3Model { /* private fields */ }Expand description
Analogue of z3::Model.
Produced by Z3Solver::get_model after a Sat result.
Implementations§
Source§impl Z3Model
impl Z3Model
Sourcepub fn get_func_interp(&self, f: &FuncDecl) -> Option<Z3FuncInterp>
pub fn get_func_interp(&self, f: &FuncDecl) -> Option<Z3FuncInterp>
Return the full interpretation of an uninterpreted function f in this
model, or None if f was not declared or is not present in the model.
The returned Z3FuncInterp contains the finite set of (args → value)
entries that the solver determined, plus an else_value for all other
inputs.
§Stub note
When the EUF e-graph does not contain any application of f (e.g. the
function was declared but never constrained), num_entries() will be 0
and else_value() will be the default value for the return sort. This
is a valid (conservative) interpretation: the solver is free to choose
any value for unconstrained applications.
Source§impl Z3Model
impl Z3Model
Sourcepub fn eval_const(&self, name: &str) -> Option<&str>
pub fn eval_const(&self, name: &str) -> Option<&str>
Evaluate a constant (identified by name) in the model.
Returns Some(value_string) if the constant was found, None otherwise.
Sourcepub fn entries(&self) -> &[(String, String, String)]
pub fn entries(&self) -> &[(String, String, String)]
Return all model entries as (name, sort, value) slices.
Sourcepub fn func_interp_raw(
&self,
func_name: &str,
) -> Option<&(Vec<(Vec<String>, String)>, String, usize)>
pub fn func_interp_raw( &self, func_name: &str, ) -> Option<&(Vec<(Vec<String>, String)>, String, usize)>
Return the raw function interpretation data for the function named
func_name, if it was declared and the model is available.
This is a low-level accessor; prefer Z3Model::get_func_interp
(defined in ext2) for the typed wrapper.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Z3Model
impl RefUnwindSafe for Z3Model
impl Send for Z3Model
impl Sync for Z3Model
impl Unpin for Z3Model
impl UnsafeUnpin for Z3Model
impl UnwindSafe for Z3Model
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more