LatticeElement< Len > Struct Template Reference

#include <findConstants.h>

Inheritance diagram for LatticeElement< Len >:

Inheritance graph
[legend]
Collaboration diagram for LatticeElement< Len >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<size_t Len>
struct LatticeElement< Len >

A LatticeElement contains the value of a register or memory location.

The value can either be one of three types: 1. An unknown value (X). Each potential unknown value is given a unique identifying "name" (a positive integer) which distinguishes it from all other unknown values, whether they are equal or unequal.

2. A known offset from an unknown value (X+N). These are represented as the name of X plus the offset N. For instance, if register "ax" has an unknown value "X" named "v123" and we execute "add ax,0x4" then the result will be that register "ax" will have the value v123+4, or X+4.

3. A known constant, C. All known constants have a zero name and the value is stored in the "offset" field.


Public Member Functions

 LatticeElement ()
 LatticeElement (uint64_t name, SgAsmx86Instruction *definingInstruction, bool negate, uint64_t offset)
 LatticeElement (bool isTop, uint64_t name, SgAsmx86Instruction *definingInstruction, bool negate, uint64_t offset)
void merge (const LatticeElement &elt, uint64_t newName, SgAsmx86Instruction *def)

Static Public Member Functions

static LatticeElement nonconstant (uint64_t name, SgAsmx86Instruction *definingInstruction)
static LatticeElement constant (uint64_t c, SgAsmx86Instruction *definingInstruction)

Public Attributes

bool isTop
uint64_t name
SgAsmx86InstructiondefiningInstruction
bool negate
uint64_t offset

Friends

bool operator== (const LatticeElement &a, const LatticeElement &b)
bool operator< (const LatticeElement &a, const LatticeElement &b)


Constructor & Destructor Documentation

template<size_t Len>
LatticeElement< Len >::LatticeElement (  )  [inline]

template<size_t Len>
LatticeElement< Len >::LatticeElement ( uint64_t  name,
SgAsmx86Instruction definingInstruction,
bool  negate,
uint64_t  offset 
) [inline]

template<size_t Len>
LatticeElement< Len >::LatticeElement ( bool  isTop,
uint64_t  name,
SgAsmx86Instruction definingInstruction,
bool  negate,
uint64_t  offset 
) [inline]


Member Function Documentation

template<size_t Len>
static LatticeElement LatticeElement< Len >::nonconstant ( uint64_t  name,
SgAsmx86Instruction definingInstruction 
) [inline, static]

template<size_t Len>
static LatticeElement LatticeElement< Len >::constant ( uint64_t  c,
SgAsmx86Instruction definingInstruction 
) [inline, static]

template<size_t Len>
void LatticeElement< Len >::merge ( const LatticeElement< Len > &  elt,
uint64_t  newName,
SgAsmx86Instruction def 
) [inline]


Friends And Related Function Documentation

template<size_t Len>
bool operator== ( const LatticeElement< Len > &  a,
const LatticeElement< Len > &  b 
) [friend]

template<size_t Len>
bool operator< ( const LatticeElement< Len > &  a,
const LatticeElement< Len > &  b 
) [friend]


Member Data Documentation

template<size_t Len>
bool LatticeElement< Len >::isTop

template<size_t Len>
uint64_t LatticeElement< Len >::name

template<size_t Len>
SgAsmx86Instruction* LatticeElement< Len >::definingInstruction

template<size_t Len>
bool LatticeElement< Len >::negate

template<size_t Len>
uint64_t LatticeElement< Len >::offset


The documentation for this struct was generated from the following file:
Generated on Tue Jan 31 05:34:12 2012 for ROSE by  doxygen 1.4.7