pub struct Client<L, C: Clone + PartialEq, S: Sort, F: Function> { /* private fields */ }
Expand description
SMT2-lib solver environment.
Implementations§
Source§impl<L, C, S: Sort, F: Function> Client<L, C, S, F>
impl<L, C, S: Sort, F: Function> Client<L, C, S, F>
pub fn new( cmd: Command, sort_bool: S, cst_true: F, cst_false: F, ) -> ExecResult<Client<L, C, S, F>, Error<L, C, S, F>>
pub fn new_id(&mut self) -> Ident
pub fn new_sort_id(&mut self) -> Ident
Sourcepub fn assert(
&mut self,
term: &Typed<Term<Self>>,
) -> ExecResult<(), Error<L, C, S, F>>
pub fn assert( &mut self, term: &Typed<Term<Self>>, ) -> ExecResult<(), Error<L, C, S, F>>
Assert.
Sourcepub fn check_sat(&mut self) -> ExecResult<CheckSat, Error<L, C, S, F>>
pub fn check_sat(&mut self) -> ExecResult<CheckSat, Error<L, C, S, F>>
Check satifiability.
Sourcepub fn declare_const(
&mut self,
cst: F,
sort: &GroundSort<S>,
) -> ExecResult<(), Error<L, C, S, F>>
pub fn declare_const( &mut self, cst: F, sort: &GroundSort<S>, ) -> ExecResult<(), Error<L, C, S, F>>
Declare a new constant.
Sourcepub fn declare_sort(&mut self, sort: S) -> ExecResult<(), Error<L, C, S, F>>
pub fn declare_sort(&mut self, sort: S) -> ExecResult<(), Error<L, C, S, F>>
Declare new sort.
Sourcepub fn predefined_fun<Id: ToString>(
&mut self,
id: Id,
function: F,
sig: FunctionSignature<S>,
) -> ExecResult<(), Error<L, C, S, F>>
pub fn predefined_fun<Id: ToString>( &mut self, id: Id, function: F, sig: FunctionSignature<S>, ) -> ExecResult<(), Error<L, C, S, F>>
Set the function object for the given predefined function.
Sourcepub fn declare_fun(
&mut self,
function: F,
args: &Vec<GroundSort<S>>,
return_sort: &GroundSort<S>,
) -> ExecResult<(), Error<L, C, S, F>>
pub fn declare_fun( &mut self, function: F, args: &Vec<GroundSort<S>>, return_sort: &GroundSort<S>, ) -> ExecResult<(), Error<L, C, S, F>>
Declare new function.
Sourcepub fn define_sort(
&mut self,
_def: &DataTypeDeclaration<Self>,
) -> ExecResult<(), Error<L, C, S, F>>
pub fn define_sort( &mut self, _def: &DataTypeDeclaration<Self>, ) -> ExecResult<(), Error<L, C, S, F>>
Define previously declared sort.
Sourcepub fn exit(&mut self) -> ExecResult<(), Error<L, C, S, F>>
pub fn exit(&mut self) -> ExecResult<(), Error<L, C, S, F>>
Exit the solver.
pub fn get_model(&mut self) -> ExecResult<Model<Self>, Error<L, C, S, F>>
Trait Implementations§
Source§impl<L, C: Clone + PartialEq, S: Sort, F: Function> Environment for Client<L, C, S, F>
impl<L, C: Clone + PartialEq, S: Sort, F: Function> Environment for Client<L, C, S, F>
Source§fn sort_bool(&self) -> GroundSort<S>
fn sort_bool(&self) -> GroundSort<S>
Get the Bool sort, which is the only required sort.
type Logic = L
type Ident = Ident
type Constant = Sorted<C, GroundSort<S>>
type Sort = S
type Function = F
type Error = Error<L, C, S, F>
fn typecheck_function( &self, _checker: &mut TypeChecker<S>, _f: &F, _args: &[TypeRef<S>], _return_sort: TypeRef<S>, )
Auto Trait Implementations§
impl<L, C, S, F> Freeze for Client<L, C, S, F>where
S: Freeze,
impl<L, C, S, F> !RefUnwindSafe for Client<L, C, S, F>
impl<L, C, S, F> !Send for Client<L, C, S, F>
impl<L, C, S, F> !Sync for Client<L, C, S, F>
impl<L, C, S, F> Unpin for Client<L, C, S, F>
impl<L, C, S, F> !UnwindSafe for Client<L, C, S, F>
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