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

pub struct Expr { /* fields omitted */ }

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

Simplification

Expressions are automatically simplified when built, unless you explicitly opt out, which is never a good idea because non-simplified expressions are often too difficult for an SMT solver even if the actual code is small.

See the simplifier module for the list of transformations.

Implementations

impl Expr[src]

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

Construct a bit vector constant.

pub fn new_bit_vec_op<I>(
    op: BitVecOp,
    operands: I
) -> Result<Self, BitVecOpError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a bit vector operator application with simplification.

pub fn new_bit_vec_op_non_simplified<I>(
    op: BitVecOp,
    operands: I
) -> Result<Self, BitVecOpError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a bit vector operator application without simplification.

pub fn new_concat_cascade<I>(operands: I) -> Result<Self, BitVecOpError> where
    I: IntoIterator<Item = Expr>, 
[src]

Construct a concatenation cascade.

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_op(&self) -> bool[src]

Return whether the expression is a bit vector operator application.

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

Return whether the expression is a free variable.

pub fn bit_vec(&self) -> &BitVec[src]

Return bit vector value.

Errors

  • Panics if the expression is not a bit vector constant.

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

Return bit vector operator application operands.

Errors

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

pub fn var_id(&self) -> Option<&str>[src]

Return identifier of a variable.

Errors

  • Panics if the expression is not a variable.

Trait Implementations

impl Clone for Expr[src]

impl Debug for Expr[src]

impl Display for Expr[src]

impl Eq for Expr[src]

impl Hash for Expr[src]

impl PartialEq<Expr> for Expr[src]

impl StructuralEq for Expr[src]

impl StructuralPartialEq for Expr[src]

Auto Trait Implementations

impl RefUnwindSafe for Expr

impl Send for Expr

impl Sync for Expr

impl Unpin for Expr

impl UnwindSafe for Expr

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.