SVF
Public Types | Public Member Functions | Private Attributes | List of all members
SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet > Class Template Reference

Incremental version of the mutable data-flow points-to data structure. More...

#include <MutablePointsToDS.h>

Inheritance diagram for SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >:
SVF::MutableDFPTData< Key, KeySet, Data, DataSet > SVF::DFPTData< Key, KeySet, Data, DataSet > SVF::PTData< Key, KeySet, Data, DataSet >

Public Types

typedef PTData< Key, KeySet, Data, DataSet > BasePTData
 
typedef MutablePTData< Key, KeySet, Data, DataSet > BaseMutPTData
 
typedef DFPTData< Key, KeySet, Data, DataSet > BaseDFPTData
 
typedef MutableDFPTData< Key, KeySet, Data, DataSet > BaseMutDFPTData
 
typedef BasePTData::PTDataTy PTDataTy
 
typedef BaseDFPTData::LocID LocID
 
typedef Map< LocID, DataSet > UpdatedVarMap
 for propagating only newly added variable in IN/OUT set More...
 
typedef UpdatedVarMap::iterator UpdatedVarMapIter
 
typedef UpdatedVarMap::const_iterator UpdatedVarconstIter
 
typedef DataSet::iterator DataIter
 
- Public Types inherited from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >
typedef PTData< Key, KeySet, Data, DataSet > BasePTData
 
typedef MutablePTData< Key, KeySet, Data, DataSet > BaseMutPTData
 
typedef DFPTData< Key, KeySet, Data, DataSet > BaseDFPTData
 
typedef BasePTData::PTDataTy PTDataTy
 
typedef BaseDFPTData::LocID LocID
 
typedef BaseMutPTData::PtsMap PtsMap
 
typedef BaseMutPTData::PtsMapConstIter PtsMapConstIter
 
typedef Map< LocID, PtsMapDFPtsMap
 Data-flow point-to map. More...
 
typedef DFPtsMap::iterator DFPtsMapIter
 
typedef DFPtsMap::const_iterator DFPtsMapconstIter
 
- Public Types inherited from SVF::DFPTData< Key, KeySet, Data, DataSet >
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, IncMutDataFlow, Versioned,
  MutVersioned
}
 Types of a points-to data structures. More...
 

Public Member Functions

 IncMutableDFPTData (bool reversePT=true, PTDataTy ty=BasePTData::IncMutDataFlow)
 Constructor. More...
 
virtual ~IncMutableDFPTData ()
 
virtual bool updateDFInFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 
virtual bool updateDFInFromOut (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]). More...
 
virtual bool updateDFOutFromIn (LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
 Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]). More...
 
virtual 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...
 
virtual 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...
 
virtual 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...
 
virtual bool updateTLVPts (LocID srcLoc, const Key &srcVar, const Key &dstVar) override
 Update points-to set of top-level pointers with IN[srcLoc:srcVar]. More...
 
virtual 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...
 
virtual void clearAllDFOutUpdatedVar (LocID loc) override
 
- Public Member Functions inherited from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >
 MutableDFPTData (bool reversePT=true, PTDataTy ty=BaseDFPTData::MutDataFlow)
 Constructor. More...
 
virtual ~MutableDFPTData ()
 
virtual const PtsMapgetPtsMap () const
 
virtual void clear () override
 Clears all points-to sets as if nothing is stored. More...
 
virtual const DataSet & getPts (const Key &var) override
 Get points-to set of var. More...
 
virtual const KeySet & getRevPts (const Data &datum) override
 Get reverse points-to set of a datum. More...
 
virtual bool hasDFInSet (LocID loc) const override
 
virtual bool hasDFOutSet (LocID loc) const override
 
virtual bool hasDFInSet (LocID loc, const Key &var) const override
 
virtual bool hasDFOutSet (LocID loc, const Key &var) const override
 
virtual DataSet & getDFInPtsSet (LocID loc, const Key &var) override
 
virtual DataSet & getDFOutPtsSet (LocID loc, const Key &var) override
 
const PtsMapgetDFInPtsMap (LocID loc)
 
const PtsMapgetDFOutPtsMap (LocID loc)
 
const DFPtsMapgetDFIn ()
 
const DFPtsMapgetDFOut ()
 
virtual bool addPts (const Key &dstKey, const Key &srcKey) override
 
