Predator  [unstable] git snapshot
Data Structures | Typedefs | Enumerations | Functions | Variables
AdtOp Namespace Reference

Data Structures

struct  OpFootprint
 operation footprint given by an input/output template pair More...
class  OpTemplate
 an operation (push_back, erase, ...) template we can match by footprints More...
class  OpCollection
 collection of operation templates More...
struct  FootprintMatch
struct  MetaOperation

Typedefs

typedef int TTemplateIdx
typedef int TFootprintIdx
typedef std::pair
< TTemplateIdx, TFootprintIdx
TFootprintIdent
typedef FixedPoint::IStateRewriter TInsnWriter
typedef std::list
< FixedPoint::THeapIdent
THeapIdentSeq
typedef std::vector
< FootprintMatch
TMatchList
typedef FixedPoint::GlobalState TProgState
typedef std::vector
< FixedPoint::TLocIdx
TInsnList
typedef std::vector< TInsnListTInsnListByTplIdx
typedef int TOpIdx
typedef int TMatchIdx
typedef std::vector< TMatchIdxTMatchIdxList
typedef std::vector
< TMatchIdxList
TOpList
typedef std::set< MetaOperationTMetaOpSet
 set of meta-operations (which should be independent on each other)
typedef int TShapeVarId
typedef FixedPoint::TShapeIdent TShapeIdent
typedef std::map< TShapeIdent,
TShapeVarId
TShapeVarByShape

Enumerations

enum  ESearchDirection {
  SD_INVALID = 0,
  SD_FORWARD,
  SD_BACKWARD
}
 (preferred) search direction More...
enum  EFootprintPort {
  FP_SRC,
  FP_DST,
  FP_TOTAL
}
enum  EMetaOperation {
  MO_INVALID = 0,
  MO_ALLOC,
  MO_FREE,
  MO_SET,
  MO_UNSET
}

Functions

bool loadDefaultOperations (OpCollection *pDst, const CodeStorage::Storage &)
void matchTemplates (TMatchList *pDst, const OpCollection &coll, const TProgState &progState)
void collectReplacedInsns (TInsnListByTplIdx *pDst, const TMatchList &matchList, const TProgState &progState)
void selectApplicableMatches (TMatchList *pMatchList, const TProgState &progState)
TObjId selectMappedObjByTs (const SymHeap &sh, const BindingOff &bOff, const TObjList &objList, ETargetSpecifier ts)
bool collectOpList (TOpList *pDst, const TMatchList &matchList)
bool operator< (const MetaOperation &a, const MetaOperation &b)
 required to be defined by the implementation of std::set
bool diffHeaps (TMetaOpSet *pDst, const SymHeap &sh1, const SymHeap &sh2)
bool replaceAdtOps (TInsnWriter *pInsnWriter, const TMatchList &matchList, const TOpList &opList, const OpCollection &adtOps, const TShapeVarByShape &varMap, const TProgState &progState)
TShapeVarId acquireFreshShapeVar (void)
 return a (globally) unique shape var ID
bool assignShapeVariables (TShapeVarByShape *pDst, TInsnWriter *pInsnWriter, const TMatchList &matchList, const TOpList &opList, const OpCollection &coll, const TProgState &progState)

Variables

const TShapeVarId InvalidShapeVar

Typedef Documentation

Definition at line 40 of file adt_op.hh.

typedef int TFootprintIdx

Definition at line 39 of file adt_op.hh.

Definition at line 39 of file adt_op_match.hh.

typedef std::vector<FixedPoint::TLocIdx> TInsnList

Definition at line 68 of file adt_op_match.hh.

typedef std::vector<TInsnList> TInsnListByTplIdx

Definition at line 69 of file adt_op_match.hh.

Definition at line 31 of file adt_op_match.hh.

typedef int TMatchIdx

Definition at line 87 of file adt_op_match.hh.

typedef std::vector<TMatchIdx> TMatchIdxList

Definition at line 88 of file adt_op_match.hh.

typedef std::vector<FootprintMatch> TMatchList

Definition at line 60 of file adt_op_match.hh.

typedef std::set<MetaOperation> TMetaOpSet

set of meta-operations (which should be independent on each other)

Definition at line 79 of file adt_op_meta.hh.

typedef int TOpIdx

Definition at line 86 of file adt_op_match.hh.

typedef std::vector<TMatchIdxList> TOpList

Definition at line 89 of file adt_op_match.hh.

Definition at line 61 of file adt_op_match.hh.

Definition at line 35 of file cont_shape_var.hh.

Definition at line 36 of file cont_shape_var.hh.

typedef int TShapeVarId

Definition at line 28 of file cont_shape_var.hh.

typedef int TTemplateIdx

Definition at line 38 of file adt_op.hh.

Enumeration Type Documentation

Enumerator:
FP_SRC 
FP_DST 
FP_TOTAL 

Definition at line 33 of file adt_op_match.hh.

Enumerator:
MO_INVALID 
MO_ALLOC 
MO_FREE 

a new object is introduced

MO_SET 

an existing object disappears

MO_UNSET 

a value is written to a field

a tracked field is invalidated

Definition at line 29 of file adt_op_meta.hh.

(preferred) search direction

Enumerator:
SD_INVALID 
SD_FORWARD 
SD_BACKWARD 

search forward along the CFG

search backward along the CFG

Definition at line 32 of file adt_op.hh.

Function Documentation

TShapeVarId AdtOp::acquireFreshShapeVar ( void  )

return a (globally) unique shape var ID

bool AdtOp::assignShapeVariables ( TShapeVarByShape *  pDst,
TInsnWriter *  pInsnWriter,
const TMatchList &  matchList,
const TOpList &  opList,
const OpCollection &  coll,
const TProgState &  progState 
)
bool AdtOp::collectOpList ( TOpList *  pDst,
const TMatchList &  matchList 
)
void AdtOp::collectReplacedInsns ( TInsnListByTplIdx *  pDst,
const TMatchList &  matchList,
const TProgState &  progState 
)
bool AdtOp::diffHeaps ( TMetaOpSet *  pDst,
const SymHeap sh1,
const SymHeap sh2 
)
bool AdtOp::loadDefaultOperations ( OpCollection *  pDst,
const CodeStorage::Storage  
)
void AdtOp::matchTemplates ( TMatchList *  pDst,
const OpCollection &  coll,
const TProgState &  progState 
)
bool AdtOp::operator< ( const MetaOperation &  a,
const MetaOperation &  b 
)
inline

required to be defined by the implementation of std::set

Definition at line 64 of file adt_op_meta.hh.

References RETURN_IF_COMPARED.

bool AdtOp::replaceAdtOps ( TInsnWriter *  pInsnWriter,
const TMatchList &  matchList,
const TOpList &  opList,
const OpCollection &  adtOps,
const TShapeVarByShape &  varMap,
const TProgState &  progState 
)
void AdtOp::selectApplicableMatches ( TMatchList *  pMatchList,
const TProgState &  progState 
)
TObjId AdtOp::selectMappedObjByTs ( const SymHeap sh,
const BindingOff bOff,
const TObjList objList,
ETargetSpecifier  ts 
)

Variable Documentation

const TShapeVarId InvalidShapeVar