[][src]Struct gf::smt::Expr

pub struct Expr { /* fields omitted */ }

SMT expression.

Expressions are reference-counted: the Clone implementation increments the counter, and the Drop implementation decrements it, freeing the expression when it is no longer used.

Methods

impl Expr[src]

pub fn new_bit_vec(bv: BitVec) -> Self[src]

Construct a bit vector constant.

pub fn new_bit_vec_operator<I>(
    operator: BitVecOperator,
    operands: I
) -> Result<Self, ExprError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a bit vector operator application.

pub fn new_fn<I>(args: I, body: Expr) -> Result<Self, ExprError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a function.

pub fn new_fn_app<I>(func: Expr, args: I) -> Result<Self, ExprError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a function application.

pub fn new_fn_arg(sort: Sort, id: String) -> Self[src]

Construct a function argument of given sort.

pub fn new_var(sort: Sort, id: String) -> Self[src]

Construct a free variable of given sort.

pub fn from_value(value: ExprValue) -> Self[src]

Wrap a value.

pub fn kind(&self) -> &ExprKind[src]

Return the expression kind.

pub fn sort(&self) -> &Sort[src]

Return the expression sort.

pub fn is_bit_vec(&self) -> bool[src]

Return whether the expression is a bit vector constant.

pub fn is_bit_vec_operator(&self) -> bool[src]

Return whether the expression is a bit vector operator application.

pub fn is_fn(&self) -> bool[src]

Return whether the expression is a function.

pub fn is_fn_app(&self) -> bool[src]

Return whether the expression is a function application.

pub fn is_fn_arg(&self) -> bool[src]

Return whether the expression is a function argument.

pub fn is_var(&self) -> bool[src]

Return whether the expression is a free variable.

pub fn bit_vec_operator_operands(&self) -> &[Expr][src]

Return bit vector operator application operands.

Errors

  • Panics if the expression is not a bit vector operator application.

pub fn fn_args(&self) -> &[Expr][src]

Return function formal arguments.

Errors

  • Panics if the expression is not a function.

pub fn fn_body(&self) -> &Expr[src]

Return function body.

Errors

  • Panics if the expression is not a function.

pub fn fn_arg_id(&self) -> &str[src]

Return identifier of a function argument.

Errors

  • Panics if the expression is not a function argument.

pub fn fn_app_args(&self) -> &[Expr][src]

Return function application actual arguments.

Errors

  • Panics if the expression is not a function application.

pub fn fn_app_fn(&self) -> &Expr[src]

Return function application function.

Errors

  • Panics if the expression is not a function application.

Trait Implementations

impl Clone for Expr[src]

impl Eq for Expr[src]

impl PartialEq<Expr> for Expr[src]

impl Debug for Expr[src]

impl Hash for Expr[src]

impl StructuralPartialEq for Expr[src]

impl StructuralEq for Expr[src]

Auto Trait Implementations

impl Send for Expr

impl Sync for Expr

impl Unpin for Expr

impl UnwindSafe for Expr

impl RefUnwindSafe for Expr

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]