Static Value-Flow Analysis
|
#include <AbstractPointsToDS.h>
Public Types | |
enum | PTDataTy { Base , MutBase , Diff , MutDiff , DataFlow , MutDataFlow , MutIncDataFlow , Versioned , MutVersioned , PersBase , PersDiff , PersDataFlow , PersIncDataFlow , PersVersioned } |
Types of a points-to data structures. More... | |
Public Member Functions | |
PTData (bool reversePT=true, PTDataTy ty=PTDataTy::Base) | |
virtual | ~PTData () |
PTDataTy | getPTDTY () const |
Get the type of points-to data structure that this is. | |
virtual void | clear ()=0 |
Clears all points-to sets as if nothing is stored. | |
virtual const DataSet & | getPts (const Key &var)=0 |
Get points-to set of var. | |
virtual const KeySet & | getRevPts (const Data &datum)=0 |
Get reverse points-to set of a datum. | |
virtual bool | addPts (const Key &var, const Data &element)=0 |
Adds element to the points-to set associated with var. | |
virtual bool | unionPts (const Key &dstVar, const Key &srcVar)=0 |
Performs pts(dstVar) = pts(dstVar) U pts(srcVar). | |
virtual bool | unionPts (const Key &dstVar, const DataSet &srcDataSet)=0 |
Performs pts(dstVar) = pts(dstVar) U srcDataSet. | |
virtual void | clearPts (const Key &var, const Data &element)=0 |
Clears element from the points-to set of var. | |
virtual void | clearFullPts (const Key &var)=0 |
Fully clears the points-to set of var. | |
virtual void | remapAllPts (void)=0 |
Remaps all points-to sets to use the current mapping. | |
virtual void | dumpPTData ()=0 |
Dump stored keys and points-to sets. | |
virtual Map< DataSet, unsigned > | getAllPts (bool liveOnly) const =0 |
Protected Attributes | |
bool | rev |
Whether we maintain reverse points-to sets or not. | |
PTDataTy | ptdTy |
Basic points-to data structure Given a key (variable/condition variable), return its points-to data (pts/condition pts) It is designed flexible for different context, heap and path sensitive analysis Context Insensitive Key --> Variable, DataSet --> PointsTo Context sensitive: Key --> CondVar, DataSet --> PointsTo Heap sensitive: Key --> Variable DataSet --> CondPointsToSet Context and heap sensitive: Key --> CondVar, DataSet --> CondPointsToSet
This class is abstract to allow for multiple methods of actually storing points-to sets. Key: "owning" variable of a points-to set. KeySet: collection of keys. Data: elements in points-to sets. DataSet: the points-to set; a collection of Data.
Definition at line 74 of file AbstractPointsToDS.h.
Types of a points-to data structures.
Enumerator | |
---|---|
Base | |
MutBase | |
Diff | |
MutDiff | |
DataFlow | |
MutDataFlow | |
MutIncDataFlow | |
Versioned | |
MutVersioned | |
PersBase | |
PersDiff | |
PersDataFlow | |
PersIncDataFlow | |
PersVersioned |
Definition at line 78 of file AbstractPointsToDS.h.
|
inline |
Definition at line 96 of file AbstractPointsToDS.h.
Definition at line 98 of file AbstractPointsToDS.h.
|
pure virtual |
Adds element to the points-to set associated with var.
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, and SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Clears all points-to sets as if nothing is stored.
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Fully clears the points-to set of var.
Implemented in SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Clears element from the points-to set of var.
Implemented in SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Dump stored keys and points-to sets.
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Returns a mapping of points-to sets to the number of times they are stored. liveOnly indicates whether to include only points-to sets which correspond to a variable (matters when dealing with non-GC persistent PT).
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
inline |
Get the type of points-to data structure that this is.
Definition at line 101 of file AbstractPointsToDS.h.
|
pure virtual |
Get points-to set of var.
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, and SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Get reverse points-to set of a datum.
Implemented in SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, and SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Remaps all points-to sets to use the current mapping.
Implemented in SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< VersionedKey, VersionedKeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, and SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Performs pts(dstVar) = pts(dstVar) U srcDataSet.
Implemented in SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, and SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
pure virtual |
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
Implemented in SVF::MutablePTData< Key, KeySet, Data, DataSet >, SVF::MutableDiffPTData< Key, KeySet, Data, DataSet >, SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDiffPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, SVF::PersistentVersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >, and SVF::VersionedPTData< Key, KeySet, Data, DataSet, VersionedKey, VersionedKeySet >.
|
protected |
Definition at line 142 of file AbstractPointsToDS.h.
|
protected |
Whether we maintain reverse points-to sets or not.
Definition at line 141 of file AbstractPointsToDS.h.