ROSE  0.9.9.139
Classes | Typedefs | Enumerations | Functions | Variables
Rose::BinaryAnalysis::SymbolicExpr Namespace Reference

Description

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.

Classes

struct  AddSimplifier
 
struct  AndSimplifier
 
struct  AsrSimplifier
 
struct  ConcatSimplifier
 
struct  EqSimplifier
 
class  Exception
 Exceptions for symbolic expressions. More...
 
class  ExpressionLessp
 Compare two expressions for STL containers. More...
 
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  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
 
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

typedef Sawyer::SharedPointer< NodePtr
 Shared-ownership pointer to an expression Node. More...
 
typedef Sawyer::SharedPointer< InteriorInteriorPtr
 Shared-ownership pointer to an expression Interior node. More...
 
typedef Sawyer::SharedPointer< LeafLeafPtr
 Shared-ownership pointer to an expression Leaf node. More...
 
typedef std::vector< PtrNodes
 
typedef Map< uint64_t, uint64_t > RenameMap
 
typedef uint64_t Hash
 Hash of symbolic expression. More...
 
typedef Sawyer::Container::Set< Ptr, ExpressionLesspExpressionSet
 Set of expressions. More...
 

Enumerations

enum  Operator {
  OP_ADD,
  OP_AND,
  OP_ASR,
  OP_BV_AND,
  OP_BV_OR,
  OP_BV_XOR,
  OP_CONCAT,
  OP_EQ,
  OP_EXTRACT,
  OP_INVERT,
  OP_ITE,
  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_ZEROP
}
 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, Node &)
 
std::ostream & operator<< (std::ostream &o, const Node::WithFormatter &)
 
Ptr setToIte (const Ptr &, const LeafPtr &var=LeafPtr())
 Convert a set to an ite expression. More...
 
template<typename InputIterator >
uint64_t nNodes (InputIterator begin, InputIterator end)
 Counts the number of nodes. More...
 
template<typename InputIterator >
uint64_t nnodes (InputIterator begin, InputIterator end) ROSE_DEPRECATED("use nNodes instead")
 
template<typename InputIterator >
uint64_t nNodesUnique (InputIterator begin, InputIterator end)
 Counts the number of unique nodes. More...
 
template<typename InputIterator >
uint64_t nnodesUnique (InputIterator begin, InputIterator end) ROSE_DEPRECATED("use nNodesUnique instead")
 
