Static Value-Flow Analysis
|
#include <AbstractPointsToDS.h>
Public Types | |
typedef PTData< Key, KeySet, Data, DataSet > | BasePTData |
typedef BasePTData::PTDataTy | PTDataTy |
typedef NodeID | LocID |
Public Types inherited from SVF::PTData< Key, KeySet, Data, DataSet > | |
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 | |
DFPTData (bool reversePT=true, PTDataTy ty=BasePTData::DataFlow) | |
Constructor. | |
virtual | ~DFPTData () |
virtual bool | hasDFInSet (LocID loc) const =0 |
virtual bool | hasDFOutSet (LocID loc) const =0 |
virtual bool | hasDFOutSet (LocID loc, const Key &var) const =0 |
virtual bool | hasDFInSet (LocID loc, const Key &var) const =0 |
virtual const DataSet & | getDFInPtsSet (LocID loc, const Key &var)=0 |
virtual const DataSet & | getDFOutPtsSet (LocID loc, const Key &var)=0 |
virtual bool | updateDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
virtual bool | updateAllDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above. | |
virtual bool | updateDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]). | |
virtual bool | updateAllDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above. | |
virtual bool | updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]). | |
virtual bool | updateAllDFOutFromIn (LocID loc, const Key &singleton, bool strongUpdates)=0 |
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var). | |
virtual void | clearAllDFOutUpdatedVar (LocID)=0 |
virtual bool | updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar)=0 |
Update points-to set of top-level pointers with IN[srcLoc:srcVar]. | |
virtual bool | updateATVPts (const Key &srcVar, LocID dstLoc, const Key &dstVar)=0 |
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers. | |
Public Member Functions inherited from SVF::PTData< Key, KeySet, Data, DataSet > | |
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 |
Static Public Member Functions | |
static bool | classof (const DFPTData< Key, KeySet, Data, DataSet > *) |
static bool | classof (const PTData< Key, KeySet, Data, DataSet > *ptd) |
Additional Inherited Members | |
Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet > | |
bool | rev |
Whether we maintain reverse points-to sets or not. | |
PTDataTy | ptdTy |
Data-flow points-to data structure for flow-sensitive analysis as defined by Hardekopf and Lin (CGO 11). Points-to information is maintained at each program point (statement). For address-taken variables, every program point has two sets: IN and OUT points-to sets. For top-level variables, points-to sets are maintained flow-insensitively via getPts(var).
Definition at line 194 of file AbstractPointsToDS.h.
Definition at line 197 of file AbstractPointsToDS.h.
Definition at line 200 of file AbstractPointsToDS.h.
typedef BasePTData::PTDataTy SVF::DFPTData< Key, KeySet, Data, DataSet >::PTDataTy |
Definition at line 198 of file AbstractPointsToDS.h.
|
inline |
Constructor.
Definition at line 203 of file AbstractPointsToDS.h.
Definition at line 205 of file AbstractPointsToDS.h.
|
inlinestatic |
Methods to support type inquiry through isa, cast, and dyn_cast:
Definition at line 249 of file AbstractPointsToDS.h.
|
inlinestatic |
Definition at line 254 of file AbstractPointsToDS.h.
|
pure virtual |
Determine whether the DF IN/OUT sets have points-to sets.
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Access points-to set from data-flow IN/OUT set.
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Update points-to for IN/OUT set IN[loc:var] represents the points-to of variable var in the IN set of location loc. union(ptsDst, ptsSrc) represents ptsDst = ptsDst U ptsSrc.
Union (IN[dstLoc:dstVar], IN[srcLoc:srcVar]).
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.
|
pure virtual |
Update points-to set of top-level pointers with IN[srcLoc:srcVar].
Implemented in SVF::MutableDFPTData< Key, KeySet, Data, DataSet >, SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet >, SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >, and SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >.