SymbolicSemantics::ValueType< nBits > Struct Template Reference

#include <SymbolicSemantics.h>

Inheritance diagram for SymbolicSemantics::ValueType< nBits >:

Inheritance graph
[legend]
Collaboration diagram for SymbolicSemantics::ValueType< nBits >:

Collaboration graph
[legend]
List of all members.

template<size_t nBits>
struct SymbolicSemantics::ValueType< nBits >


Public Member Functions

 ValueType ()
 Construct a value that is unknown and unique.
 ValueType (const ValueType &other)
ValueTypeoperator= (const ValueType &other)
 ValueType (uint64_t n)
 Construct a ValueType with a known value.
 ValueType (TreeNode *node)
 Construct a ValueType from a TreeNode.
 ~ValueType ()
ValueTypedefined_by (SgAsmInstruction *insn, const InsnSet *set1=NULL, const InsnSet *set2=NULL, const InsnSet *set3=NULL)
 Adds instructions to the list of defining instructions.
void print (std::ostream &o, RenameMap *rmap=NULL) const
 Print the value.
bool is_known () const
 Returns true if the value is a known constant.
uint64_t known_value () const
 Returns the value of a known constant.
const std::set< SgAsmInstruction * > & get_defining_instructions () const
 Returns the set of instructions that defined this value.

Public Attributes

TreeNodeexpr
InsnSet defs
 Instructions defining this value.

Friends

std::ostream & operator<< (std::ostream &o, const ValueType &e)

Constructor & Destructor Documentation

template<size_t nBits>
SymbolicSemantics::ValueType< nBits >::ValueType (  )  [inline]

Construct a value that is unknown and unique.

template<size_t nBits>
SymbolicSemantics::ValueType< nBits >::ValueType ( const ValueType< nBits > &  other  )  [inline]

template<size_t nBits>
SymbolicSemantics::ValueType< nBits >::ValueType ( uint64_t  n  )  [inline, explicit]

Construct a ValueType with a known value.

template<size_t nBits>
SymbolicSemantics::ValueType< nBits >::ValueType ( TreeNode node  )  [inline, explicit]

Construct a ValueType from a TreeNode.

template<size_t nBits>
SymbolicSemantics::ValueType< nBits >::~ValueType (  )  [inline]


Member Function Documentation

template<size_t nBits>
ValueType& SymbolicSemantics::ValueType< nBits >::operator= ( const ValueType< nBits > &  other  )  [inline]

template<size_t nBits>
ValueType& SymbolicSemantics::ValueType< nBits >::defined_by ( SgAsmInstruction insn,
const InsnSet set1 = NULL,
const InsnSet set2 = NULL,
const InsnSet set3 = NULL 
) [inline]

Adds instructions to the list of defining instructions.

Adds the specified instruction and defining sets into this value and returns a reference to this value. Any combination of instruction and set pointers may be null.

template<size_t nBits>
void SymbolicSemantics::ValueType< nBits >::print ( std::ostream &  o,
RenameMap rmap = NULL 
) const [inline]

Print the value.

If a rename map is specified a named value will be renamed to have a shorter name. See the rename() method for details.

template<size_t nBits>
bool SymbolicSemantics::ValueType< nBits >::is_known (  )  const [inline]

Returns true if the value is a known constant.

template<size_t nBits>
uint64_t SymbolicSemantics::ValueType< nBits >::known_value (  )  const [inline]

Returns the value of a known constant.

Assumes this value is a known constant.

template<size_t nBits>
const std::set<SgAsmInstruction*>& SymbolicSemantics::ValueType< nBits >::get_defining_instructions (  )  const [inline]

Returns the set of instructions that defined this value.

The return value is a flattened lattice represented as a set. When analyzing this basic block starting with an initial default state:

  1: mov eax, 2
  2: add eax, 1
  3: mov ebx, eax;
  4: mov ebx, 3

the defining set for EAX will be instructions {1, 2} and the defining set for EBX will be {4}. Defining sets for other registers are the empty set.


Friends And Related Function Documentation

template<size_t nBits>
std::ostream& operator<< ( std::ostream &  o,
const ValueType< nBits > &  e 
) [friend]


Member Data Documentation

template<size_t nBits>
TreeNode* SymbolicSemantics::ValueType< nBits >::expr

template<size_t nBits>
InsnSet SymbolicSemantics::ValueType< nBits >::defs

Instructions defining this value.

Any instruction that saves the value to a register or memory location adds itself to the saved value.


The documentation for this struct was generated from the following file:
Generated on Sat Jan 28 08:05:13 2012 for ROSE by  doxygen 1.4.7