InsnSemanticsExpr Namespace Reference


Detailed 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

class  Visitor
class  TreeNode
 Any node of an expression tree for instruction semantics, from which the InternalNode and LeafNode classes are derived. More...
class  InternalNode
 Internal node of an expression tree for instruction semantics. More...
class  LeafNode
 Leaf node of an expression tree for instruction semantics. More...

Typedefs

typedef std::map< uint64_t,
uint64_t > 
RenameMap
typedef boost::shared_ptr<
const TreeNode
TreeNodePtr
typedef boost::shared_ptr<
const InternalNode
InternalNodePtr
typedef boost::shared_ptr<
const LeafNode
LeafNodePtr

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_ROL,
  OP_ROR,
  OP_SDIV,
  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_ZEROP
}
 Operators for internal nodes of the expression tree. More...

Functions

const char * to_str (Operator o)


Typedef Documentation

typedef std::map<uint64_t, uint64_t> InsnSemanticsExpr::RenameMap

Definition at line 63 of file InsnSemanticsExpr.h.

typedef boost::shared_ptr<const TreeNode> InsnSemanticsExpr::TreeNodePtr

Definition at line 67 of file InsnSemanticsExpr.h.

typedef boost::shared_ptr<const InternalNode> InsnSemanticsExpr::InternalNodePtr

Definition at line 70 of file InsnSemanticsExpr.h.

typedef boost::shared_ptr<const LeafNode> InsnSemanticsExpr::LeafNodePtr

Definition at line 71 of file InsnSemanticsExpr.h.


Enumeration Type Documentation

enum InsnSemanticsExpr::Operator

Operators for internal 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).

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_ROL  Rotate left.

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

OP_ROR  Rotate right.

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

OP_SDIV  Signed division.

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

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_ZEROP  Equal to zero.

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

Definition at line 17 of file InsnSemanticsExpr.h.


Function Documentation

const char* InsnSemanticsExpr::to_str ( Operator  o  ) 


Generated on Sat May 19 01:09:01 2012 for ROSE by  doxygen 1.4.7