Maat C++ Documentation
Public Member Functions | Protected Member Functions | Friends | List of all members
maat::ExprMem Class Reference

Inherits maat::ExprObject.

Public Member Functions

 ExprMem (size_t size, Expr addr, unsigned int access_count=0, Expr base=nullptr)
 
 ExprMem (size_t size, Expr addr, unsigned int access_count, Expr base, ValueSet &vs)
 
virtual hash_t hash ()
 Return the expression hash. Every expression has a unique hash.
 
virtual void print (std::ostream &out)
 
virtual bool is_tainted (ucst_t taint_mask=maat::default_expr_taint_mask)
 Return true if at least one bit set in 'taint_mask' is tainted in the epression.
 
virtual ExprStatus status (const VarContext &ctx)
 Return the expression symbolic status.
 
unsigned int access_count ()
 
virtual ValueSetvalue_set ()
 Return the value set of the expression, which is the set of possible numerical values it can take expressed as a strided interval.
 
Expr base_expr ()
 
- Public Member Functions inherited from maat::ExprObject
 ExprObject (ExprType type, size_t size, bool _is_simp=false, Taint _t=Taint::NOT_COMPUTED, ucst_t _taint_mask=maat::default_expr_taint_mask)
 Constructor.
 
virtual void get_associative_args (Op op, std::vector< Expr > &vec)
 
virtual void get_left_associative_args (Op op, std::vector< Expr > &vec, Expr &leftmost)
 
bool contains_vars (std::set< std::string > &var_names)
 Return true if the expression contains at least one of the given symbolic variable names.
 
void get_vars (std::set< std::string > &var_names)
 Fill 'var_names' with the names of symbolic variables contained in the expression.
 
bool is_type (ExprType t, Op op=Op::NONE)
 Return true if the expression is of type 't'. If type is UNOP or BINOP, also check if the operation is the one specified in 'op'.
 
void make_tainted (ucst_t taint_mask=maat::default_expr_taint_mask)
 Make the bits specified by 'taint_mask' tainted in the expression.
 
ucst_t taint_mask ()
 Return the bit mask of tainted bits in the expression.
 
ucst_t as_uint ()
 Return the concrete value of the expression as an unsigned value. If the expression is concolic, or is on more than 64 bits, this function will throw an 'expression_exception'.
 
ucst_t as_uint (const VarContext &ctx)
 Return the concrete value of the expression evaluated in the context 'ctx' as an unsigned value. If the expression is on more than 64 bits this function will throw an 'expression_exception'.
 
cst_t as_int ()
 Return the concrete value of the expression as an signed value. If the expression is concolic, or is on more than 64 bits, this function will throw an 'expression_exception'.
 
cst_t as_int (const VarContext &ctx)
 Return the concrete value of the expression evaluated in the context 'ctx' as a signed value. If the expression is on more than 64 bits this function will throw an 'expression_exception'.
 
const maat::Numberas_number ()
 Return the concrete value of the expression as a maat::Number instance.
 
const maat::Numberas_number (const VarContext &ctx)
 Return the concrete value of the expression as a *maat::Number instance. If the expression is concolic this function will throw an 'expression_exception'.
 
fcst_t as_float ()
 Return the concrete value of the expression as a floating point value. If the expression is concolic, this function will throw an 'expression_exception'.
 
fcst_t as_float (const VarContext &ctx)
 Return the concrete value of the expression evaluated in the context 'ctx' as a floating point value.
 
virtual bool is_symbolic (const VarContext &ctx)
 Return true if expression is symbolic.
 
bool is_concrete (const VarContext &ctx)
 Return true if expression is concrete.
 
virtual bool is_concolic (const VarContext &ctx)
 Return true if expression is concolic.
 
bool already_simplified_by (int simplifier_id)
 
bool eq (Expr other)
 Checks equality between two expressions. The method returns true if the expressions are syntactically equivalent, but doesn't test semantic equivalence.
 
bool neq (Expr other)
 Opposite of the eq() method.
 
bool inf (Expr other)
 
virtual cst_t cst ()
 
virtual const std::string & name ()
 
virtual Op op ()
 
virtual cst_t mode ()
 
virtual Expr cond_left ()
 
virtual Expr cond_right ()
 
virtual Expr if_true ()
 
virtual Expr if_false ()
 
virtual ITECond cond_op ()
 

Protected Member Functions

virtual const Numberconcretize (const VarContext *ctx=nullptr)
 Return the concrete value of the expression evaluated in the context 'ctx'.
 

Friends

class SymbolicMemEngine
 

Additional Inherited Members

- Public Attributes inherited from maat::ExprObject
const ExprType type
 Expression type.
 
const size_t size
 Expression size in bits.
 
std::vector< Exprargs
 Expression arguments (sub-expressions)
 
- Protected Attributes inherited from maat::ExprObject
ValueSet _value_set
 
bool _value_set_computed
 
bool _hashed
 
hash_t _hash
 
Expr _simplified_expr
 Pointer to the simplified version of this expression if it has already been simplified.
 
bool _is_simplified
 True if this expression is the result of a simplification.
 
int _simplifier_id
 ID of the simplifier that has simplified the expression.
 
Taint _taint
 
int _taint_ctx_id
 The ID of the VarContext that was used to compute the taint.
 
ucst_t _taint_mask
 The bits that are tainted in the expression (if _taint == TAINTED)
 
maat::Number _concrete
 The concrete value of the expression.
 
int _concrete_ctx_id = -1
 The ID of the VarContext that was used to concretize the expression.
 
ExprStatus _status
 
int _status_ctx_id
 The ID of the VarContext that was used to compute the epression status.
 

The documentation for this class was generated from the following file: