ROSE
0.11.98.0
|
Namespace supplying types and functions for symbolic expressions.
These are used by certain instruction semantics policies and satisfiability modulo theory (SMT) solvers. These expressions are tailored to bit-vector and integer difference logics, whereas the expression nodes in other parts of ROSE have different goals.
Namespaces | |
TypeStyle | |
Whether to use abbreviated or full output. | |
Classes | |
struct | AddSimplifier |
struct | AndSimplifier |
struct | AsrSimplifier |
struct | ConcatSimplifier |
struct | ConvertSimplifier |
struct | EqSimplifier |
class | Exception |
Exceptions for symbolic expressions. More... | |
class | ExpressionLessp |
Compare two expressions for STL containers. More... | |
class | ExprExprHashMap |
Mapping from expression to expression. More... | |
struct | ExprExprHashMapCompare |
struct | ExprExprHashMapHasher |
struct | ExtractSimplifier |
struct | Formatter |
Controls formatting of expression trees when printing. More... | |
class | Interior |
Interior node of an expression tree for instruction semantics. More... | |
struct | InvertSimplifier |
struct | IteSimplifier |
class | Leaf |
Leaf node of an expression tree for instruction semantics. More... | |
struct | LssbSimplifier |
struct | MssbSimplifier |
struct | NegateSimplifier |
class | Node |
Base class for symbolic expression nodes. More... | |
struct | NoopSimplifier |
struct | OrSimplifier |
struct | ReinterpretSimplifier |
struct | RolSimplifier |
struct | RorSimplifier |
struct | SdivSimplifier |
struct | SetSimplifier |
struct | SextendSimplifier |
struct | SgeSimplifier |
struct | SgtSimplifier |
struct | ShiftSimplifier |
struct | ShlSimplifier |
struct | ShrSimplifier |
class | Simplifier |
Operator-specific simplification methods. More... | |
struct | SleSimplifier |
struct | SltSimplifier |
struct | SmodSimplifier |
struct | SmulSimplifier |
class | Type |
Type of symbolic expression. More... | |
struct | UdivSimplifier |
struct | UextendSimplifier |
struct | UgeSimplifier |
struct | UgtSimplifier |
struct | UleSimplifier |
struct | UltSimplifier |
struct | UmodSimplifier |
struct | UmulSimplifier |
class | Visitor |
Base class for visiting nodes during expression traversal. More... | |
struct | XorSimplifier |
struct | ZeropSimplifier |
Typedefs | |
using | InteriorPtr = Sawyer::SharedPointer< Interior > |
Reference counting pointer. More... | |
using | LeafPtr = Sawyer::SharedPointer< Leaf > |
Reference counting pointer. More... | |
using | Ptr = Sawyer::SharedPointer< Node > |
Reference counting pointer. More... | |
typedef std::vector< Ptr > | Nodes |
typedef Map< uint64_t, uint64_t > | RenameMap |
typedef uint64_t | Hash |
Hash of symbolic expression. More... | |
typedef Sawyer::Container::Set< Ptr, ExpressionLessp > | ExpressionSet |
Set of expressions ordered by hash. More... | |
Enumerations | |
enum | Operator { OP_ADD, OP_AND, OP_ASR, OP_CONCAT, OP_EQ, OP_EXTRACT, OP_INVERT, OP_ITE, OP_LET, OP_LSSB, OP_MSSB, OP_NE, OP_NEGATE, OP_NOOP, OP_OR, OP_READ, OP_ROL, OP_ROR, OP_SDIV, OP_SET, OP_SEXTEND, OP_SGE, OP_SGT, OP_SHL0, OP_SHL1, OP_SHR0, OP_SHR1, OP_SLE, OP_SLT, OP_SMOD, OP_SMUL, OP_UDIV, OP_UEXTEND, OP_UGE, OP_UGT, OP_ULE, OP_ULT, OP_UMOD, OP_UMUL, OP_WRITE, OP_XOR, OP_ZEROP, OP_FP_ABS, OP_FP_NEGATE, OP_FP_ADD, OP_FP_MUL, OP_FP_DIV, OP_FP_MULADD, OP_FP_SQRT, OP_FP_MOD, OP_FP_ROUND, OP_FP_MIN, OP_FP_MAX, OP_FP_LE, OP_FP_LT, OP_FP_GE, OP_FP_GT, OP_FP_EQ, OP_FP_ISNORM, OP_FP_ISSUBNORM, OP_FP_ISZERO, OP_FP_ISINFINITE, OP_FP_ISNAN, OP_FP_ISNEG, OP_FP_ISPOS, OP_CONVERT, OP_REINTERPRET, OP_NONE } |
Operators for interior nodes of the expression tree. More... | |
enum | VisitAction { CONTINUE, TRUNCATE, TERMINATE } |
Return type for visitors. More... | |
Functions | |
std::string | toStr (Operator) |
std::ostream & | operator<< (std::ostream &o, const Node &) |
std::ostream & | operator<< (std::ostream &o, const Node::WithFormatter &) |
Ptr | setToIte (const Ptr &, const SmtSolverPtr &solver=SmtSolverPtr(), const LeafPtr &var=LeafPtr()) |
Convert a set to an ite expression. More... | |
Hash | hash (const std::vector< Ptr > &) |
Hash zero or more expressions. More... | |
template<typename InputIterator > | |
uint64_t | nNodes (InputIterator begin, InputIterator end) |
Counts the number of nodes. More... | |
template<typename InputIterator > | |
uint64_t | nNodesUnique (InputIterator begin, InputIterator end) |
Counts the number of unique nodes. More... | |
template<class Substitution > | |
Ptr | substitute (const Ptr &src, Substitution &subber, const SmtSolverPtr &solver=SmtSolverPtr()) |
On-the-fly substitutions. More... | |
LeafPtr | makeVariable (const Type &, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeVariable (const Type &, uint64_t id, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeConstant (const Type &, const Sawyer::Container::BitVector &, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeIntegerVariable (size_t nBits, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeIntegerVariable (size_t nBits, uint64_t id, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeIntegerConstant (size_t nBits, uint64_t value, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeIntegerConstant (const Sawyer::Container::BitVector &, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeBooleanConstant (bool, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeMemoryVariable (size_t addressWidth, size_t valueWidth, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeMemoryVariable (size_t addressWidth, size_t valueWidth, uint64_t id, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeFloatingPointVariable (size_t eb, size_t sb, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeFloatingPointVariable (size_t eb, size_t sb, uint64_t id, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeFloatingPointConstant (float, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeFloatingPointConstant (double, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
LeafPtr | makeFloatingPointNan (size_t eb, size_t sb, const std::string &comment="", unsigned flags=0) |
Leaf constructor. More... | |
Ptr | makeAdd (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeAsr (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeAnd (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeOr (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeXor (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeConcat (const Ptr &hi, const Ptr &lo, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeConvert (const Ptr &a, const Type &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeEq (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeExtract (const Ptr &begin, const Ptr &end, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeInvert (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsInfinite (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsNan (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsNeg (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsNorm (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsPos (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsSubnorm (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIte (const Ptr &cond, const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeLet (const Ptr &a, const Ptr &b, const Ptr &c, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeLssb (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMax (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMin (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMssb (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMultiplyAdd (const Ptr &a, const Ptr &b, const Ptr &c, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeNe (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeNegate (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeRead (const Ptr &mem, const Ptr &addr, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeReinterpret (const Ptr &a, const Type &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeRol (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeRor (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeRound (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSet (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSet (const Ptr &a, const Ptr &b, const Ptr &c, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedDiv (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignExtend (const Ptr &newSize, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedGe (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedGt (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeShl0 (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeShl1 (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeShr0 (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeShr1 (const Ptr &sa, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeIsSignedPos (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedLe (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedLt (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedMax (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedMin (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedMod (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSignedMul (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeSqrt (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeDiv (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeExtend (const Ptr &newSize, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeGe (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeGt (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeLe (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeLt (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMod (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeMul (const Ptr &a, const Ptr &b, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeWrite (const Ptr &mem, const Ptr &addr, const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
Ptr | makeZerop (const Ptr &a, const SmtSolverPtr &solver=SmtSolverPtr(), const std::string &comment="", unsigned flags=0) |
Interior node constructor. More... | |
std::vector< Ptr > | findCommonSubexpressions (const std::vector< Ptr > &) |
Find common subexpressions. More... | |
template<typename InputIterator > | |
std::vector< Ptr > | findCommonSubexpressions (InputIterator begin, InputIterator end) |
Find common subexpressions. More... | |
Variables | |
bool | serializeVariableIds |
Whether to serialize variable IDs. More... | |
const uint64_t | MAX_NNODES |
Maximum number of nodes that can be reported. More... | |
using Rose::BinaryAnalysis::SymbolicExpr::InteriorPtr = typedef Sawyer::SharedPointer<Interior> |
Reference counting pointer.
Definition at line 119 of file BinaryAnalysis/BasicTypes.h.
using Rose::BinaryAnalysis::SymbolicExpr::LeafPtr = typedef Sawyer::SharedPointer<Leaf> |
Reference counting pointer.
Definition at line 121 of file BinaryAnalysis/BasicTypes.h.
using Rose::BinaryAnalysis::SymbolicExpr::Ptr = typedef Sawyer::SharedPointer<Node> |
Reference counting pointer.
Definition at line 123 of file BinaryAnalysis/BasicTypes.h.
typedef uint64_t Rose::BinaryAnalysis::SymbolicExpr::Hash |
Hash of symbolic expression.
Definition at line 160 of file SymbolicExpr.h.
typedef Sawyer::Container::Set<Ptr, ExpressionLessp> Rose::BinaryAnalysis::SymbolicExpr::ExpressionSet |
Set of expressions ordered by hash.
Definition at line 925 of file SymbolicExpr.h.
Operators for interior nodes of the expression tree.
Commutative operators generally take one or more operands. Operators such as shifting, extending, and truncating have the size operand appearing before the bit vector on which to operate (this makes the output more human-readable since the size operand is often a constant).
Definition at line 80 of file SymbolicExpr.h.
Return type for visitors.
Enumerator | |
---|---|
CONTINUE |
Continue the traversal as normal. |
TRUNCATE |
For a pre-order depth-first visit, do not descend into children. |
TERMINATE |
Terminate the traversal. |
Definition at line 184 of file SymbolicExpr.h.
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeConstant | ( | const Type & | , |
const Sawyer::Container::BitVector & | , | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeIntegerVariable | ( | size_t | nBits, |
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
Leaf constructor.
Constructs an expression leaf node. This is a wrapper around one of the "create" factory methods in Leaf.
Referenced by Rose::BinaryAnalysis::InstructionSemantics::TaintSemantics::SValue::instance(), Rose::BinaryAnalysis::InstructionSemantics::SymbolicSemantics::SValue::instance(), Rose::BinaryAnalysis::InstructionSemantics::TaintSemantics::SValue::instance_bottom(), Rose::BinaryAnalysis::InstructionSemantics::SymbolicSemantics::SValue::instance_bottom(), Rose::BinaryAnalysis::InstructionSemantics::TaintSemantics::SValue::instance_undefined(), Rose::BinaryAnalysis::InstructionSemantics::SymbolicSemantics::SValue::instance_undefined(), Rose::BinaryAnalysis::InstructionSemantics::TaintSemantics::SValue::instance_unspecified(), and Rose::BinaryAnalysis::InstructionSemantics::SymbolicSemantics::SValue::instance_unspecified().
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeIntegerVariable | ( | size_t | nBits, |
uint64_t | id, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeIntegerConstant | ( | size_t | nBits, |
uint64_t | value, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
Leaf constructor.
Constructs an expression leaf node. This is a wrapper around one of the "create" factory methods in Leaf.
Referenced by Rose::BinaryAnalysis::InstructionSemantics::TaintSemantics::SValue::instance_integer(), and Rose::BinaryAnalysis::InstructionSemantics::SymbolicSemantics::SValue::instance_integer().
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeIntegerConstant | ( | const Sawyer::Container::BitVector & | , |
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeBooleanConstant | ( | bool | , |
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeMemoryVariable | ( | size_t | addressWidth, |
size_t | valueWidth, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeMemoryVariable | ( | size_t | addressWidth, |
size_t | valueWidth, | ||
uint64_t | id, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeFloatingPointVariable | ( | size_t | eb, |
size_t | sb, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeFloatingPointVariable | ( | size_t | eb, |
size_t | sb, | ||
uint64_t | id, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeFloatingPointConstant | ( | float | , |
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeFloatingPointConstant | ( | double | , |
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
LeafPtr Rose::BinaryAnalysis::SymbolicExpr::makeFloatingPointNan | ( | size_t | eb, |
size_t | sb, | ||
const std::string & | comment = "" , |
||
unsigned | flags = 0 |
||
) |
Ptr Rose::BinaryAnalysis::SymbolicExpr::setToIte | ( | const Ptr & | , |
const SmtSolverPtr & | solver = SmtSolverPtr() , |
||
const LeafPtr & | var = LeafPtr() |
||
) |
Convert a set to an ite expression.
Hash zero or more expressions.
Computes the hash for each expression, then returns a single has which is a function of the individual hashes. The order of the expressions does not affect the returned hash.
uint64_t Rose::BinaryAnalysis::SymbolicExpr::nNodes | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Counts the number of nodes.
Counts the total number of nodes in multiple expressions. The return value is a saturated sum, returning MAX_NNODES if an overflow occurs.
Definition at line 1538 of file SymbolicExpr.h.
References MAX_NNODES.
uint64_t Rose::BinaryAnalysis::SymbolicExpr::nNodesUnique | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Counts the number of unique nodes.
Counts the number of unique nodes across a number of expressions. Nodes shared between two expressions are counted only one time, whereas the Node::nnodes virtual method counts shared nodes multiple times.
Definition at line 1557 of file SymbolicExpr.h.
std::vector<Ptr> Rose::BinaryAnalysis::SymbolicExpr::findCommonSubexpressions | ( | const std::vector< Ptr > & | ) |
Find common subexpressions.
This is similar to Node::findCommonSubexpressions except the analysis is over a collection of expressions rather than a single expression.
std::vector<Ptr> Rose::BinaryAnalysis::SymbolicExpr::findCommonSubexpressions | ( | InputIterator | begin, |
InputIterator | end | ||
) |
Find common subexpressions.
This is similar to Node::findCommonSubexpressions except the analysis is over a collection of expressions rather than a single expression.
Definition at line 1598 of file SymbolicExpr.h.
Ptr Rose::BinaryAnalysis::SymbolicExpr::substitute | ( | const Ptr & | src, |
Substitution & | subber, | ||
const SmtSolverPtr & | solver = SmtSolverPtr() |
||
) |
On-the-fly substitutions.
This function uses a user-defined substitutor to generate values that are substituted into the specified expression. This operates by performing a depth-first search of the specified expression and calling the subber
at each node. The subber
is invoked with two arguments: an expression to be replaced, and an optional SMT solver for simplifications. It should return either the expression unmodified, or a new expression. The return value of the substitute
function as a whole is either the original expression (if no substitutions were performed) or a new expression.
Definition at line 1631 of file SymbolicExpr.h.
References Rose::BinaryAnalysis::SymbolicExpr::Interior::children(), Rose::BinaryAnalysis::SymbolicExpr::Node::comment(), Rose::BinaryAnalysis::SymbolicExpr::Node::flags(), Rose::BinaryAnalysis::SymbolicExpr::Interior::getOperator(), Rose::BinaryAnalysis::SymbolicExpr::Interior::instance(), Rose::BinaryAnalysis::SymbolicExpr::Node::isInteriorNodeRaw(), and Rose::BinaryAnalysis::SymbolicExpr::Interior::nChildren().
bool Rose::BinaryAnalysis::SymbolicExpr::serializeVariableIds |
Whether to serialize variable IDs.
If set, then all threads will coordinate so that variable IDs are allocated in a monotonic fashion. This should only be set when necessary in order to make test results more deterministic. The default is to clear, which means variable IDs are allocated from some number of pools in order to reduce lock contention.
Thread safety: This property is not thread safe. If reproducible results are desired, it should be set before any analysis begins.
const uint64_t Rose::BinaryAnalysis::SymbolicExpr::MAX_NNODES |
Maximum number of nodes that can be reported.
If nnodes returns this value then the size of the expressions could not be counted. This can happens when the expression contains a large number of common subexpressions.
Referenced by nNodes().