[−][src]Struct gf::smt::Expr
🟢 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]
op: BitVecOp,
operands: I
) -> Result<Self, BitVecOpError> where
I: IntoIterator<Item = Expr>,
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]
op: BitVecOp,
operands: I
) -> Result<Self, BitVecOpError> where
I: IntoIterator<Item = Expr>,
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]
I: IntoIterator<Item = Expr>,
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]
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]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,