Skip to main content

SmtEncoder

Struct SmtEncoder 

Source
pub(crate) struct SmtEncoder<T: Types> {
    options: SmtOptions,
    constructors: HashSet<T::Var>,
    datatypes: HashSet<T::Sort>,
}

Fields§

§options: SmtOptions§constructors: HashSet<T::Var>§datatypes: HashSet<T::Sort>

Implementations§

Source§

impl<T: Types> SmtEncoder<T>

Source

pub fn new(data_decls: &[DataDecl<T>], options: SmtOptions) -> Self

Source

pub fn write_datatype_decl( &self, out: &mut impl Write, decl: &DataDecl<T>, ) -> Result

Source

fn write_datatype_ctors( &self, out: &mut impl Write, decl: &DataDecl<T>, ) -> Result

Source

pub fn write_const_decl( &self, out: &mut impl Write, name: &str, sort: &Sort<T>, ) -> Result

Source

fn write_fun_signature( &self, out: &mut impl Write, name: &str, inputs: &[&Sort<T>], output: &Sort<T>, ) -> Result

Source

pub fn write_fun_def(&self, out: &mut impl Write, fun: &FunDef<T>) -> Result

Source

pub fn write_sort(&self, out: &mut impl Write, sort: &Sort<T>) -> Result

Source

fn write_sort_in_scope( &self, out: &mut impl Write, sort: &Sort<T>, in_datatype_params: bool, ) -> Result

Source

fn write_sort_ctor(&self, out: &mut impl Write, ctor: &SortCtor<T>) -> Result

Source

pub fn pred(&self, pred: &Pred<T>) -> Result<String, Error>

Source

pub fn write_pred(&self, out: &mut impl Write, pred: &Pred<T>) -> Result

Source

pub fn expr(&self, expr: &Expr<T>) -> Result<String, Error>

Source

fn write_weak_kvar(&self, out: &mut impl Write) -> Result

Source

pub fn write_expr(&self, out: &mut impl Write, expr: &Expr<T>) -> Result

Source

fn write_application_head( &self, out: &mut impl Write, fun: &Expr<T>, out_sort: Option<&Sort<T>>, ) -> Result

Source

fn write_unary(&self, out: &mut impl Write, op: &str, expr: &Expr<T>) -> Result

Source

fn write_binary( &self, out: &mut impl Write, op: &str, lhs: &Expr<T>, rhs: &Expr<T>, ) -> Result

Source

fn write_nary( &self, out: &mut impl Write, op: &str, exprs: &[Expr<T>], empty: &str, ) -> Result

Source

fn write_thy_func(&self, out: &mut impl Write, func: ThyFunc) -> Result

Auto Trait Implementations§

§

impl<T> DynSend for SmtEncoder<T>
where HashSet<<T as Types>::Var>: DynSend, HashSet<<T as Types>::Sort>: DynSend,

§

impl<T> DynSync for SmtEncoder<T>
where HashSet<<T as Types>::Var>: DynSync, HashSet<<T as Types>::Sort>: DynSync,

§

impl<T> Freeze for SmtEncoder<T>
where HashSet<<T as Types>::Var>: Freeze, HashSet<<T as Types>::Sort>: Freeze,

§

impl<T> RefUnwindSafe for SmtEncoder<T>

§

impl<T> Send for SmtEncoder<T>
where HashSet<<T as Types>::Var>: Send, HashSet<<T as Types>::Sort>: Send,

§

impl<T> Sync for SmtEncoder<T>
where HashSet<<T as Types>::Var>: Sync, HashSet<<T as Types>::Sort>: Sync,

§

impl<T> Unpin for SmtEncoder<T>
where HashSet<<T as Types>::Var>: Unpin, HashSet<<T as Types>::Sort>: Unpin,

§

impl<T> UnsafeUnpin for SmtEncoder<T>

§

impl<T> UnwindSafe for SmtEncoder<T>
where HashSet<<T as Types>::Var>: UnwindSafe, HashSet<<T as Types>::Sort>: UnwindSafe,

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.