pub struct SmtSolver {
_proc: Child,
stdin: BufWriter<ChildStdin>,
stdout: Lines<BufReader<ChildStdout>>,
cancel: CancellationToken,
}Expand description
Z3 process interface(over stdio)
A wrapper providing functions to interact with Z3.
Fields§
§_proc: Child§stdin: BufWriter<ChildStdin>§stdout: Lines<BufReader<ChildStdout>>§cancel: CancellationTokenImplementations§
source§impl SmtSolver
impl SmtSolver
pub async fn new( model: String, cancel: &CancellationToken, ) -> Result<Self, Box<dyn Error + Send + Sync>>
sourcepub async fn read_block(
&mut self,
) -> Result<String, Box<dyn Error + Send + Sync>>
pub async fn read_block( &mut self, ) -> Result<String, Box<dyn Error + Send + Sync>>
returns the output of Z3
sourcepub async fn check_sat(&mut self) -> Result<bool, Box<dyn Error + Send + Sync>>
pub async fn check_sat(&mut self) -> Result<bool, Box<dyn Error + Send + Sync>>
checks if the current configuration loaded to Z3 is still SAT Solvable
pub async fn unsat_core( &mut self, ) -> Result<String, Box<dyn Error + Send + Sync>>
sourcepub async fn push(
&mut self,
cmd: String,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn push( &mut self, cmd: String, ) -> Result<(), Box<dyn Error + Send + Sync>>
Pushes new content to the Z3 Solver
Auto Trait Implementations§
impl Freeze for SmtSolver
impl !RefUnwindSafe for SmtSolver
impl Send for SmtSolver
impl Sync for SmtSolver
impl Unpin for SmtSolver
impl !UnwindSafe for SmtSolver
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