pub struct SMTModule {
pub variables: IndexSet<ModuleSymbol>,
pub asserts: Vec<Assert>,
}
Expand description
This is a helper module, to use SMT (and in that sense Z3) for every UVL Module A smt-lib module equivalent to some UVL source module.
Fields§
§variables: IndexSet<ModuleSymbol>
§asserts: Vec<Assert>
Implementations§
source§impl SMTModule
impl SMTModule
pub fn parse_model<'a>( &'a self, model: &'a str, ) -> impl Iterator<Item = (ModuleSymbol, ConfigValue)> + 'a
sourcepub fn parse_values<'a>(
&'a self,
values: &'a str,
module: &'a Module,
) -> impl Iterator<Item = (ModuleSymbol, ConfigValue)> + 'a
pub fn parse_values<'a>( &'a self, values: &'a str, module: &'a Module, ) -> impl Iterator<Item = (ModuleSymbol, ConfigValue)> + 'a
extract values from a response string
pub fn parse_unsat_core<'a>( &'a self, core: &'a str, ) -> impl Iterator<Item = AssertInfo> + 'a
sourcepub fn config_to_source(&self) -> String
pub fn config_to_source(&self) -> String
create source to config z3 Solver
sourcepub fn variable_to_source(&self, module: &Module) -> String
pub fn variable_to_source(&self, module: &Module) -> String
create with all Variable the source for the SMTSolver
sourcepub fn assert_to_source(
&self,
i: usize,
info: &Option<AssertInfo>,
expr: &Expr,
not: bool,
) -> String
pub fn assert_to_source( &self, i: usize, info: &Option<AssertInfo>, expr: &Expr, not: bool, ) -> String
create the source for an assert, if the assert should be negated the variable neg must be true
pub fn var(&self, ms: ModuleSymbol) -> usize
pub fn pseudo_bool(&self, ms: ModuleSymbol, module: &Module) -> String
Auto Trait Implementations§
impl Freeze for SMTModule
impl RefUnwindSafe for SMTModule
impl Send for SMTModule
impl Sync for SMTModule
impl Unpin for SMTModule
impl UnwindSafe for SMTModule
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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