Ptr makeVariable (size_t nbits, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeExistingVariable (size_t nbits, uint64_t id, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeInteger (size_t nbits, uint64_t n, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeConstant (const Sawyer::Container::BitVector &, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeBoolean (bool, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeMemory (size_t addressWidth, size_t valueWidth, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeExistingMemory (size_t addressWidth, size_t valueWidth, uint64_t id, const std::string &comment="", unsigned flags=0)
 Leaf constructor. More...
 
Ptr makeAdd (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeBooleanAnd (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeAsr (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeAnd (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeOr (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeXor (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeConcat (const Ptr &hi, const Ptr &lo, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeEq (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeExtract (const Ptr &begin, const Ptr &end, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeInvert (const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeIte (const Ptr &cond, const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeLssb (const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeMssb (const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeNe (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeNegate (const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeBooleanOr (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeRead (const Ptr &mem, const Ptr &addr, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeRol (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeRor (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSet (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSet (const Ptr &a, const Ptr &b, const Ptr &c, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedDiv (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignExtend (const Ptr &newSize, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedGe (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedGt (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeShl0 (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeShl1 (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeShr0 (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeShr1 (const Ptr &sa, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedLe (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedLt (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedMod (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeSignedMul (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeDiv (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeExtend (const Ptr &newSize, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeGe (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeGt (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeLe (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeLt (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeMod (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeMul (const Ptr &a, const Ptr &b, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeWrite (const Ptr &mem, const Ptr &addr, const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
Ptr makeZerop (const Ptr &a, const std::string &comment="", unsigned flags=0)
 Interior node constructor. More...
 
std::vector< PtrfindCommonSubexpressions (const std::vector< Ptr > &)
 Find common subexpressions. More...
 
template<typename InputIterator >
std::vector< PtrfindCommonSubexpressions (InputIterator begin, InputIterator end)
 Find common subexpressions. More...
 

Variables

const uint64_t MAX_NNODES
 Maximum number of nodes that can be reported. More...
 

Typedef Documentation

Shared-ownership pointer to an expression Node.

See Shared ownership.

Definition at line 103 of file BinarySymbolicExpr.h.

Shared-ownership pointer to an expression Interior node.

See Shared ownership.

Definition at line 109 of file BinarySymbolicExpr.h.

Shared-ownership pointer to an expression Leaf node.

See Shared ownership.

Definition at line 112 of file BinarySymbolicExpr.h.

Hash of symbolic expression.

Definition at line 118 of file BinarySymbolicExpr.h.

Set of expressions.

Definition at line 577 of file BinarySymbolicExpr.h.

Enumeration Type Documentation

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

Enumerator
OP_ADD 

Addition.

One or more operands, all the same width.

OP_AND 

Boolean AND.

Operands are all Boolean (1-bit) values. See also OP_BV_AND.

OP_ASR 

Arithmetic shift right.

Operand B shifted by A bits; 0 <= A < width(B). A is unsigned.

OP_BV_AND 

Bitwise AND.

One or more operands, all the same width.

OP_BV_OR 

Bitwise OR.

One or more operands, all the same width.

OP_BV_XOR 

Bitwise exclusive OR.

One or more operands, all the same width.

OP_CONCAT 

Concatenation.

Operand A becomes high-order bits. Any number of operands.

OP_EQ 

Equality.

Two operands, both the same width.

OP_EXTRACT 

Extract subsequence of bits.

Extract bits [A..B) of C. 0 <= A < B <= width(C).

OP_INVERT 

Boolean inversion.

One operand.

OP_ITE 

If-then-else.

A must be one bit. Returns B if A is set, C otherwise.

OP_LSSB 

Least significant set bit or zero.

One operand.

OP_MSSB 

Most significant set bit or zero.

One operand.

OP_NE 

Inequality.

Two operands, both the same width.

OP_NEGATE 

Arithmetic negation.

One operand.

OP_NOOP 

No operation.

Used only by the default constructor.

OP_OR 

Boolean OR.

Operands are all Boolean (1-bit) values. See also OP_BV_OR.

OP_READ 

Read a value from memory.

Arguments are the memory state and the address expression.

OP_ROL 

Rotate left.

Rotate bits of B left by A bits. 0 <= A < width(B). A is unsigned.

OP_ROR 

Rotate right.

Rotate bits of B right by A bits. 0 <= B < width(B). A is unsigned.

OP_SDIV 

Signed division.

Two operands, A/B. Result width is width(A).

OP_SET 

Set of expressions.

Any number of operands in any order.

OP_SEXTEND 

Signed extension at msb.

Extend B to A bits by replicating B's most significant bit.

OP_SGE 

Signed greater-than-or-equal.

Two operands of equal width. Result is Boolean.

OP_SGT 

Signed greater-than.

Two operands of equal width. Result is Boolean.

OP_SHL0 

Shift left, introducing zeros at lsb.

Bits of B are shifted by A, where 0 <=A < width(B).

OP_SHL1 

Shift left, introducing ones at lsb.

Bits of B are shifted by A, where 0 <=A < width(B).

OP_SHR0 

Shift right, introducing zeros at msb.

Bits of B are shifted by A, where 0 <=A <width(B).

OP_SHR1 

Shift right, introducing ones at msb.

Bits of B are shifted by A, where 0 <=A <width(B).

OP_SLE 

Signed less-than-or-equal.

Two operands of equal width. Result is Boolean.

OP_SLT 

Signed less-than.

Two operands of equal width. Result is Boolean.

OP_SMOD 

Signed modulus.

Two operands, AB. Result width is width(B).

OP_SMUL 

Signed multiplication.

Two operands A*B. Result width is width(A)+width(B).

OP_UDIV 

Signed division.

Two operands, A/B. Result width is width(A).

OP_UEXTEND 

Unsigned extention at msb.

Extend B to A bits by introducing zeros at the msb of B.

OP_UGE 

Unsigned greater-than-or-equal.

Two operands of equal width. Boolean result.

OP_UGT 

Unsigned greater-than.

Two operands of equal width. Result is Boolean.

OP_ULE 

Unsigned less-than-or-equal.

Two operands of equal width. Result is Boolean.

OP_ULT 

Unsigned less-than.

Two operands of equal width. Result is Boolean (1-bit vector).

OP_UMOD 

Unsigned modulus.

Two operands, AB. Result width is width(B).

OP_UMUL 

Unsigned multiplication.

Two operands, A*B. Result width is width(A)+width(B).

OP_WRITE 

Write (update) memory with a new value.

Arguments are memory, address and value.

OP_ZEROP 

Equal to zero.

One operand. Result is a single bit, set iff A is equal to zero.

Definition at line 53 of file BinarySymbolicExpr.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 142 of file BinarySymbolicExpr.h.

Function Documentation

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeVariable ( size_t  nbits,
const std::string &  comment = "",
unsigned  flags = 0 
)
Ptr Rose::BinaryAnalysis::SymbolicExpr::makeExistingVariable ( size_t  nbits,
uint64_t  id,
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.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeInteger ( size_t  nbits,
uint64_t  n,
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::InstructionSemantics2::SymbolicSemantics::SValue::instance_integer().

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeConstant ( const Sawyer::Container::BitVector ,
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.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeBoolean ( bool  ,
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.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeMemory ( size_t  addressWidth,
size_t  valueWidth,
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.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeExistingMemory ( size_t  addressWidth,
size_t  valueWidth,
uint64_t  id,
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.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeAdd ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeBooleanAnd ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeAsr ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeAnd ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeOr ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeXor ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeConcat ( const Ptr hi,
const Ptr lo,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeEq ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeExtract ( const Ptr begin,
const Ptr end,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeInvert ( const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeIte ( const Ptr cond,
const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeLssb ( const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeMssb ( const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeNe ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeNegate ( const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeBooleanOr ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeRead ( const Ptr mem,
const Ptr addr,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeRol ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeRor ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSet ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSet ( const Ptr a,
const Ptr b,
const Ptr c,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedDiv ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignExtend ( const Ptr newSize,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedGe ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedGt ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeShl0 ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeShl1 ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeShr0 ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeShr1 ( const Ptr sa,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedLe ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedLt ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedMod ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeSignedMul ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeDiv ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeExtend ( const Ptr newSize,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeGe ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeGt ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeLe ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeLt ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeMod ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeMul ( const Ptr a,
const Ptr b,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeWrite ( const Ptr mem,
const Ptr addr,
const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::makeZerop ( const Ptr a,
const std::string &  comment = "",
unsigned  flags = 0 
)

Interior node constructor.

Constructs an interior node. This is a wrapper around one of the "create" factory methods in Interior. It interprets its operands as unsigned values unless the method has "Signed" in its name.

Ptr Rose::BinaryAnalysis::SymbolicExpr::setToIte ( const Ptr ,
const LeafPtr var = LeafPtr() 
)

Convert a set to an ite expression.

template<typename InputIterator >
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 1162 of file BinarySymbolicExpr.h.

References MAX_NNODES.

template<typename InputIterator >
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 1191 of file BinarySymbolicExpr.h.

References CONTINUE, TERMINATE, and TRUNCATE.

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.

template<typename InputIterator >
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 1241 of file BinarySymbolicExpr.h.

References CONTINUE, and TRUNCATE.

Variable Documentation

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().