Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::DFPTData< Key, KeySet, Data, DataSet > Class Template Referenceabstract

#include <AbstractPointsToDS.h>

Inheritance diagram for SVF::DFPTData< Key, KeySet, Data, DataSet >:
SVF::PTData< Key, KeySet, Data, DataSet > SVF::MutableDFPTData< Key, KeySet, Data, DataSet > SVF::PersistentDFPTData< Key, KeySet, Data, DataSet > SVF::MutableIncDFPTData< Key, KeySet, Data, DataSet > SVF::PersistentIncDFPTData< Key, KeySet, Data, DataSet >

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.
bool hasReversePts () const
 Whether we maintain reverse points-to sets.
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

Detailed Description

template<typename Key, typename KeySet, typename Data, typename DataSet>
class SVF::DFPTData< Key, KeySet, Data, DataSet >

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 198 of file AbstractPointsToDS.h.

Member Typedef Documentation

◆ BasePTData

template<typename Key, typename KeySet, typename Data, typename DataSet>
typedef PTData<Key, KeySet, Data, DataSet> SVF::DFPTData< Key, KeySet, Data, DataSet >::BasePTData

Definition at line 201 of file AbstractPointsToDS.h.

◆ LocID

template<typename Key, typename KeySet, typename Data, typename DataSet>
typedef NodeID SVF::DFPTData< Key, KeySet, Data, DataSet >::LocID

Definition at line 204 of file AbstractPointsToDS.h.

◆ PTDataTy

template<typename Key, typename KeySet, typename Data, typename DataSet>
typedef BasePTData::PTDataTy SVF::DFPTData< Key, KeySet, Data, DataSet >::PTDataTy

Definition at line 202 of file AbstractPointsToDS.h.

Constructor & Destructor Documentation

◆ DFPTData()

template<typename Key, typename KeySet, typename Data, typename DataSet>
SVF::DFPTData< Key, KeySet, Data, DataSet >::DFPTData ( bool reversePT = true,
PTDataTy ty = BasePTData::DataFlow )
inline

Constructor.

Definition at line 207 of file AbstractPointsToDS.h.

207: BasePTData(reversePT, ty) { }
PTData< Key, KeySet, Data, DataSet > BasePTData

◆ ~DFPTData()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual SVF::DFPTData< Key, KeySet, Data, DataSet >::~DFPTData ( )
inlinevirtual

Definition at line 209 of file AbstractPointsToDS.h.

209{ }

Member Function Documentation

◆ classof() [1/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
bool SVF::DFPTData< Key, KeySet, Data, DataSet >::classof ( const DFPTData< Key, KeySet, Data, DataSet > * )
inlinestatic

Methods to support type inquiry through isa, cast, and dyn_cast:

Definition at line 253 of file AbstractPointsToDS.h.

254 {
255 return true;
256 }

◆ classof() [2/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
bool SVF::DFPTData< Key, KeySet, Data, DataSet >::classof ( const PTData< Key, KeySet, Data, DataSet > * ptd)
inlinestatic

Definition at line 258 of file AbstractPointsToDS.h.

259 {
265 }
PTDataTy getPTDTY() const
Get the type of points-to data structure that this is.

◆ clearAllDFOutUpdatedVar()

◆ getDFInPtsSet()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual const DataSet & SVF::DFPTData< Key, KeySet, Data, DataSet >::getDFInPtsSet ( LocID loc,
const Key & var )
pure virtual

◆ getDFOutPtsSet()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual const DataSet & SVF::DFPTData< Key, KeySet, Data, DataSet >::getDFOutPtsSet ( LocID loc,
const Key & var )
pure virtual

◆ hasDFInSet() [1/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::hasDFInSet ( LocID loc) const
pure virtual

◆ hasDFInSet() [2/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::hasDFInSet ( LocID loc,
const Key & var ) const
pure virtual

◆ hasDFOutSet() [1/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::hasDFOutSet ( LocID loc) const
pure virtual

◆ hasDFOutSet() [2/2]

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::hasDFOutSet ( LocID loc,
const Key & var ) const
pure virtual

◆ updateAllDFInFromIn()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::updateAllDFInFromIn ( LocID srcLoc,
const Key & srcVar,
LocID dstLoc,
const Key & dstVar )
pure virtual

◆ updateAllDFInFromOut()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::updateAllDFInFromOut ( LocID srcLoc,
const Key & srcVar,
LocID dstLoc,
const Key & dstVar )
pure virtual

◆ updateAllDFOutFromIn()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::updateAllDFOutFromIn ( LocID loc,
const Key & singleton,
bool strongUpdates )
pure virtual

◆ updateATVPts()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::updateATVPts ( const Key & srcVar,
LocID dstLoc,
const Key & dstVar )
pure virtual

◆ updateDFInFromIn()

template<typename Key, typename KeySet, typename Data, typename DataSet>
virtual bool SVF::DFPTData< Key, KeySet, Data, DataSet >::updateDFInFromIn ( LocID srcLoc,
const Key & srcVar,
LocID dstLoc,
const Key & dstVar )
pure virtual

◆ updateDFInFromOut()

◆ updateDFOutFromIn()

◆ updateTLVPts()


The documentation for this class was generated from the following file: