|
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. | |
| ~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]). | |
| bool | updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override |
| Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]). | |
| 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. | |
| 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. | |
| bool | updateAllDFOutFromIn (LocID loc, const Key &singleton, bool strongUpdates) override |
| For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var). | |
| bool | updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar) override |
| Update points-to set of top-level pointers with IN[srcLoc:srcVar]. | |
| 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. | |
| void | clearAllDFOutUpdatedVar (LocID loc) override |
| void | clear () override |
| Clears all points-to sets as if nothing is stored. | |
| 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. | |
| const KeySet & | getRevPts (const Data &) override |
| Get reverse points-to set of a datum. | |
| bool | unionPts (const Key &dstKey, const Key &srcKey) override |
| Performs pts(dstVar) = pts(dstVar) U pts(srcVar). | |
| bool | unionPts (const Key &dstKey, const DataSet &srcDataSet) override |
| Performs pts(dstVar) = pts(dstVar) U srcDataSet. | |
| bool | addPts (const Key &dstKey, const Data &element) override |
| Adds element to the points-to set associated with var. | |
| void | clearPts (const Key &var, const Data &element) override |
| Clears element from the points-to set of var. | |
| void | clearFullPts (const Key &var) override |
| Fully clears the points-to set of var. | |
| void | remapAllPts () override |
| Remaps all points-to sets to use the current mapping. | |
| void | dumpPTData () override |
| Dump stored keys and points-to sets. | |
| 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. | |
| 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. | |
| bool | hasReversePts () const |
| Whether we maintain reverse points-to sets. | |
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. | |
| void | removeVarFromDFInUpdatedSet (LocID loc, const Key &var) |
| Remove var from loc's IN updated set. | |
| bool | varHasNewDFInPts (LocID loc, const Key &var) |
| Return TRUE if var has a new pts in loc's IN set. | |
| const KeySet & | getDFInUpdatedVar (LocID loc) |
| Get all variables which have new pts information in loc's IN set. | |
| void | setVarDFOutSetUpdated (LocID loc, const Key &var) |
| void | removeVarFromDFOutUpdatedSet (LocID loc, const Key &var) |
| Remove var from loc's OUT updated set. | |
| bool | varHasNewDFOutPts (LocID loc, const Key &var) |
| Return TRUE if var has a new pts in loc's OUT set. | |
| const KeySet & | getDFOutUpdatedVar (LocID loc) |
| Get all variables which have new pts info in loc's OUT set. | |
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. | |
| DFKeyToIDMap | dfInPtsMap |
| Address-taken points-to sets in IN-sets. | |
| DFKeyToIDMap | dfOutPtsMap |
| Address-taken points-to sets in OUT-sets. | |
| Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet > | |
| bool | rev |
| Whether we maintain reverse points-to sets or not. | |
| PTDataTy | ptdTy |
Incremental version of the persistent data-flow points-to data structure.
Definition at line 579 of file PersistentPointsToDS.h.
| typedef DFPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BaseDFPTData |
Definition at line 584 of file PersistentPointsToDS.h.
| typedef PersistentDFPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePersDFPTData |
Definition at line 585 of file PersistentPointsToDS.h.
| typedef PersistentPTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePersPTData |
Definition at line 583 of file PersistentPointsToDS.h.
| typedef PTData<Key, KeySet, Data, DataSet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::BasePTData |
Definition at line 582 of file PersistentPointsToDS.h.
| typedef BaseDFPTData::LocID SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::LocID |
Definition at line 588 of file PersistentPointsToDS.h.
| typedef BasePTData::PTDataTy SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::PTDataTy |
Definition at line 586 of file PersistentPointsToDS.h.
| typedef Map<LocID, KeySet> SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarMap |
Definition at line 589 of file PersistentPointsToDS.h.
|
inlineexplicit |
Constructor.
Definition at line 593 of file PersistentPointsToDS.h.
|
overridedefault |
|
inlinestatic |
Methods to support type inquiry through isa, cast, and dyn_cast:
Definition at line 720 of file PersistentPointsToDS.h.
|
inlinestatic |
Definition at line 725 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 711 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 699 of file PersistentPointsToDS.h.
|
inlineprivate |
Get all variables which have new pts information in loc's IN set.
Definition at line 757 of file PersistentPointsToDS.h.
|
inlineprivate |
Get all variables which have new pts info in loc's OUT set.
Definition at line 787 of file PersistentPointsToDS.h.
|
inlineprivate |
Remove var from loc's IN updated set.
Definition at line 742 of file PersistentPointsToDS.h.
|
inlineprivate |
Remove var from loc's OUT updated set.
Definition at line 772 of file PersistentPointsToDS.h.
|
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 736 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 766 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 648 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 637 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 659 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 688 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 598 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 610 of file PersistentPointsToDS.h.
|
inlineoverridevirtual |
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
Reimplemented from SVF::PersistentDFPTData< Key, KeySet, Data, DataSet >.
Definition at line 622 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 677 of file PersistentPointsToDS.h.
|
inlineprivate |
Return TRUE if var has a new pts in loc's IN set.
Definition at line 749 of file PersistentPointsToDS.h.
|
inlineprivate |
Return TRUE if var has a new pts in loc's OUT set.
Definition at line 779 of file PersistentPointsToDS.h.
|
private |
Definition at line 796 of file PersistentPointsToDS.h.
|
private |
Definition at line 795 of file PersistentPointsToDS.h.