virtual bool unionPts (const Key &dstKey, const Key &srcKey) override
 Performs pts(dstVar) = pts(dstVar) U pts(srcVar). More...
 
virtual bool unionPts (const Key &dstKey, const DataSet &srcDataSet) override
 Performs pts(dstVar) = pts(dstVar) U srcDataSet. More...
 
virtual void clearPts (const Key &var, const Data &element) override
 Clears element from the points-to set of var. More...
 
virtual void clearFullPts (const Key &var) override
 Fully clears the points-to set of var. More...
 
virtual void dumpPTData () override
 
virtual void dumpPts (const PtsMap &ptsSet, raw_ostream &O=SVFUtil::outs()) const
 
- 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...
 
virtual bool addPts (const Key &var, const Data &element)=0
 Adds element to the points-to set associated with var. More...
 

Static Public Member Functions

static bool classof (const IncMutableDFPTData< Key, KeySet, Data, DataSet > *)
 
static bool classof (const PTData< Key, KeySet, Data, DataSet > *ptd)
 
- Static Public Member Functions inherited from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >
static bool classof (const MutableDFPTData< 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 new pts in loc's IN set. More...
 
const DataSet & getDFInUpdatedVar (LocID loc)
 Get all var which have new pts informationin loc's IN set. More...
 
void setVarDFOutSetUpdated (LocID loc, const Key &var)
 Handle address-taken variables whose OUT pts changed. More...
 
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 new pts in loc's OUT set. More...
 
const DataSet & getDFOutUpdatedVar (LocID loc)
 Get all var which have new pts informationin loc's OUT set. More...
 

Private Attributes

UpdatedVarMap outUpdatedVarMap
 
UpdatedVarMap inUpdatedVarMap
 

Additional Inherited Members

- Protected Member Functions inherited from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >
bool unionPts (DataSet &dstDataSet, const DataSet &srcDataSet)
 
bool addPts (DataSet &d, const Data &e)
 
- Protected Attributes inherited from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >
DFPtsMap dfInPtsMap
 Data-flow IN set. More...
 
DFPtsMap dfOutPtsMap
 Data-flow OUT set. More...
 
MutablePTData< Key, KeySet, Data, DataSet > mutPTData
 
- Protected Attributes inherited from SVF::PTData< Key, KeySet, Data, DataSet >
bool rev
 Whether we maintain reverse points-to sets or not. More...
 
PTDataTy ptdTy
 

Detailed Description

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

Incremental version of the mutable data-flow points-to data structure.

Definition at line 593 of file MutablePointsToDS.h.

Member Typedef Documentation

◆ BaseDFPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef DFPTData<Key, KeySet, Data, DataSet> SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::BaseDFPTData

Definition at line 598 of file MutablePointsToDS.h.

◆ BaseMutDFPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef MutableDFPTData<Key, KeySet, Data, DataSet> SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::BaseMutDFPTData

Definition at line 599 of file MutablePointsToDS.h.

◆ BaseMutPTData

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef MutablePTData<Key, KeySet, Data, DataSet> SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::BaseMutPTData

Definition at line 597 of file MutablePointsToDS.h.

◆ BasePTData

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

Definition at line 596 of file MutablePointsToDS.h.

◆ DataIter

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef DataSet::iterator SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::DataIter

Definition at line 606 of file MutablePointsToDS.h.

◆ LocID

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef BaseDFPTData::LocID SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::LocID

Definition at line 602 of file MutablePointsToDS.h.

◆ PTDataTy

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

Definition at line 600 of file MutablePointsToDS.h.

◆ UpdatedVarconstIter

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef UpdatedVarMap::const_iterator SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarconstIter

Definition at line 605 of file MutablePointsToDS.h.

◆ UpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef Map<LocID, DataSet> SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarMap

for propagating only newly added variable in IN/OUT set

Definition at line 603 of file MutablePointsToDS.h.

◆ UpdatedVarMapIter

template<typename Key , typename KeySet , typename Data , typename DataSet >
typedef UpdatedVarMap::iterator SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::UpdatedVarMapIter

Definition at line 604 of file MutablePointsToDS.h.

Constructor & Destructor Documentation

◆ IncMutableDFPTData()

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

Constructor.

Definition at line 614 of file MutablePointsToDS.h.

614 : BaseMutDFPTData(reversePT, ty) { }
MutableDFPTData< Key, KeySet, Data, DataSet > BaseMutDFPTData

◆ ~IncMutableDFPTData()

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

Definition at line 616 of file MutablePointsToDS.h.

616 { }

Member Function Documentation

◆ classof() [1/2]

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

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

Definition at line 729 of file MutablePointsToDS.h.

730  {
731  return true;
732  }

◆ classof() [2/2]

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

Definition at line 734 of file MutablePointsToDS.h.

735  {
736  return ptd->getPTDTY() == BasePTData::IncMutDataFlow;
737  }

◆ clearAllDFOutUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
virtual void SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::clearAllDFOutUpdatedVar ( LocID  loc)
inlineoverridevirtual

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 714 of file MutablePointsToDS.h.

715  {
716  if (this->hasDFOutSet(loc))
717  {
718  DataSet pts = getDFOutUpdatedVar(loc);
719  for (DataIter ptsIt = pts.begin(), ptsEit = pts.end(); ptsIt != ptsEit; ++ptsIt)
720  {
721  const Key var = *ptsIt;
723  }
724  }
725  }
DataSet::iterator DataIter
virtual bool hasDFOutSet(LocID loc) const override
void removeVarFromDFOutUpdatedSet(LocID loc, const Key &var)
Remove var from loc&#39;s OUT updated set.
const DataSet & getDFOutUpdatedVar(LocID loc)
Get all var which have new pts informationin loc&#39;s OUT set.

◆ getDFInUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const DataSet& SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::getDFInUpdatedVar ( LocID  loc)
inlineprivate

Get all var which have new pts informationin loc's IN set.

Definition at line 763 of file MutablePointsToDS.h.

764  {
765  return inUpdatedVarMap[loc];
766  }

◆ getDFOutUpdatedVar()

template<typename Key , typename KeySet , typename Data , typename DataSet >
const DataSet& SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::getDFOutUpdatedVar ( LocID  loc)
inlineprivate

Get all var which have new pts informationin loc's OUT set.

Definition at line 792 of file MutablePointsToDS.h.

793  {
794  return outUpdatedVarMap[loc];
795  }

◆ removeVarFromDFInUpdatedSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::removeVarFromDFInUpdatedSet ( LocID  loc,
const Key &  var 
)
inlineprivate

Remove var from loc's IN updated set.

Definition at line 748 of file MutablePointsToDS.h.

749  {
750  UpdatedVarMapIter it = inUpdatedVarMap.find(loc);
751  if (it != inUpdatedVarMap.end())
752  it->second.reset(var);
753  }
UpdatedVarMap::iterator UpdatedVarMapIter

◆ removeVarFromDFOutUpdatedSet()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::removeVarFromDFOutUpdatedSet ( LocID  loc,
const Key &  var 
)
inlineprivate

Remove var from loc's OUT updated set.

Definition at line 777 of file MutablePointsToDS.h.

778  {
779  UpdatedVarMapIter it = outUpdatedVarMap.find(loc);
780  if (it != outUpdatedVarMap.end())
781  it->second.reset(var);
782  }
UpdatedVarMap::iterator UpdatedVarMapIter

◆ setVarDFInSetUpdated()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::setVarDFInSetUpdated ( LocID  loc,
const Key &  var 
)
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 changed

Definition at line 743 of file MutablePointsToDS.h.

744  {
745  inUpdatedVarMap[loc].set(var);
746  }

◆ setVarDFOutSetUpdated()

template<typename Key , typename KeySet , typename Data , typename DataSet >
void SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::setVarDFOutSetUpdated ( LocID  loc,
const Key &  var 
)
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 772 of file MutablePointsToDS.h.

773  {
774  outUpdatedVarMap[loc].set(var);
775  }

◆ updateAllDFInFromIn()

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

Union (IN[dstLoc::dstVar], IN[srcLoc:srcVar]. There is no flag check, unlike the above.

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 664 of file MutablePointsToDS.h.

665  {
666  if(this->unionPts(this->getDFInPtsSet(dstLoc,dstVar), this->getDFInPtsSet(srcLoc,srcVar)))
667  {
668  setVarDFInSetUpdated(dstLoc,dstVar);
669  return true;
670  }
671  return false;
672  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
void setVarDFInSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose IN pts changed.
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ updateAllDFInFromOut()

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

Union (IN[dstLoc::dstVar], OUT[srcLoc:srcVar]. There is no flag check, unlike the above.

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 654 of file MutablePointsToDS.h.

655  {
656  if(this->unionPts(this->getDFInPtsSet(dstLoc,dstVar), this->getDFOutPtsSet(srcLoc,srcVar)))
657  {
658  setVarDFInSetUpdated(dstLoc,dstVar);
659  return true;
660  }
661  return false;
662  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
void setVarDFInSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose IN pts changed.
virtual DataSet & getDFOutPtsSet(LocID loc, const Key &var) override
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ updateAllDFOutFromIn()

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

For each variable var in IN at loc, do updateDFOutFromIn(loc, var, loc, var).

Only variables has new pts from IN set need to be updated.

Enable strong updates if it is required to do so

Only variables has new pts from IN set need to be updated.

Enable strong updates if it is required to do so

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 674 of file MutablePointsToDS.h.

675  {
676  bool changed = false;
677  if (this->hasDFInSet(loc))
678  {
680  DataSet pts = getDFInUpdatedVar(loc);
681  for (DataIter ptsIt = pts.begin(), ptsEit = pts.end(); ptsIt != ptsEit; ++ptsIt)
682  {
683  const Key var = *ptsIt;
685  if (strongUpdates && var == singleton)
686  continue;
687  if (updateDFOutFromIn(loc, var, loc, var))
688  changed = true;
689  }
690  }
691  return changed;
692  }
virtual bool hasDFInSet(LocID loc) const override
DataSet::iterator DataIter
virtual bool updateDFOutFromIn(LocID srcLoc, const Key &srcVar, LocID dstLoc, const Key &dstVar) override
Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).
const DataSet & getDFInUpdatedVar(LocID loc)
Get all var which have new pts informationin loc&#39;s IN set.

◆ updateATVPts()

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

Update address-taken variables OUT[dstLoc:dstVar] with points-to of top-level pointers.

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 704 of file MutablePointsToDS.h.

705  {
706  if (this->unionPts(this->getDFOutPtsSet(dstLoc, dstVar), this->mutPTData.getPts(srcVar)))
707  {
708  setVarDFOutSetUpdated(dstLoc, dstVar);
709  return true;
710  }
711  return false;
712  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
void setVarDFOutSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose OUT pts changed.
MutablePTData< Key, KeySet, Data, DataSet > mutPTData
virtual DataSet & getDFOutPtsSet(LocID loc, const Key &var) override

◆ updateDFInFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
virtual bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::updateDFInFromIn ( LocID  srcLoc,
const Key &  srcVar,
LocID  dstLoc,
const Key &  dstVar 
)
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::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 618 of file MutablePointsToDS.h.

619  {
620  if(varHasNewDFInPts(srcLoc, srcVar) &&
621  this->unionPts(this->getDFInPtsSet(dstLoc,dstVar), this->getDFInPtsSet(srcLoc,srcVar)))
622  {
623  setVarDFInSetUpdated(dstLoc,dstVar);
624  return true;
625  }
626  return false;
627  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
void setVarDFInSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose IN pts changed.
bool varHasNewDFInPts(LocID loc, const Key &var)
Return TRUE if var has new pts in loc&#39;s IN set.
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ updateDFInFromOut()

template<typename Key , typename KeySet , typename Data , typename DataSet >
virtual bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::updateDFInFromOut ( LocID  srcLoc,
const Key &  srcVar,
LocID  dstLoc,
const Key &  dstVar 
)
inlineoverridevirtual

Union (IN[dstLoc:dstVar], OUT[srcLoc:srcVar]).

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 629 of file MutablePointsToDS.h.

630  {
631  if(varHasNewDFOutPts(srcLoc, srcVar) &&
632  this->unionPts(this->getDFInPtsSet(dstLoc,dstVar), this->getDFOutPtsSet(srcLoc,srcVar)))
633  {
634  setVarDFInSetUpdated(dstLoc,dstVar);
635  return true;
636  }
637  return false;
638  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
bool varHasNewDFOutPts(LocID loc, const Key &var)
Return TRUE if var has new pts in loc&#39;s OUT set.
void setVarDFInSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose IN pts changed.
virtual DataSet & getDFOutPtsSet(LocID loc, const Key &var) override
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ updateDFOutFromIn()

template<typename Key , typename KeySet , typename Data , typename DataSet >
virtual bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::updateDFOutFromIn ( LocID  srcLoc,
const Key &  srcVar,
LocID  dstLoc,
const Key &  dstVar 
)
inlineoverridevirtual

Union (OUT[dstLoc:dstVar], IN[srcLoc:srcVar]).

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 640 of file MutablePointsToDS.h.

641  {
642  if(varHasNewDFInPts(srcLoc,srcVar))
643  {
644  removeVarFromDFInUpdatedSet(srcLoc,srcVar);
645  if (this->unionPts(this->getDFOutPtsSet(dstLoc,dstVar), this->getDFInPtsSet(srcLoc,srcVar)))
646  {
647  setVarDFOutSetUpdated(dstLoc,dstVar);
648  return true;
649  }
650  }
651  return false;
652  }
virtual bool unionPts(const Key &dstKey, const Key &srcKey) override
Performs pts(dstVar) = pts(dstVar) U pts(srcVar).
void setVarDFOutSetUpdated(LocID loc, const Key &var)
Handle address-taken variables whose OUT pts changed.
void removeVarFromDFInUpdatedSet(LocID loc, const Key &var)
Remove var from loc&#39;s IN updated set.
bool varHasNewDFInPts(LocID loc, const Key &var)
Return TRUE if var has new pts in loc&#39;s IN set.
virtual DataSet & getDFOutPtsSet(LocID loc, const Key &var) override
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ updateTLVPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
virtual bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::updateTLVPts ( LocID  srcLoc,
const Key &  srcVar,
const Key &  dstVar 
)
inlineoverridevirtual

Update points-to set of top-level pointers with IN[srcLoc:srcVar].

Reimplemented from SVF::MutableDFPTData< Key, KeySet, Data, DataSet >.

Definition at line 694 of file MutablePointsToDS.h.

695  {
696  if(varHasNewDFInPts(srcLoc,srcVar))
697  {
698  removeVarFromDFInUpdatedSet(srcLoc,srcVar);
699  return this->mutPTData.unionPts(dstVar, this->getDFInPtsSet(srcLoc,srcVar));
700  }
701  return false;
702  }
void removeVarFromDFInUpdatedSet(LocID loc, const Key &var)
Remove var from loc&#39;s IN updated set.
MutablePTData< Key, KeySet, Data, DataSet > mutPTData
bool varHasNewDFInPts(LocID loc, const Key &var)
Return TRUE if var has new pts in loc&#39;s IN set.
virtual DataSet & getDFInPtsSet(LocID loc, const Key &var) override

◆ varHasNewDFInPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::varHasNewDFInPts ( LocID  loc,
const Key &  var 
)
inlineprivate

Return TRUE if var has new pts in loc's IN set.

Definition at line 755 of file MutablePointsToDS.h.

756  {
757  UpdatedVarMapIter it = inUpdatedVarMap.find(loc);
758  if (it != inUpdatedVarMap.end())
759  return it->second.test(var);
760  return false;
761  }
UpdatedVarMap::iterator UpdatedVarMapIter

◆ varHasNewDFOutPts()

template<typename Key , typename KeySet , typename Data , typename DataSet >
bool SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::varHasNewDFOutPts ( LocID  loc,
const Key &  var 
)
inlineprivate

Return TRUE if var has new pts in loc's OUT set.

Definition at line 784 of file MutablePointsToDS.h.

785  {
786  UpdatedVarMapIter it = outUpdatedVarMap.find(loc);
787  if (it != outUpdatedVarMap.end())
788  return it->second.test(var);
789  return false;
790  }
UpdatedVarMap::iterator UpdatedVarMapIter

Member Data Documentation

◆ inUpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
UpdatedVarMap SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::inUpdatedVarMap
private

Definition at line 610 of file MutablePointsToDS.h.

◆ outUpdatedVarMap

template<typename Key , typename KeySet , typename Data , typename DataSet >
UpdatedVarMap SVF::IncMutableDFPTData< Key, KeySet, Data, DataSet >::outUpdatedVarMap
private

Definition at line 609 of file MutablePointsToDS.h.


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