Static Value-Flow Analysis
|
Incremental version of the persistent data-flow points-to data structure. More...
#include <PersistentPointsToDS.h>
Public Member Functions | |
PersistentIncDFPTData (PersistentPointsToCache< DataSet > &cache, bool reversePT=true, PTDataTy ty=BasePTData::PersIncDataFlow) | |
Constructor. More... | |
~PersistentIncDFPTData () override=default | |
bool | updateDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
bool | updateDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]). More... | |
bool | updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]). More... | |
bool | updateAllDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above. More... | |
bool | updateAllDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above. More... | |
bool | updateAllDFOutFromIn (LocID loc, const Key &singleton, bool strongUpdates) override |
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var). More... | |
bool | updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar) override |
Update points-to set of top-level pointers with IN[srcLoc:srcVar]. More... | |
bool | updateATVPts (const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers. More... | |
void | clearAllDFOutUpdatedVar (LocID loc) override |
void | clear () override |
Clears all points-to sets as if nothing is stored. More... | |
Public Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > | |
PersistentDFPTData (PersistentPointsToCache< DataSet > &cache, bool reversePT=true, PTDataTy ty=PTDataTy::PersDataFlow) | |
~PersistentDFPTData () override=default | |
const DataSet & | getPts (const Key &var) override |
Get points-to set of var. More... | |
const KeySet & | getRevPts (const Data &) override |
Get reverse points-to set of a datum. More... | |
bool | unionPts (const Key &dstKey, const Key &srcKey) override |
Performs pts(dstVar) = pts(dstVar) U pts(srcVar). More... | |
bool | unionPts (const Key &dstKey, const DataSet &srcDataSet) override |
Performs pts(dstVar) = pts(dstVar) U srcDataSet. More... | |
bool | addPts (const Key &dstKey, const Data &element) override |
Adds element to the points-to set associated with var. More... | |
void | clearPts (const Key &var, const Data &element) override |
Clears element from the points-to set of var. More... | |
void | clearFullPts (const Key &var) override |
Fully clears the points-to set of var. More... | |
void | remapAllPts () override |
Remaps all points-to sets to use the current mapping. More... | |
void | dumpPTData () override |
Dump stored keys and points-to sets. More... | |
bool | hasDFInSet (LocID loc) const override |
bool | hasDFOutSet (LocID loc) const override |
bool | hasDFInSet (LocID loc, const Key &var) const override |
bool | hasDFOutSet (LocID loc, const Key &var) const override |
const DataSet & | getDFInPtsSet (LocID loc, const Key &var) override |
const DataSet & | getDFOutPtsSet (LocID loc, const Key &var) override |
Map< DataSet, unsigned > | getAllPts (bool liveOnly) const override |
Public Member Functions inherited from SVF::DFPTData< Key, KeySet, Data, DataSet > | |
DFPTData (bool reversePT=true, PTDataTy ty=BasePTData::DataFlow) | |
Constructor. More... | |
virtual | ~DFPTData () |
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. More... | |
Static Public Member Functions | |
static bool | classof (const PersistentIncDFPTData< Key, KeySet, Data, DataSet > *) |
static bool | classof (const PTData< Key, KeySet, Data, DataSet > *ptd) |
Static Public Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > | |
static bool | classof (const PersistentDFPTData< Key, KeySet, Data, DataSet > *) |
static bool | classof (const PTData< Key, KeySet, Data, DataSet > *ptd) |
Static Public Member Functions inherited from SVF::DFPTData< Key, KeySet, Data, DataSet > | |
static bool | classof (const DFPTData< Key, KeySet, Data, DataSet > *) |
static bool | classof (const PTData< Key, KeySet, Data, DataSet > *ptd) |
Private Member Functions | |
void | setVarDFInSetUpdated (LocID loc, const Key &var) |
Handle address-taken variables whose IN pts changed. More... | |
void | removeVarFromDFInUpdatedSet (LocID loc, const Key &var) |
Remove var from loc's IN updated set. More... | |
bool | varHasNewDFInPts (LocID loc, const Key &var) |
Return TRUE if var has a new pts in loc's IN set. More... | |
const KeySet & | getDFInUpdatedVar (LocID loc) |
Get all variables which have new pts information in loc's IN set. More... | |
void | setVarDFOutSetUpdated (LocID loc, const Key &var) |
void | removeVarFromDFOutUpdatedSet (LocID loc, const Key &var) |
Remove var from loc's OUT updated set. More... | |
bool | varHasNewDFOutPts (LocID loc, const Key &var) |
Return TRUE if var has a new pts in loc's OUT set. More... | |
const KeySet & | getDFOutUpdatedVar (LocID loc) |
Get all variables which have new pts info in loc's OUT set. More... | |
Private Attributes | |
UpdatedVarMap | outUpdatedVarMap |
UpdatedVarMap | inUpdatedVarMap |
Additional Inherited Members | |
Protected Member Functions inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > | |
bool | unionPtsThroughIds (PointsToID &dst, PointsToID &src) |
PointsToID & | getDFInPtIdRef (LocID loc, const Key &var) |
PointsToID & | getDFOutPtIdRef (LocID loc, const Key &var) |
Protected Attributes inherited from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > | |
PersistentPointsToCache< DataSet > & | ptCache |
PersistentPTData< Key, KeySet, Data, DataSet > | persPTData |
PTData for top-level pointers. We will also use its cache for address-taken pointers. More... | |
DFKeyToIDMap | dfInPtsMap |
Address-taken points-to sets in IN-sets. More... | |
DFKeyToIDMap | dfOutPtsMap |
Address-taken points-to sets in OUT-sets. More... | |
Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet > | |
bool | rev |
Whether we maintain reverse points-to sets or not. More... | |
PTDataTy | ptdTy |
Incremental version of the persistent data-flow points-to data structure.
Definition at line 580 of file PersistentPointsToDS.h.
typedef DFPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BaseDFPTData |
Definition at line 585 of file PersistentPointsToDS.h.
typedef PersistentDFPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePersDFPTData |
Definition at line 586 of file PersistentPointsToDS.h.
typedef PersistentPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePersPTData |
Definition at line 584 of file PersistentPointsToDS.h.
typedef PTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePTData |
Definition at line 583 of file PersistentPointsToDS.h.
typedef BaseDFPTData::LocID SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::LocID |
Definition at line 589 of file PersistentPointsToDS.h.
typedef BasePTData::PTDataTy SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::PTDataTy |
Definition at line 587 of file PersistentPointsToDS.h.
typedef Map<LocID, KeySet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarMap |
Definition at line 590 of file PersistentPointsToDS.h.
|
inlineexplicit |
Constructor.
Definition at line 594 of file PersistentPointsToDS.h.
|
overridedefault |
|
inlinestatic |
Methods to support type inquiry through isa, cast, and dyn_cast:
Definition at line 721 of file PersistentPointsToDS.h.
|
inlinestatic |
Definition at line 726 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Clears all points-to sets as if nothing is stored.
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 712 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 700 of file PersistentPointsToDS.h.
|
inlineprivate |
Get all variables which have new pts information in loc's IN set.
Definition at line 758 of file PersistentPointsToDS.h.
|
inlineprivate |
Get all variables which have new pts info in loc's OUT set.
Definition at line 788 of file PersistentPointsToDS.h.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
Handle address-taken variables whose IN pts changed.
Add var into loc's IN updated set. Called when var's pts in loc's IN set is changed.
Definition at line 737 of file PersistentPointsToDS.h.
|
inlineprivate |
Handle address-taken variables whose OUT pts changed
Add var into loc's OUT updated set. Called when var's pts in loc's OUT set changed
Definition at line 767 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 649 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 638 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).
Only variables which have a new (IN) pts need to be updated.
Enable strong updates if it is required to do so
Enable strong updates if required.
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 660 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 689 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
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]).
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 599 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 611 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 623 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Update points-to set of top-level pointers with IN[srcLoc:srcVar].
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 678 of file PersistentPointsToDS.h.
|
inlineprivate |
Return TRUE if var has a new pts in loc's IN set.
Definition at line 750 of file PersistentPointsToDS.h.
|
inlineprivate |
Return TRUE if var has a new pts in loc's OUT set.
Definition at line 780 of file PersistentPointsToDS.h.
|
private |
Definition at line 797 of file PersistentPointsToDS.h.
|
private |
Definition at line 796 of file PersistentPointsToDS.h.