Client

Struct Client 

Source
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>
where L: Display, C: Display + Constant,

Source

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>>

Source

pub fn new_id(&mut self) -> Ident

Source

pub fn new_sort_id(&mut self) -> Ident

Source

pub fn assert( &mut self, term: &Typed<Term<Self>>, ) -> ExecResult<(), Error<L, C, S, F>>

Assert.

Source

pub fn check_sat(&mut self) -> ExecResult<CheckSat, Error<L, C, S, F>>

Check satifiability.

Source

pub fn declare_const( &mut self, cst: F, sort: &GroundSort<S>, ) -> ExecResult<(), Error<L, C, S, F>>

Declare a new constant.

Source

pub fn declare_sort(&mut self, sort: S) -> ExecResult<(), Error<L, C, S, F>>

Declare new sort.

Source

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.

Source

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.

Source

pub fn define_sort( &mut self, _def: &DataTypeDeclaration<Self>, ) -> ExecResult<(), Error<L, C, S, F>>

Define previously declared sort.

Source

pub fn exit(&mut self) -> ExecResult<(), Error<L, C, S, F>>

Exit the solver.

Source

pub fn get_model(&mut self) -> ExecResult<Model<Self>, Error<L, C, S, F>>

Source

pub fn set_logic(&mut self, logic: &L) -> ExecResult<(), Error<L, C, S, F>>

Set the solver’s logic.

Trait Implementations§

Source§

impl<L, C: Clone + PartialEq, S: Sort, F: Function> Environment for Client<L, C, S, F>

Source§

fn sort(&self, id: &Ident) -> Option<S>

Find a sort.

Source§

fn sort_bool(&self) -> GroundSort<S>

Get the Bool sort, which is the only required sort.

Source§

type Logic = L

Source§

type Ident = Ident

Source§

type Constant = Sorted<C, GroundSort<S>>

Source§

type Sort = S

Source§

type Function = F

Source§

type Error = Error<L, C, S, F>

Source§

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>
where S: Unpin, L: Unpin, C: Unpin, F: Unpin,

§

impl<L, C, S, F> !UnwindSafe for Client<L, C, S, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.