Static Value-Flow Analysis
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
SVF::DDAVFSolver< CVar, CPtSet, DPIm > Class Template Referenceabstract

#include <DDAVFSolver.h>

Public Types

typedef SCCDetection< SVFG * > SVFGSCC
 
typedef SCCDetection< PTACallGraph * > CallGraphSCC
 
typedef PTACallGraphEdge::CallInstSet CallInstSet
 
typedef SVFIR::CallSiteSet CallSiteSet
 
typedef OrderedSet< DPIm > DPTItemSet
 
typedef OrderedMap< DPIm, CPtSet > DPImToCPtSetMap
 
typedef OrderedMap< DPIm, CVar > DPMToCVarMap
 
typedef OrderedMap< DPIm, DPIm > DPMToDPMMap
 
typedef OrderedMap< NodeID, DPTItemSetLocToDPMVecMap
 
typedef OrderedSet< const SVFGEdge * > ConstSVFGEdgeSet
 
typedef SVFGEdge::SVFGEdgeSetTy SVFGEdgeSet
 
typedef OrderedMap< const SVFGNode *, DPTItemSetStoreToPMSetMap
 

Public Member Functions

 DDAVFSolver ()
 Constructor. More...
 
virtual ~DDAVFSolver ()
 Destructor. More...
 
NodeBSgetCandidateQueries ()
 Return candidate pointers for DDA. More...
 
virtual DPIm getDPIm (const CVar &var, const SVFGNode *loc) const
 Given CVar and location (SVFGNode) return a new DPItem. More...
 
virtual bool unionDDAPts (CPtSet &pts, const CPtSet &targetPts)
 Union pts. More...
 
virtual bool unionDDAPts (DPIm dpm, const CPtSet &targetPts)
 Union pts. More...
 
virtual void addDDAPts (CPtSet &pts, const CVar &var)
 Add pts. More...
 
SVFGgetSVFG () const
 Return SVFG. More...
 
SVFGSCCgetSVFGSCC () const
 Return SVFGSCC. More...
 
void dumpCPtSet (const CPtSet &cpts) const
 
virtual const CPtSet & findPT (const DPIm &dpm)
 Compute points-to. More...
 

Protected Member Functions

virtual void handleSingleStatement (const DPIm &dpm, CPtSet &pts)
 Handle single statement. More...
 
void reCompute (const DPIm &dpm)
 recompute points-to for value-flow cycles and indirect calls More...
 
void reComputeForEdges (const DPIm &dpm, const SVFGEdgeSet &edgeSet, bool indirectCall=false)
 Traverse along out edges to find all nodes which may be affected by locDPM. More...
 
virtual void buildSVFG (SVFIR *pag)
 Build SVFG. More...
 
virtual void resetQuery ()
 Reset visited map for next points-to query. More...
 
void OOBResetVisited ()
 Reset visited map if the current query is out-of-budget. More...
 
const SVFGNodegetDefSVFGNode (const PAGNode *pagNode) const
 GetDefinition SVFG. More...
 
void backtraceAlongIndirectVF (CPtSet &pts, const DPIm &oldDpm)
 Backward traverse along indirect value flows. More...
 
void backtraceAlongDirectVF (CPtSet &pts, const DPIm &oldDpm)
 Backward traverse along direct value flows. More...
 

Friends

class DDAStat
 
bool outOfBudgetQuery
 Whether the current query is out of step limits. More...
 
SVFIR_pag
 SVFIR. More...
 
SVFG_svfg
 SVFG. More...
 
AndersenWaveDiff_ander
 Andersen's analysis. More...
 
NodeBS candidateQueries
 candidate pointers; More...
 
PTACallGraph_callGraph
 PTACallGraph. More...
 
CallGraphSCC_callGraphSCC
 SCC for PTACallGraph. More...
 
SVFGSCC_svfgSCC
 SCC for SVFG. More...
 
DPTItemSet backwardVisited
 visited map during backward traversing More...
 
DPImToCPtSetMap dpmToTLCPtSetMap
 points-to caching map for top-level vars More...
 
DPImToCPtSetMap dpmToADCPtSetMap
 points-to caching map for address-taken vars More...
 
LocToDPMVecMap locToDpmSetMap
 map location to its dpms More...
 
DPMToDPMMap dpmToloadDpmMap
 dpms at loads for may/must-alias analysis with stores More...
 
DPMToCVarMap loadToPTCVarMap
 map a load dpm to its cvar pointed by its pointer operand More...
 
DPTItemSet outOfBudgetDpms
 out of budget dpm set More...
 
StoreToPMSetMap storeToDPMs
 map store to set of DPM which have been stong updated there More...
 
DDAStatddaStat
 DDA stat. More...
 
SVFGBuilder svfgBuilder
 SVFG Builder. More...
 
void startNewPTCompFromLoadSrc (CPtSet &pts, const DPIm &oldDpm)
 
void startNewPTCompFromStoreDst (CPtSet &pts, const DPIm &oldDpm)
 
void backtraceToStoreSrc (CPtSet &pts, const DPIm &oldDpm)
 
virtual void backwardPropDpm (CPtSet &pts, NodeID ptr, const DPIm &oldDpm, const SVFGEdge *edge)
 dpm transit during backward tracing More...
 
virtual bool isMustAlias (const DPIm &, const DPIm &)
 whether load and store are aliased More...
 
virtual bool isStrongUpdate (const CPtSet &dstCPSet, const StoreSVFGNode *store)
 Return TRUE if this is a strong update STORE statement. More...
 
virtual bool isLocalCVarInRecursion (const CVar &var) const
 Whether a local variable is in function recursions. More...
 
virtual bool propagateViaObj (const CVar &storeObj, const CVar &loadObj)
 If the points-to contain the object obj, we could move forward along indirect value-flow edge. More...
 
void resolveFunPtr (const DPIm &dpm)
 resolve function pointer More...
 
virtual NodeID getPtrNodeID (const CVar &var) const =0
 Methods to be implemented in child class. More...
 
virtual CPtSet processGepPts (const GepSVFGNode *gep, const CPtSet &srcPts)=0
 ProcessGep node to generate field object nodes of a struct. More...
 
virtual void handleAddr (CPtSet &pts, const DPIm &dpm, const AddrSVFGNode *addr)=0
 Handle AddrSVFGNode to add proper points-to. More...
 
virtual CPtSet getConservativeCPts (const DPIm &dpm)=0
 Get conservative points-to results when the query is out of budget. More...
 
virtual bool handleBKCondition (DPIm &, const SVFGEdge *)
 Handle condition for context or path analysis (backward analysis) More...
 
virtual void updateCallGraphAndSVFG (const DPIm &, const CallICFGNode *, SVFGEdgeSet &)
 Update call graph. More...
 
void markbkVisited (const DPIm &dpm)
 Visited flags to avoid cycles. More...
 
bool isbkVisited (const DPIm &dpm)
 
void clearbkVisited (const DPIm &dpm)
 
virtual const CPtSet & getCachedPointsTo (const DPIm &dpm)
 Points-to Caching for top-level pointers and address-taken objects. More...
 
virtual void updateCachedPointsTo (const DPIm &dpm, const CPtSet &pts)
 
virtual const CPtSet & getCachedTLPointsTo (const DPIm &dpm)
 
virtual const CPtSet & getCachedADPointsTo (const DPIm &dpm)
 
bool isTopLevelPtrStmt (const SVFGNode *stmt)
 Whether this is a top-level pointer statement. More...
 
virtual DPIm getDPImWithOldCond (const DPIm &oldDpm, const CVar &var, const SVFGNode *loc)
 Return dpm with old context and path conditions. More...
 
void SVFGSCCDetection ()
 SVFG SCC detection. More...
 
NodeID getSVFGSCCRepNode (NodeID id)
 Get SCC rep node of a SVFG node. More...
 
bool isSVFGNodeInCycle (const SVFGNode *node)
 Return whether this SVFGNode is in cycle. More...
 
bool edgeInSVFGSCC (const SVFGEdge *edge)
 Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the SVFG. More...
 
void setCallGraph (PTACallGraph *cg)
 Set callgraph. More...
 
void setCallGraphSCC (CallGraphSCC *scc)
 Set callgraphSCC. More...
 
virtual bool isHeapCondMemObj (const CVar &var, const StoreSVFGNode *)
 Check heap and array object. More...
 
bool isArrayCondMemObj (const CVar &var) const
 
bool isFieldInsenCondMemObj (const CVar &var) const
 
void addLoadDpmAndCVar (const DPIm &dpm, const DPIm &loadDpm, const CVar &loadVar)
 LoadDpm for must-alias analysis. More...
 
void addLoadDpm (const DPIm &dpm, const DPIm &loadDpm)
 Note that simply use "dpmToloadDpmMap[dpm]=loadDpm", requires DPIm have a default constructor. More...
 
const DPIm & getLoadDpm (const DPIm &dpm) const
 
void addLoadCVar (const DPIm &dpm, const CVar &loadVar)
 
const CVar & getLoadCVar (const DPIm &dpm) const
 
AndersenWaveDiffgetAndersenAnalysis () const
 Return Andersen's analysis. More...
 
void handleOutOfBudgetDpm (const DPIm &dpm)
 handle out-of-budget queries More...
 
bool testOutOfBudget (const DPIm &dpm)
 
bool isOutOfBudgetQuery () const
 
void addOutOfBudgetDpm (const DPIm &dpm)
 
bool isOutOfBudgetDpm (const DPIm &dpm) const
 
DDAStatsetDDAStat (DDAStat *s)
 Set DDAStat. More...
 
void addSUStat (const DPIm &dpm, const SVFGNode *node)
 stat strong updates num More...
 
void rmSUStat (const DPIm &dpm, const SVFGNode *node)
 remove strong updates num if the dpm goes to weak updates branch More...
 
const LocToDPMVecMapgetLocToDPMVecMap () const
 Map a SVFGNode to its dpms for handling value-flow cycles. More...
 
const DPTItemSetgetDpmSetAtLoc (const SVFGNode *loc)
 
void addDpmToLoc (const DPIm &dpm)
 
void removeDpmFromLoc (const DPIm &dpm)
 

Detailed Description

template<class CVar, class CPtSet, class DPIm>
class SVF::DDAVFSolver< CVar, CPtSet, DPIm >

Value-Flow Based Demand-Driven Points-to Analysis

Definition at line 47 of file DDAVFSolver.h.

Member Typedef Documentation

◆ CallGraphSCC

template<class CVar , class CPtSet , class DPIm >
typedef SCCDetection<PTACallGraph*> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::CallGraphSCC

Definition at line 52 of file DDAVFSolver.h.

◆ CallInstSet

template<class CVar , class CPtSet , class DPIm >
typedef PTACallGraphEdge::CallInstSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::CallInstSet

Definition at line 53 of file DDAVFSolver.h.

◆ CallSiteSet

template<class CVar , class CPtSet , class DPIm >
typedef SVFIR::CallSiteSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::CallSiteSet

Definition at line 54 of file DDAVFSolver.h.

◆ ConstSVFGEdgeSet

template<class CVar , class CPtSet , class DPIm >
typedef OrderedSet<const SVFGEdge* > SVF::DDAVFSolver< CVar, CPtSet, DPIm >::ConstSVFGEdgeSet

Definition at line 60 of file DDAVFSolver.h.

◆ DPImToCPtSetMap

template<class CVar , class CPtSet , class DPIm >
typedef OrderedMap<DPIm, CPtSet> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::DPImToCPtSetMap

Definition at line 56 of file DDAVFSolver.h.

◆ DPMToCVarMap

template<class CVar , class CPtSet , class DPIm >
typedef OrderedMap<DPIm,CVar> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::DPMToCVarMap

Definition at line 57 of file DDAVFSolver.h.

◆ DPMToDPMMap

template<class CVar , class CPtSet , class DPIm >
typedef OrderedMap<DPIm,DPIm> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::DPMToDPMMap

Definition at line 58 of file DDAVFSolver.h.

◆ DPTItemSet

template<class CVar , class CPtSet , class DPIm >
typedef OrderedSet<DPIm> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::DPTItemSet

Definition at line 55 of file DDAVFSolver.h.

◆ LocToDPMVecMap

template<class CVar , class CPtSet , class DPIm >
typedef OrderedMap<NodeID, DPTItemSet> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::LocToDPMVecMap

Definition at line 59 of file DDAVFSolver.h.

◆ StoreToPMSetMap

template<class CVar , class CPtSet , class DPIm >
typedef OrderedMap<const SVFGNode*, DPTItemSet> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::StoreToPMSetMap

Definition at line 62 of file DDAVFSolver.h.

◆ SVFGEdgeSet

template<class CVar , class CPtSet , class DPIm >
typedef SVFGEdge::SVFGEdgeSetTy SVF::DDAVFSolver< CVar, CPtSet, DPIm >::SVFGEdgeSet

Definition at line 61 of file DDAVFSolver.h.

◆ SVFGSCC

template<class CVar , class CPtSet , class DPIm >
typedef SCCDetection<SVFG*> SVF::DDAVFSolver< CVar, CPtSet, DPIm >::SVFGSCC

Definition at line 51 of file DDAVFSolver.h.

Constructor & Destructor Documentation

◆ DDAVFSolver()

template<class CVar , class CPtSet , class DPIm >
SVF::DDAVFSolver< CVar, CPtSet, DPIm >::DDAVFSolver ( )
inline

Constructor.

Definition at line 65 of file DDAVFSolver.h.

65  : outOfBudgetQuery(false),_pag(nullptr),_svfg(nullptr),_ander(nullptr),_callGraph(nullptr), _callGraphSCC(nullptr), _svfgSCC(nullptr), ddaStat(nullptr)
66  {
67  }
CallGraphSCC * _callGraphSCC
SCC for PTACallGraph.
Definition: DDAVFSolver.h:779
SVFGSCC * _svfgSCC
SCC for SVFG.
Definition: DDAVFSolver.h:780
SVFIR * _pag
SVFIR.
Definition: DDAVFSolver.h:774
SVFG * _svfg
SVFG.
Definition: DDAVFSolver.h:775
AndersenWaveDiff * _ander
Andersen's analysis.
Definition: DDAVFSolver.h:776
PTACallGraph * _callGraph
PTACallGraph.
Definition: DDAVFSolver.h:778
DDAStat * ddaStat
DDA stat.
Definition: DDAVFSolver.h:789
bool outOfBudgetQuery
Whether the current query is out of step limits.
Definition: DDAVFSolver.h:773

◆ ~DDAVFSolver()

template<class CVar , class CPtSet , class DPIm >
virtual SVF::DDAVFSolver< CVar, CPtSet, DPIm >::~DDAVFSolver ( )
inlinevirtual

Destructor.

Definition at line 69 of file DDAVFSolver.h.

70  {
71  if(_ander != nullptr)
72  {
73  // AndersenWaveDiff::releaseAndersenWaveDiff();
74  _ander = nullptr;
75  }
76 
77  if (_svfg != nullptr)
78  {
79  // DDASVFGBuilder::releaseDDASVFG();
80  _svfg = nullptr;
81  }
82 
83  if (_svfgSCC != nullptr)
84  delete _svfgSCC;
85  _svfgSCC = nullptr;
86 
87  _callGraph = nullptr;
88  _callGraphSCC = nullptr;
89  }

Member Function Documentation

◆ addDDAPts()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addDDAPts ( CPtSet &  pts,
const CVar &  var 
)
inlinevirtual

Add pts.

Definition at line 113 of file DDAVFSolver.h.

114  {
115  pts.set(var);
116  }

◆ addDpmToLoc()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addDpmToLoc ( const DPIm &  dpm)
inlineprivate

Definition at line 668 of file DDAVFSolver.h.

669  {
670  locToDpmSetMap[dpm.getLoc()->getId()].insert(dpm);
671  }
LocToDPMVecMap locToDpmSetMap
map location to its dpms
Definition: DDAVFSolver.h:784

◆ addLoadCVar()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addLoadCVar ( const DPIm &  dpm,
const CVar &  loadVar 
)
inlineprotected

Definition at line 701 of file DDAVFSolver.h.

702  {
703  typename DPMToCVarMap::iterator it = loadToPTCVarMap.find(dpm);
704  if(it!=loadToPTCVarMap.end())
705  it->second = loadVar;
706  else
707  loadToPTCVarMap.insert(std::make_pair(dpm,loadVar));
708  }
DPMToCVarMap loadToPTCVarMap
map a load dpm to its cvar pointed by its pointer operand
Definition: DDAVFSolver.h:786

◆ addLoadDpm()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addLoadDpm ( const DPIm &  dpm,
const DPIm &  loadDpm 
)
inlineprotected

Note that simply use "dpmToloadDpmMap[dpm]=loadDpm", requires DPIm have a default constructor.

Definition at line 687 of file DDAVFSolver.h.

688  {
689  typename DPMToDPMMap::iterator it = dpmToloadDpmMap.find(dpm);
690  if(it!=dpmToloadDpmMap.end())
691  it->second = loadDpm;
692  else
693  dpmToloadDpmMap.insert(std::make_pair(dpm,loadDpm));
694  }
DPMToDPMMap dpmToloadDpmMap
dpms at loads for may/must-alias analysis with stores
Definition: DDAVFSolver.h:785

◆ addLoadDpmAndCVar()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addLoadDpmAndCVar ( const DPIm &  dpm,
const DPIm &  loadDpm,
const CVar &  loadVar 
)
inlineprotected

LoadDpm for must-alias analysis.

Definition at line 681 of file DDAVFSolver.h.

682  {
683  addLoadCVar(dpm,loadVar);
684  addLoadDpm(dpm,loadDpm);
685  }
void addLoadDpm(const DPIm &dpm, const DPIm &loadDpm)
Note that simply use "dpmToloadDpmMap[dpm]=loadDpm", requires DPIm have a default constructor.
Definition: DDAVFSolver.h:687
void addLoadCVar(const DPIm &dpm, const CVar &loadVar)
Definition: DDAVFSolver.h:701

◆ addOutOfBudgetDpm()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addOutOfBudgetDpm ( const DPIm &  dpm)
inlineprotected

Definition at line 736 of file DDAVFSolver.h.

737  {
738  outOfBudgetDpms.insert(dpm);
739  }
DPTItemSet outOfBudgetDpms
out of budget dpm set
Definition: DDAVFSolver.h:787

◆ addSUStat()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::addSUStat ( const DPIm &  dpm,
const SVFGNode node 
)
inlineprotected

stat strong updates num

Definition at line 753 of file DDAVFSolver.h.

754  {
755  if (storeToDPMs[node].insert(dpm).second)
756  {
758  ddaStat->_StrongUpdateStores.set(node->getId());
759  }
760  }
u32_t _NumOfStrongUpdates
Definition: DDAStat.h:55
NodeBS _StrongUpdateStores
Definition: DDAStat.h:66
StoreToPMSetMap storeToDPMs
map store to set of DPM which have been stong updated there
Definition: DDAVFSolver.h:788
void set(unsigned Idx)

◆ backtraceAlongDirectVF()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::backtraceAlongDirectVF ( CPtSet &  pts,
const DPIm &  oldDpm 
)
inlineprotected

Backward traverse along direct value flows.

Definition at line 374 of file DDAVFSolver.h.

375  {
376  const SVFGNode* node = oldDpm.getLoc();
377  const SVFGEdgeSet edgeSet(node->getInEdges());
378  for (SVFGNode::const_iterator it = edgeSet.begin(), eit = edgeSet.end(); it != eit; ++it)
379  {
380  if(const DirectSVFGEdge* dirEdge = SVFUtil::dyn_cast<DirectSVFGEdge>(*it))
381  {
382  DBOUT(DDDA, SVFUtil::outs() << "\t\t==backtrace directVF svfgNode " <<
383  dirEdge->getDstID() << " --> " << dirEdge->getSrcID() << "\n");
384  const SVFGNode* srcNode = dirEdge->getSrcNode();
385  backwardPropDpm(pts,getSVFG()->getLHSTopLevPtr(srcNode)->getId(),oldDpm,dirEdge);
386  }
387  }
388  }
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
Definition: SVFType.h:484
#define DDDA
Definition: SVFType.h:496
SVFGEdge::SVFGEdgeSetTy SVFGEdgeSet
Definition: DDAVFSolver.h:61
SVFG * getSVFG() const
Return SVFG.
Definition: DDAVFSolver.h:118
virtual void backwardPropDpm(CPtSet &pts, NodeID ptr, const DPIm &oldDpm, const SVFGEdge *edge)
dpm transit during backward tracing
Definition: DDAVFSolver.h:426
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
Definition: VFGNode.h:55
std::ostream & outs()
Overwrite llvm::outs()
Definition: SVFUtil.h:50
VFGNode SVFGNode
Definition: SVFG.h:43

◆ backtraceAlongIndirectVF()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::backtraceAlongIndirectVF ( CPtSet &  pts,
const DPIm &  oldDpm 
)
inlineprotected

Backward traverse along indirect value flows.

Definition at line 352 of file DDAVFSolver.h.

353  {
354  const SVFGNode* node = oldDpm.getLoc();
355  NodeID obj = oldDpm.getCurNodeID();
356  if (_pag->isConstantObj(obj))
357  return;
358  const SVFGEdgeSet edgeSet(node->getInEdges());
359  for (SVFGNode::const_iterator it = edgeSet.begin(), eit = edgeSet.end(); it != eit; ++it)
360  {
361  if(const IndirectSVFGEdge* indirEdge = SVFUtil::dyn_cast<IndirectSVFGEdge>(*it))
362  {
363  const NodeBS& guard = indirEdge->getPointsTo();
364  if(guard.test(obj))
365  {
366  DBOUT(DDDA, SVFUtil::outs() << "\t\t==backtrace indirectVF svfgNode " <<
367  indirEdge->getDstID() << " --> " << indirEdge->getSrcID() << "\n");
368  backwardPropDpm(pts,oldDpm.getCurNodeID(),oldDpm,indirEdge);
369  }
370  }
371  }
372  }
bool isConstantObj(NodeID id) const
Definition: SVFIR.h:443
u32_t NodeID
Definition: GeneralType.h:55
SparseBitVector NodeBS
Definition: GeneralType.h:62

◆ backtraceToStoreSrc()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::backtraceToStoreSrc ( CPtSet &  pts,
const DPIm &  oldDpm 
)
inlineprotected

Definition at line 413 of file DDAVFSolver.h.

414  {
415  const StoreSVFGNode* store = SVFUtil::cast<StoreSVFGNode>(oldDpm.getLoc());
416  const SVFGNode* storeSrc = getDefSVFGNode(store->getPAGSrcNode());
417  DBOUT(DDDA, SVFUtil::outs() << "++backtrace to storeSrc from svfgNode " << getLoadDpm(oldDpm).getLoc()->getId() << " to "<<
418  store->getId() << " to " << storeSrc->getId() <<"\n");
419  const SVFGEdge* edge = getSVFG()->getIntraVFGEdge(storeSrc,store,SVFGEdge::IntraDirectVF);
420  assert(edge && "Edge not found!!");
421  backwardPropDpm(pts,store->getPAGSrcNodeID(),oldDpm,edge);
422  }
const SVFGNode * getDefSVFGNode(const PAGNode *pagNode) const
GetDefinition SVFG.
Definition: DDAVFSolver.h:347
const DPIm & getLoadDpm(const DPIm &dpm) const
Definition: DDAVFSolver.h:695
@ IntraDirectVF
Definition: VFGEdge.h:53
VFGEdge * getIntraVFGEdge(const VFGNode *src, const VFGNode *dst, VFGEdge::VFGEdgeK kind)
Get a SVFG edge according to src and dst.
Definition: VFG.cpp:928
StoreVFGNode StoreSVFGNode
Definition: SVFG.h:53
VFGEdge SVFGEdge
Definition: SVFG.h:40

◆ backwardPropDpm()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::backwardPropDpm ( CPtSet &  pts,
NodeID  ptr,
const DPIm &  oldDpm,
const SVFGEdge edge 
)
inlineprotectedvirtual

dpm transit during backward tracing

handle context-/path- sensitivity

record the source of load dpm

handle out of budget case

Definition at line 426 of file DDAVFSolver.h.

427  {
428  DPIm dpm(oldDpm);
429  dpm.setLocVar(edge->getSrcNode(),ptr);
430  DOTIMESTAT(double start = DDAStat::getClk(true));
432  if(handleBKCondition(dpm,edge)==false)
433  {
435  DBOUT(DDDA, SVFUtil::outs() << "\t!!! infeasible path svfgNode: " << edge->getDstID() << " --| " << edge->getSrcID() << "\n");
437  return;
438  }
439 
441  if(SVFUtil::isa<IndirectSVFGEdge>(edge))
442  addLoadDpmAndCVar(dpm,getLoadDpm(oldDpm),getLoadCVar(oldDpm));
443 
446  unionDDAPts(pts,findPT(dpm));
447  }
#define DOSTAT(X)
Definition: SVFType.h:485
#define DOTIMESTAT(X)
Definition: SVFType.h:486
u32_t _NumOfDPM
Definition: DDAStat.h:54
u32_t _NumOfInfeasiblePath
Definition: DDAStat.h:57
double _TotalTimeOfBKCondition
Definition: DDAStat.h:64
void addLoadDpmAndCVar(const DPIm &dpm, const DPIm &loadDpm, const CVar &loadVar)
LoadDpm for must-alias analysis.
Definition: DDAVFSolver.h:681
virtual const CPtSet & findPT(const DPIm &dpm)
Compute points-to.
Definition: DDAVFSolver.h:138
virtual bool handleBKCondition(DPIm &, const SVFGEdge *)
Handle condition for context or path analysis (backward analysis)
Definition: DDAVFSolver.h:529
virtual bool unionDDAPts(CPtSet &pts, const CPtSet &targetPts)
Union pts.
Definition: DDAVFSolver.h:102
const CVar & getLoadCVar(const DPIm &dpm) const
Definition: DDAVFSolver.h:709
static double getClk(bool mark=false)
Definition: SVFStat.cpp:47

◆ buildSVFG()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::buildSVFG ( SVFIR pag)
inlineprotectedvirtual

Build SVFG.

Definition at line 317 of file DDAVFSolver.h.

318  {
321  _pag = _svfg->getPAG();
322  }
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
Definition: Andersen.h:408
SVFGBuilder svfgBuilder
SVFG Builder.
Definition: DDAVFSolver.h:790
SVFG * buildPTROnlySVFG(BVDataPTAImpl *pta)
Definition: SVFGBuilder.cpp:41
SVFIR * getPAG() const
Return SVFIR.
Definition: VFG.h:133

◆ clearbkVisited()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::clearbkVisited ( const DPIm &  dpm)
inlineprotected

Definition at line 547 of file DDAVFSolver.h.

548  {
549  assert(backwardVisited.find(dpm)!=backwardVisited.end() && "dpm not found!");
550  backwardVisited.erase(dpm);
551  }
DPTItemSet backwardVisited
visited map during backward traversing
Definition: DDAVFSolver.h:781

◆ dumpCPtSet()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::dumpCPtSet ( const CPtSet &  cpts) const
inline

Definition at line 128 of file DDAVFSolver.h.

129  {
130  SVFUtil::outs() << "{";
131  for(typename CPtSet::iterator it = cpts.begin(), eit = cpts.end(); it!=eit; ++it)
132  {
133  SVFUtil::outs() << (*it) << " ";
134  }
135  SVFUtil::outs() << "}\n";
136  }

◆ edgeInSVFGSCC()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::edgeInSVFGSCC ( const SVFGEdge edge)
inlineprotected

Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the SVFG.

Definition at line 622 of file DDAVFSolver.h.

623  {
624  return (getSVFGSCCRepNode(edge->getSrcID()) == getSVFGSCCRepNode(edge->getDstID()));
625  }
NodeID getSVFGSCCRepNode(NodeID id)
Get SCC rep node of a SVFG node.
Definition: DDAVFSolver.h:612

◆ findPT()

template<class CVar , class CPtSet , class DPIm >
virtual const CPtSet& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::findPT ( const DPIm &  dpm)
inlinevirtual

Compute points-to.

Add successors of current stmt if its pts has been changed.

Definition at line 138 of file DDAVFSolver.h.

139  {
140 
141  if(isbkVisited(dpm))
142  {
143  const CPtSet& cpts = getCachedPointsTo(dpm);
144  DBOUT(DDDA, SVFUtil::outs() << "\t already backward visited dpm: ");
145  DBOUT(DDDA, dpm.dump());
146  DBOUT(DDDA, SVFUtil::outs() << "\t return points-to: ");
147  DBOUT(DDDA, dumpCPtSet(cpts));
148  return cpts;
149  }
150 
151  DBOUT(DDDA, SVFUtil::outs() << "\t backward visit dpm: ");
152  DBOUT(DDDA, dpm.dump());
153  markbkVisited(dpm);
154  addDpmToLoc(dpm);
155 
156  if(testOutOfBudget(dpm) == false)
157  {
158 
159  CPtSet pts;
160  handleSingleStatement(dpm, pts);
161 
163  updateCachedPointsTo(dpm, pts);
164  }
165  return getCachedPointsTo(dpm);
166  }
virtual void updateCachedPointsTo(const DPIm &dpm, const CPtSet &pts)
Definition: DDAVFSolver.h:563
bool testOutOfBudget(const DPIm &dpm)
Definition: DDAVFSolver.h:725
void markbkVisited(const DPIm &dpm)
Visited flags to avoid cycles.
Definition: DDAVFSolver.h:539
virtual void handleSingleStatement(const DPIm &dpm, CPtSet &pts)
Handle single statement.
Definition: DDAVFSolver.h:170
bool isbkVisited(const DPIm &dpm)
Definition: DDAVFSolver.h:543
void dumpCPtSet(const CPtSet &cpts) const
Definition: DDAVFSolver.h:128
virtual const CPtSet & getCachedPointsTo(const DPIm &dpm)
Points-to Caching for top-level pointers and address-taken objects.
Definition: DDAVFSolver.h:556
void addDpmToLoc(const DPIm &dpm)
Definition: DDAVFSolver.h:668

◆ getAndersenAnalysis()

template<class CVar , class CPtSet , class DPIm >
AndersenWaveDiff* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getAndersenAnalysis ( ) const
inlineprotected

Return Andersen's analysis.

Definition at line 717 of file DDAVFSolver.h.

718  {
719  return _ander;
720  }

◆ getCachedADPointsTo()

template<class CVar , class CPtSet , class DPIm >
virtual const CPtSet& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getCachedADPointsTo ( const DPIm &  dpm)
inlineprotectedvirtual

Definition at line 576 of file DDAVFSolver.h.

577  {
578  return dpmToADCPtSetMap[dpm];
579  }
DPImToCPtSetMap dpmToADCPtSetMap
points-to caching map for address-taken vars
Definition: DDAVFSolver.h:783

◆ getCachedPointsTo()

template<class CVar , class CPtSet , class DPIm >
virtual const CPtSet& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getCachedPointsTo ( const DPIm &  dpm)
inlineprotectedvirtual

Points-to Caching for top-level pointers and address-taken objects.

Definition at line 556 of file DDAVFSolver.h.

557  {
558  if (isTopLevelPtrStmt(dpm.getLoc()))
559  return getCachedTLPointsTo(dpm);
560  else
561  return getCachedADPointsTo(dpm);
562  }
virtual const CPtSet & getCachedADPointsTo(const DPIm &dpm)
Definition: DDAVFSolver.h:576
bool isTopLevelPtrStmt(const SVFGNode *stmt)
Whether this is a top-level pointer statement.
Definition: DDAVFSolver.h:583
virtual const CPtSet & getCachedTLPointsTo(const DPIm &dpm)
Definition: DDAVFSolver.h:572

◆ getCachedTLPointsTo()

template<class CVar , class CPtSet , class DPIm >
virtual const CPtSet& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getCachedTLPointsTo ( const DPIm &  dpm)
inlineprotectedvirtual

Reimplemented in SVF::FlowDDA.

Definition at line 572 of file DDAVFSolver.h.

573  {
574  return dpmToTLCPtSetMap[dpm];
575  }
DPImToCPtSetMap dpmToTLCPtSetMap
points-to caching map for top-level vars
Definition: DDAVFSolver.h:782

◆ getCandidateQueries()

template<class CVar , class CPtSet , class DPIm >
NodeBS& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getCandidateQueries ( )
inline

Return candidate pointers for DDA.

Definition at line 91 of file DDAVFSolver.h.

92  {
93  return candidateQueries;
94  }
NodeBS candidateQueries
candidate pointers;
Definition: DDAVFSolver.h:777

◆ getConservativeCPts()

template<class CVar , class CPtSet , class DPIm >
virtual CPtSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getConservativeCPts ( const DPIm &  dpm)
protectedpure virtual

Get conservative points-to results when the query is out of budget.

Implemented in SVF::FlowDDA, and SVF::ContextDDA.

◆ getDefSVFGNode()

template<class CVar , class CPtSet , class DPIm >
const SVFGNode* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getDefSVFGNode ( const PAGNode pagNode) const
inlineprotected

GetDefinition SVFG.

Definition at line 347 of file DDAVFSolver.h.

348  {
349  return getSVFG()->getDefSVFGNode(pagNode);
350  }
const SVFGNode * getDefSVFGNode(const PAGNode *pagNode) const
Given a pagNode, return its definition site.
Definition: SVFG.h:171

◆ getDPIm()

template<class CVar , class CPtSet , class DPIm >
virtual DPIm SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getDPIm ( const CVar &  var,
const SVFGNode loc 
) const
inlinevirtual

Given CVar and location (SVFGNode) return a new DPItem.

Definition at line 96 of file DDAVFSolver.h.

97  {
98  DPIm dpm(var,loc);
99  return dpm;
100  }

◆ getDPImWithOldCond()

template<class CVar , class CPtSet , class DPIm >
virtual DPIm SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getDPImWithOldCond ( const DPIm &  oldDpm,
const CVar &  var,
const SVFGNode loc 
)
inlineprotectedvirtual

Return dpm with old context and path conditions.

Definition at line 588 of file DDAVFSolver.h.

589  {
590  DPIm dpm(oldDpm);
591  dpm.setLocVar(loc,getPtrNodeID(var));
592 
593  if(SVFUtil::isa<StoreSVFGNode>(loc))
594  addLoadDpmAndCVar(dpm,getLoadDpm(oldDpm),var);
595 
596  if(SVFUtil::isa<LoadSVFGNode>(loc))
597  addLoadDpmAndCVar(dpm,oldDpm,var);
598 
600  return dpm;
601  }
virtual NodeID getPtrNodeID(const CVar &var) const =0
Methods to be implemented in child class.

◆ getDpmSetAtLoc()

template<class CVar , class CPtSet , class DPIm >
const DPTItemSet& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getDpmSetAtLoc ( const SVFGNode loc)
inlineprivate

Definition at line 664 of file DDAVFSolver.h.

665  {
666  return locToDpmSetMap[loc->getId()];
667  }

◆ getLoadCVar()

template<class CVar , class CPtSet , class DPIm >
const CVar& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getLoadCVar ( const DPIm &  dpm) const
inlineprotected

Definition at line 709 of file DDAVFSolver.h.

710  {
711  typename DPMToCVarMap::const_iterator it = loadToPTCVarMap.find(dpm);
712  assert(it!=loadToPTCVarMap.end() && "not found??");
713  return it->second;
714  }

◆ getLoadDpm()

template<class CVar , class CPtSet , class DPIm >
const DPIm& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getLoadDpm ( const DPIm &  dpm) const
inlineprotected

Definition at line 695 of file DDAVFSolver.h.

696  {
697  typename DPMToDPMMap::const_iterator it = dpmToloadDpmMap.find(dpm);
698  assert(it!=dpmToloadDpmMap.end() && "not found??");
699  return it->second;
700  }

◆ getLocToDPMVecMap()

template<class CVar , class CPtSet , class DPIm >
const LocToDPMVecMap& SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getLocToDPMVecMap ( ) const
inlineprivate

Map a SVFGNode to its dpms for handling value-flow cycles.

Definition at line 660 of file DDAVFSolver.h.

661  {
662  return locToDpmSetMap;
663  }

◆ getPtrNodeID()

template<class CVar , class CPtSet , class DPIm >
virtual NodeID SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getPtrNodeID ( const CVar &  var) const
protectedpure virtual

Methods to be implemented in child class.

Get variable ID (PAGNodeID) according to CVar

Implemented in SVF::FlowDDA, and SVF::ContextDDA.

◆ getSVFG()

template<class CVar , class CPtSet , class DPIm >
SVFG* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getSVFG ( ) const
inline

Return SVFG.

Definition at line 118 of file DDAVFSolver.h.

119  {
120  return _svfg;
121  }

◆ getSVFGSCC()

template<class CVar , class CPtSet , class DPIm >
SVFGSCC* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getSVFGSCC ( ) const
inline

Return SVFGSCC.

Definition at line 123 of file DDAVFSolver.h.

124  {
125  return _svfgSCC;
126  }

◆ getSVFGSCCRepNode()

template<class CVar , class CPtSet , class DPIm >
NodeID SVF::DDAVFSolver< CVar, CPtSet, DPIm >::getSVFGSCCRepNode ( NodeID  id)
inlineprotected

Get SCC rep node of a SVFG node.

Definition at line 612 of file DDAVFSolver.h.

613  {
614  return _svfgSCC->repNode(id);
615  }
NodeID repNode(NodeID n) const
get the rep node if not found return itself
Definition: SCC.h:139

◆ handleAddr()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::handleAddr ( CPtSet &  pts,
const DPIm &  dpm,
const AddrSVFGNode addr 
)
protectedpure virtual

Handle AddrSVFGNode to add proper points-to.

Implemented in SVF::FlowDDA, and SVF::ContextDDA.

◆ handleBKCondition()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::handleBKCondition ( DPIm &  ,
const SVFGEdge  
)
inlineprotectedvirtual

Handle condition for context or path analysis (backward analysis)

Reimplemented in SVF::FlowDDA, and SVF::ContextDDA.

Definition at line 529 of file DDAVFSolver.h.

530  {
531  return true;
532  }

◆ handleOutOfBudgetDpm()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::handleOutOfBudgetDpm ( const DPIm &  dpm)
inlineprotected

handle out-of-budget queries

Handle out-of-budget dpm

Definition at line 724 of file DDAVFSolver.h.

724 {}

◆ handleSingleStatement()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::handleSingleStatement ( const DPIm &  dpm,
CPtSet &  pts 
)
inlineprotectedvirtual

Handle single statement.

resolve function pointer first at indirect callsite

Definition at line 170 of file DDAVFSolver.h.

171  {
173  resolveFunPtr(dpm);
174 
175  const SVFGNode* node = dpm.getLoc();
176  if(SVFUtil::isa<AddrSVFGNode>(node))
177  {
178  handleAddr(pts,dpm,SVFUtil::cast<AddrSVFGNode>(node));
179  }
183  {
184  backtraceAlongDirectVF(pts,dpm);
185  }
186  else if(SVFUtil::isa<GepSVFGNode>(node))
187  {
188  CPtSet gepPts;
189  backtraceAlongDirectVF(gepPts,dpm);
190  unionDDAPts(pts, processGepPts(SVFUtil::cast<GepSVFGNode>(node),gepPts));
191  }
192  else if(const LoadSVFGNode* load = SVFUtil::dyn_cast<LoadSVFGNode>(node))
193  {
194  if(load->getPAGDstNode()->isPointer() == false)
195  return;
196 
197  CPtSet loadpts;
198  startNewPTCompFromLoadSrc(loadpts,dpm);
199  for(typename CPtSet::iterator it = loadpts.begin(), eit = loadpts.end(); it!=eit; ++it)
200  {
201  backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,load));
202  }
203  }
204  else if(const StoreSVFGNode* store = SVFUtil::dyn_cast<StoreSVFGNode>(node))
205  {
206  if(store->getPAGSrcNode()->isPointer() == false)
207  return;
208 
209  if(isMustAlias(getLoadDpm(dpm),dpm))
210  {
211  DBOUT(DDDA, SVFUtil::outs() << "+++must alias for load and store:");
212  DBOUT(DDDA, getLoadDpm(dpm).dump());
213  DBOUT(DDDA, dpm.dump());
214  DBOUT(DDDA, SVFUtil::outs() << "+++\n");
216  backtraceToStoreSrc(pts,dpm);
217  }
218  else
219  {
220  CPtSet storepts;
221  startNewPTCompFromStoreDst(storepts,dpm);
222  for(typename CPtSet::iterator it = storepts.begin(), eit = storepts.end(); it!=eit; ++it)
223  {
224  if(propagateViaObj(*it,getLoadCVar(dpm)))
225  {
226  backtraceToStoreSrc(pts,getDPImWithOldCond(dpm,*it,store));
227 
228  if(isStrongUpdate(storepts,store))
229  {
230  DBOUT(DDDA, SVFUtil::outs() << "backward strong update for obj " << dpm.getCurNodeID() << "\n");
231  DOSTAT(addSUStat(dpm,store);)
232  }
233  else
234  {
235  DOSTAT(rmSUStat(dpm,store);)
236  backtraceAlongIndirectVF(pts,getDPImWithOldCond(dpm,*it,store));
237  }
238  }
239  else
240  {
241  backtraceAlongIndirectVF(pts,dpm);
242  }
243  }
244  }
245  }
246  else if(SVFUtil::isa<MRSVFGNode>(node))
247  {
248  backtraceAlongIndirectVF(pts,dpm);
249  }
250  else
251  assert(false && "unexpected kind of SVFG nodes");
252  }
u32_t _NumOfMustAliases
Definition: DDAStat.h:56
void backtraceAlongIndirectVF(CPtSet &pts, const DPIm &oldDpm)
Backward traverse along indirect value flows.
Definition: DDAVFSolver.h:352
virtual bool isMustAlias(const DPIm &, const DPIm &)
whether load and store are aliased
Definition: DDAVFSolver.h:449
void backtraceAlongDirectVF(CPtSet &pts, const DPIm &oldDpm)
Backward traverse along direct value flows.
Definition: DDAVFSolver.h:374
void rmSUStat(const DPIm &dpm, const SVFGNode *node)
remove strong updates num if the dpm goes to weak updates branch
Definition: DDAVFSolver.h:762
virtual bool isStrongUpdate(const CPtSet &dstCPSet, const StoreSVFGNode *store)
Return TRUE if this is a strong update STORE statement.
Definition: DDAVFSolver.h:454
virtual CPtSet processGepPts(const GepSVFGNode *gep, const CPtSet &srcPts)=0
ProcessGep node to generate field object nodes of a struct.
virtual DPIm getDPImWithOldCond(const DPIm &oldDpm, const CVar &var, const SVFGNode *loc)
Return dpm with old context and path conditions.
Definition: DDAVFSolver.h:588
void startNewPTCompFromLoadSrc(CPtSet &pts, const DPIm &oldDpm)
Definition: DDAVFSolver.h:392
virtual bool propagateViaObj(const CVar &storeObj, const CVar &loadObj)
If the points-to contain the object obj, we could move forward along indirect value-flow edge.
Definition: DDAVFSolver.h:487
virtual void handleAddr(CPtSet &pts, const DPIm &dpm, const AddrSVFGNode *addr)=0
Handle AddrSVFGNode to add proper points-to.
void backtraceToStoreSrc(CPtSet &pts, const DPIm &oldDpm)
Definition: DDAVFSolver.h:413
void addSUStat(const DPIm &dpm, const SVFGNode *node)
stat strong updates num
Definition: DDAVFSolver.h:753
void resolveFunPtr(const DPIm &dpm)
resolve function pointer
Definition: DDAVFSolver.h:492
void startNewPTCompFromStoreDst(CPtSet &pts, const DPIm &oldDpm)
Definition: DDAVFSolver.h:403
LLVM_NODISCARD bool isa(const Y &Val)
Definition: Casting.h:241
ActualParmVFGNode ActualParmSVFGNode
Definition: SVFG.h:44
LoadVFGNode LoadSVFGNode
Definition: SVFG.h:54
PHIVFGNode PHISVFGNode
Definition: SVFG.h:56
ActualRetVFGNode ActualRetSVFGNode
Definition: SVFG.h:45
void dump(const SparseBitVector< ElementSize > &LHS, std::ostream &out)
CopyVFGNode CopySVFGNode
Definition: SVFG.h:52
FormalParmVFGNode FormalParmSVFGNode
Definition: SVFG.h:46
FormalRetVFGNode FormalRetSVFGNode
Definition: SVFG.h:47
NullPtrVFGNode NullPtrSVFGNode
Definition: SVFG.h:49

◆ isArrayCondMemObj()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isArrayCondMemObj ( const CVar &  var) const
inlineprotected

Definition at line 645 of file DDAVFSolver.h.

646  {
647  const MemObj* mem = _pag->getObject(getPtrNodeID(var));
648  assert(mem && "memory object is null??");
649  return mem->isArray();
650  }
const MemObj * getObject(NodeID id) const
Definition: SVFIR.h:395

◆ isbkVisited()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isbkVisited ( const DPIm &  dpm)
inlineprotected

Definition at line 543 of file DDAVFSolver.h.

544  {
545  return backwardVisited.find(dpm)!=backwardVisited.end();
546  }

◆ isFieldInsenCondMemObj()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isFieldInsenCondMemObj ( const CVar &  var) const
inlineprotected

Definition at line 651 of file DDAVFSolver.h.

652  {
653  const MemObj* mem = _pag->getBaseObj(getPtrNodeID(var));
654  return mem->isFieldInsensitive();
655  }
bool isFieldInsensitive() const
Return true if its field limit is 0.
const MemObj * getBaseObj(NodeID id) const
Definition: SVFIR.h:459

◆ isHeapCondMemObj()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isHeapCondMemObj ( const CVar &  var,
const StoreSVFGNode  
)
inlineprotectedvirtual

Check heap and array object.

Reimplemented in SVF::FlowDDA, and SVF::ContextDDA.

Definition at line 638 of file DDAVFSolver.h.

639  {
640  const MemObj* mem = _pag->getObject(getPtrNodeID(var));
641  assert(mem && "memory object is null??");
642  return mem->isHeap();
643  }

◆ isLocalCVarInRecursion()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isLocalCVarInRecursion ( const CVar &  var) const
inlineprotectedvirtual

Whether a local variable is in function recursions.

Definition at line 471 of file DDAVFSolver.h.

472  {
473  NodeID id = getPtrNodeID(var);
474  const MemObj* obj = _pag->getObject(id);
475  assert(obj && "object not found!!");
476  if(obj->isStack())
477  {
478  if(const SVFFunction* svffun = _pag->getGNode(id)->getFunction())
479  {
481  }
482  }
483  return false;
484  }
NodeType * getGNode(NodeID id) const
Get a node.
Definition: GenericGraph.h:653
PTACallGraphNode * getCallGraphNode(NodeID id) const
Get call graph node.
Definition: PTACallGraph.h:339
bool isInCycle(NodeID n) const
whether the node is in a cycle
Definition: SCC.h:149
NodeID getId() const
Get ID.
Definition: GenericGraph.h:260
virtual const SVFFunction * getFunction() const
Return the function that this SVFVar resides in. Return nullptr if it is a global or constantexpr nod...
Definition: SVFVariables.h:122

◆ isMustAlias()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isMustAlias ( const DPIm &  ,
const DPIm &   
)
inlineprotectedvirtual

whether load and store are aliased

Definition at line 449 of file DDAVFSolver.h.

450  {
451  return false;
452  }

◆ isOutOfBudgetDpm()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isOutOfBudgetDpm ( const DPIm &  dpm) const
inlineprotected

Definition at line 740 of file DDAVFSolver.h.

741  {
742  return outOfBudgetDpms.find(dpm) != outOfBudgetDpms.end();
743  }

◆ isOutOfBudgetQuery()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isOutOfBudgetQuery ( ) const
inlineprotected

Definition at line 732 of file DDAVFSolver.h.

733  {
734  return outOfBudgetQuery;
735  }

◆ isStrongUpdate()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isStrongUpdate ( const CPtSet &  dstCPSet,
const StoreSVFGNode store 
)
inlineprotectedvirtual

Return TRUE if this is a strong update STORE statement.

Find the unique element in cpts

Definition at line 454 of file DDAVFSolver.h.

455  {
456  if (dstCPSet.count() == 1)
457  {
459  typename CPtSet::iterator it = dstCPSet.begin();
460  const CVar& var = *it;
461  // Strong update can be made if this points-to target is not heap, array or field-insensitive.
462  if (!isHeapCondMemObj(var,store) && !isArrayCondMemObj(var)
464  {
465  return true;
466  }
467  }
468  return false;
469  }
virtual bool isLocalCVarInRecursion(const CVar &var) const
Whether a local variable is in function recursions.
Definition: DDAVFSolver.h:471
bool isFieldInsenCondMemObj(const CVar &var) const
Definition: DDAVFSolver.h:651
virtual bool isHeapCondMemObj(const CVar &var, const StoreSVFGNode *)
Check heap and array object.
Definition: DDAVFSolver.h:638
bool isArrayCondMemObj(const CVar &var) const
Definition: DDAVFSolver.h:645

◆ isSVFGNodeInCycle()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isSVFGNodeInCycle ( const SVFGNode node)
inlineprotected

Return whether this SVFGNode is in cycle.

Definition at line 617 of file DDAVFSolver.h.

618  {
619  return _svfgSCC->isInCycle(node->getId());
620  }

◆ isTopLevelPtrStmt()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::isTopLevelPtrStmt ( const SVFGNode stmt)
inlineprotected

Whether this is a top-level pointer statement.

Definition at line 583 of file DDAVFSolver.h.

584  {
585  return !SVFUtil::isa<StoreSVFGNode, MRSVFGNode>(stmt);
586  }

◆ markbkVisited()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::markbkVisited ( const DPIm &  dpm)
inlineprotected

Visited flags to avoid cycles.

Definition at line 539 of file DDAVFSolver.h.

540  {
541  backwardVisited.insert(dpm);
542  }

◆ OOBResetVisited()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::OOBResetVisited ( )
inlineprotected

Reset visited map if the current query is out-of-budget.

Definition at line 336 of file DDAVFSolver.h.

337  {
338  for(typename LocToDPMVecMap::const_iterator it = locToDpmSetMap.begin(),eit = locToDpmSetMap.end(); it!=eit; ++it)
339  {
340  DPTItemSet dpmSet(it->second.begin(), it->second.end());
341  for(typename DPTItemSet::const_iterator dit = dpmSet.begin(),deit=dpmSet.end(); dit!=deit; ++dit)
342  if(isOutOfBudgetDpm(*dit)==false)
343  clearbkVisited(*dit);
344  }
345  }
OrderedSet< DPIm > DPTItemSet
Definition: DDAVFSolver.h:55
bool isOutOfBudgetDpm(const DPIm &dpm) const
Definition: DDAVFSolver.h:740
void clearbkVisited(const DPIm &dpm)
Definition: DDAVFSolver.h:547

◆ processGepPts()

template<class CVar , class CPtSet , class DPIm >
virtual CPtSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::processGepPts ( const GepSVFGNode gep,
const CPtSet &  srcPts 
)
protectedpure virtual

ProcessGep node to generate field object nodes of a struct.

Implemented in SVF::FlowDDA, and SVF::ContextDDA.

◆ propagateViaObj()

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::propagateViaObj ( const CVar &  storeObj,
const CVar &  loadObj 
)
inlineprotectedvirtual

If the points-to contain the object obj, we could move forward along indirect value-flow edge.

Reimplemented in SVF::ContextDDA.

Definition at line 487 of file DDAVFSolver.h.

488  {
489  return getPtrNodeID(storeObj) == getPtrNodeID(loadObj);
490  }

◆ reCompute()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::reCompute ( const DPIm &  dpm)
inlineprotected

recompute points-to for value-flow cycles and indirect calls

re-compute due to indirect calls

callgraph scc detection for local variable in recursion

re-compute for transitive closures

Definition at line 255 of file DDAVFSolver.h.

256  {
258  SVFGEdgeSet newIndirectEdges;
259  if(_pag->isFunPtr(dpm.getCurNodeID()))
260  {
261  const CallSiteSet& csSet = _pag->getIndCallSites(dpm.getCurNodeID());
262  for(CallSiteSet::const_iterator it = csSet.begin(), eit = csSet.end(); it!=eit; ++it)
263  updateCallGraphAndSVFG(dpm, (*it),newIndirectEdges);
264  }
266  if(!newIndirectEdges.empty())
267  _callGraphSCC->find();
268  reComputeForEdges(dpm,newIndirectEdges,true);
269 
271  SVFGEdgeSet edgeSet(dpm.getLoc()->getOutEdges());
272  reComputeForEdges(dpm,edgeSet,false);
273  }
SVFIR::CallSiteSet CallSiteSet
Definition: DDAVFSolver.h:54
virtual void updateCallGraphAndSVFG(const DPIm &, const CallICFGNode *, SVFGEdgeSet &)
Update call graph.
Definition: DDAVFSolver.h:534
void reComputeForEdges(const DPIm &dpm, const SVFGEdgeSet &edgeSet, bool indirectCall=false)
Traverse along out edges to find all nodes which may be affected by locDPM.
Definition: DDAVFSolver.h:276
void find(void)
Definition: SCC.h:308
bool isFunPtr(NodeID id) const
Definition: SVFIR.h:370
const CallSiteSet & getIndCallSites(NodeID funPtr) const
Definition: SVFIR.h:360

◆ reComputeForEdges()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::reComputeForEdges ( const DPIm &  dpm,
const SVFGEdgeSet edgeSet,
bool  indirectCall = false 
)
inlineprotected

Traverse along out edges to find all nodes which may be affected by locDPM.

Only collect nodes we have traversed

Definition at line 276 of file DDAVFSolver.h.

277  {
278  for (SVFGNode::const_iterator it = edgeSet.begin(), eit = edgeSet.end(); it != eit; ++it)
279  {
280  const SVFGEdge* edge = *it;
281  const SVFGNode* dst = edge->getDstNode();
282  typename LocToDPMVecMap::const_iterator locIt = getLocToDPMVecMap().find(dst->getId());
284  if (locIt == getLocToDPMVecMap().end())
285  continue;
286  DPTItemSet dpmSet(locIt->second.begin(), locIt->second.end());
287  for(typename DPTItemSet::const_iterator it = dpmSet.begin(),eit = dpmSet.end(); it!=eit; ++it)
288  {
289  const DPIm& dstDpm = *it;
290  if(!indirectCall && SVFUtil::isa<IndirectSVFGEdge>(edge) && !SVFUtil::isa<LoadSVFGNode>(edge->getDstNode()))
291  {
292  if(dstDpm.getCurNodeID() == dpm.getCurNodeID())
293  {
294  DBOUT(DDDA,SVFUtil::outs() << "\t Recompute, forward from :");
295  DBOUT(DDDA, dpm.dump());
297  clearbkVisited(dstDpm);
298  findPT(dstDpm);
299  }
300  }
301  else
302  {
303  if(indirectCall)
304  DBOUT(DDDA,SVFUtil::outs() << "\t Recompute for indirect call from :");
305  else
306  DBOUT(DDDA,SVFUtil::outs() << "\t Recompute forward from :");
307  DBOUT(DDDA, dpm.dump());
309  clearbkVisited(dstDpm);
310  findPT(dstDpm);
311  }
312  }
313  }
314  }
u64_t _NumOfStepInCycle
Definition: DDAStat.h:60
const LocToDPMVecMap & getLocToDPMVecMap() const
Map a SVFGNode to its dpms for handling value-flow cycles.
Definition: DDAVFSolver.h:660

◆ removeDpmFromLoc()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::removeDpmFromLoc ( const DPIm &  dpm)
inlineprivate

Definition at line 672 of file DDAVFSolver.h.

673  {
674  assert(dpm == locToDpmSetMap[dpm.getLoc()].back() && "dpm not match with the end of vector");
675  locToDpmSetMap[dpm.getLoc()->getId()].erase(dpm);
676  }

◆ resetQuery()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::resetQuery ( )
inlineprotectedvirtual

Reset visited map for next points-to query.

Definition at line 324 of file DDAVFSolver.h.

325  {
326  if(outOfBudgetQuery)
327  OOBResetVisited();
328 
329  locToDpmSetMap.clear();
330  dpmToloadDpmMap.clear();
331  loadToPTCVarMap.clear();
332  outOfBudgetQuery = false;
333  ddaStat->_NumOfStep = 0;
334  }
u64_t _NumOfStep
Definition: DDAStat.h:59
void OOBResetVisited()
Reset visited map if the current query is out-of-budget.
Definition: DDAVFSolver.h:336

◆ resolveFunPtr()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::resolveFunPtr ( const DPIm &  dpm)
inlineprotected

resolve function pointer

use pre-analysis call graph to approximate all potential callsites

Definition at line 492 of file DDAVFSolver.h.

493  {
494  if(const CallICFGNode* cbn= getSVFG()->isCallSiteRetSVFGNode(dpm.getLoc()))
495  {
496  if(_pag->isIndirectCallSites(cbn))
497  {
498  NodeID funPtr = _pag->getFunPtr(cbn);
499  DPIm funPtrDpm(dpm);
500  funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getGNode(funPtr)),funPtr);
501  findPT(funPtrDpm);
502  }
503  }
504  else if(const SVFFunction* fun = getSVFG()->isFunEntrySVFGNode(dpm.getLoc()))
505  {
506  CallInstSet csSet;
509  for(CallInstSet::const_iterator it = csSet.begin(), eit = csSet.end(); it!=eit; ++it)
510  {
511  NodeID funPtr = _pag->getFunPtr(*it);
512  DPIm funPtrDpm(dpm);
513  funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getGNode(funPtr)),funPtr);
514  findPT(funPtrDpm);
515  }
516  }
517  }
PTACallGraphEdge::CallInstSet CallInstSet
Definition: DDAVFSolver.h:53
void getIndCallSitesInvokingCallee(const SVFFunction *callee, PTACallGraphEdge::CallInstSet &csSet)
PTACallGraph * getCallGraph() const
Return call graph.
NodeID getFunPtr(const CallICFGNode *cs) const
Definition: SVFIR.h:354
bool isIndirectCallSites(const CallICFGNode *cs) const
Definition: SVFIR.h:366

◆ rmSUStat()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::rmSUStat ( const DPIm &  dpm,
const SVFGNode node 
)
inlineprotected

remove strong updates num if the dpm goes to weak updates branch

Definition at line 762 of file DDAVFSolver.h.

763  {
764  DPTItemSet& dpmSet = storeToDPMs[node];
765  if (dpmSet.erase(dpm))
766  {
768  if(dpmSet.empty())
769  ddaStat->_StrongUpdateStores.reset(node->getId());
770  }
771  }
void reset(unsigned Idx)

◆ setCallGraph()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::setCallGraph ( PTACallGraph cg)
inlineprotected

Set callgraph.

Definition at line 627 of file DDAVFSolver.h.

628  {
629  _callGraph = cg;
630  }

◆ setCallGraphSCC()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::setCallGraphSCC ( CallGraphSCC scc)
inlineprotected

Set callgraphSCC.

Definition at line 632 of file DDAVFSolver.h.

633  {
634  _callGraphSCC = scc;
635  }

◆ setDDAStat()

template<class CVar , class CPtSet , class DPIm >
DDAStat* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::setDDAStat ( DDAStat s)
inlineprotected

Set DDAStat.

Definition at line 747 of file DDAVFSolver.h.

748  {
749  ddaStat = s;
750  return ddaStat;
751  }

◆ startNewPTCompFromLoadSrc()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::startNewPTCompFromLoadSrc ( CPtSet &  pts,
const DPIm &  oldDpm 
)
inlineprotected

Backward traverse for top-level pointers of load/store statements

Definition at line 392 of file DDAVFSolver.h.

393  {
394  const LoadSVFGNode* load = SVFUtil::cast<LoadSVFGNode>(oldDpm.getLoc());
395  const SVFGNode* loadSrc = getDefSVFGNode(load->getPAGSrcNode());
396  DBOUT(DDDA, SVFUtil::outs() << "!##start new computation from loadSrc svfgNode " <<
397  load->getId() << " --> " << loadSrc->getId() << "\n");
398  const SVFGEdge* edge = getSVFG()->getIntraVFGEdge(loadSrc,load,SVFGEdge::IntraDirectVF);
399  assert(edge && "Edge not found!!");
400  backwardPropDpm(pts,load->getPAGSrcNodeID(),oldDpm,edge);
401 
402  }

◆ startNewPTCompFromStoreDst()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::startNewPTCompFromStoreDst ( CPtSet &  pts,
const DPIm &  oldDpm 
)
inlineprotected

Definition at line 403 of file DDAVFSolver.h.

404  {
405  const StoreSVFGNode* store = SVFUtil::cast<StoreSVFGNode>(oldDpm.getLoc());
406  const SVFGNode* storeDst = getDefSVFGNode(store->getPAGDstNode());
407  DBOUT(DDDA, SVFUtil::outs() << "!##start new computation from storeDst svfgNode " <<
408  store->getId() << " --> " << storeDst->getId() << "\n");
409  const SVFGEdge* edge = getSVFG()->getIntraVFGEdge(storeDst,store,SVFGEdge::IntraDirectVF);
410  assert(edge && "Edge not found!!");
411  backwardPropDpm(pts,store->getPAGDstNodeID(),oldDpm,edge);
412  }

◆ SVFGSCCDetection()

template<class CVar , class CPtSet , class DPIm >
void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::SVFGSCCDetection ( )
inlineprotected

SVFG SCC detection.

Definition at line 603 of file DDAVFSolver.h.

604  {
605  if(_svfgSCC==nullptr)
606  {
607  _svfgSCC = new SVFGSCC(getSVFG());
608  }
609  _svfgSCC->find();
610  }
SCCDetection< SVFG * > SVFGSCC
Definition: DDAVFSolver.h:51

◆ testOutOfBudget()

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::testOutOfBudget ( const DPIm &  dpm)
inlineprotected

Definition at line 725 of file DDAVFSolver.h.

726  {
727  if(outOfBudgetQuery) return true;
728  if(++ddaStat->_NumOfStep > DPIm::getMaxBudget())
729  outOfBudgetQuery = true;
730  return isOutOfBudgetDpm(dpm) || outOfBudgetQuery;
731  }

◆ unionDDAPts() [1/2]

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::unionDDAPts ( CPtSet &  pts,
const CPtSet &  targetPts 
)
inlinevirtual

Union pts.

Definition at line 102 of file DDAVFSolver.h.

103  {
104  return (pts |= targetPts);
105  }

◆ unionDDAPts() [2/2]

template<class CVar , class CPtSet , class DPIm >
virtual bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::unionDDAPts ( DPIm  dpm,
const CPtSet &  targetPts 
)
inlinevirtual

Union pts.

Reimplemented in SVF::FlowDDA.

Definition at line 107 of file DDAVFSolver.h.

108  {
109  CPtSet& pts = isTopLevelPtrStmt(dpm.getLoc()) ? dpmToTLCPtSetMap[dpm] : dpmToADCPtSetMap[dpm];
110  return pts |= targetPts;
111  }

◆ updateCachedPointsTo()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::updateCachedPointsTo ( const DPIm &  dpm,
const CPtSet &  pts 
)
inlineprotectedvirtual

Definition at line 563 of file DDAVFSolver.h.

564  {
565  if (unionDDAPts(dpm, pts))
566  {
567  DOSTAT(double start = DDAStat::getClk(true));
568  reCompute(dpm);
570  }
571  }
double _AnaTimeCyclePerQuery
Definition: DDAStat.h:62
void reCompute(const DPIm &dpm)
recompute points-to for value-flow cycles and indirect calls
Definition: DDAVFSolver.h:255

◆ updateCallGraphAndSVFG()

template<class CVar , class CPtSet , class DPIm >
virtual void SVF::DDAVFSolver< CVar, CPtSet, DPIm >::updateCallGraphAndSVFG ( const DPIm &  ,
const CallICFGNode ,
SVFGEdgeSet  
)
inlineprotectedvirtual

Update call graph.

Reimplemented in SVF::FlowDDA, and SVF::ContextDDA.

Definition at line 534 of file DDAVFSolver.h.

534 {}

Friends And Related Function Documentation

◆ DDAStat

template<class CVar , class CPtSet , class DPIm >
friend class DDAStat
friend

Definition at line 49 of file DDAVFSolver.h.

Member Data Documentation

◆ _ander

template<class CVar , class CPtSet , class DPIm >
AndersenWaveDiff* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_ander
protected

Andersen's analysis.

Definition at line 776 of file DDAVFSolver.h.

◆ _callGraph

template<class CVar , class CPtSet , class DPIm >
PTACallGraph* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_callGraph
protected

PTACallGraph.

Definition at line 778 of file DDAVFSolver.h.

◆ _callGraphSCC

template<class CVar , class CPtSet , class DPIm >
CallGraphSCC* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_callGraphSCC
protected

SCC for PTACallGraph.

Definition at line 779 of file DDAVFSolver.h.

◆ _pag

template<class CVar , class CPtSet , class DPIm >
SVFIR* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_pag
protected

SVFIR.

Definition at line 774 of file DDAVFSolver.h.

◆ _svfg

template<class CVar , class CPtSet , class DPIm >
SVFG* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_svfg
protected

SVFG.

Definition at line 775 of file DDAVFSolver.h.

◆ _svfgSCC

template<class CVar , class CPtSet , class DPIm >
SVFGSCC* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::_svfgSCC
protected

SCC for SVFG.

Definition at line 780 of file DDAVFSolver.h.

◆ backwardVisited

template<class CVar , class CPtSet , class DPIm >
DPTItemSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::backwardVisited
protected

visited map during backward traversing

Definition at line 781 of file DDAVFSolver.h.

◆ candidateQueries

template<class CVar , class CPtSet , class DPIm >
NodeBS SVF::DDAVFSolver< CVar, CPtSet, DPIm >::candidateQueries
protected

candidate pointers;

Definition at line 777 of file DDAVFSolver.h.

◆ ddaStat

template<class CVar , class CPtSet , class DPIm >
DDAStat* SVF::DDAVFSolver< CVar, CPtSet, DPIm >::ddaStat
protected

DDA stat.

Definition at line 789 of file DDAVFSolver.h.

◆ dpmToADCPtSetMap

template<class CVar , class CPtSet , class DPIm >
DPImToCPtSetMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::dpmToADCPtSetMap
protected

points-to caching map for address-taken vars

Definition at line 783 of file DDAVFSolver.h.

◆ dpmToloadDpmMap

template<class CVar , class CPtSet , class DPIm >
DPMToDPMMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::dpmToloadDpmMap
protected

dpms at loads for may/must-alias analysis with stores

Definition at line 785 of file DDAVFSolver.h.

◆ dpmToTLCPtSetMap

template<class CVar , class CPtSet , class DPIm >
DPImToCPtSetMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::dpmToTLCPtSetMap
protected

points-to caching map for top-level vars

Definition at line 782 of file DDAVFSolver.h.

◆ loadToPTCVarMap

template<class CVar , class CPtSet , class DPIm >
DPMToCVarMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::loadToPTCVarMap
protected

map a load dpm to its cvar pointed by its pointer operand

Definition at line 786 of file DDAVFSolver.h.

◆ locToDpmSetMap

template<class CVar , class CPtSet , class DPIm >
LocToDPMVecMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::locToDpmSetMap
protected

map location to its dpms

Definition at line 784 of file DDAVFSolver.h.

◆ outOfBudgetDpms

template<class CVar , class CPtSet , class DPIm >
DPTItemSet SVF::DDAVFSolver< CVar, CPtSet, DPIm >::outOfBudgetDpms
protected

out of budget dpm set

Definition at line 787 of file DDAVFSolver.h.

◆ outOfBudgetQuery

template<class CVar , class CPtSet , class DPIm >
bool SVF::DDAVFSolver< CVar, CPtSet, DPIm >::outOfBudgetQuery
protected

Whether the current query is out of step limits.

Definition at line 773 of file DDAVFSolver.h.

◆ storeToDPMs

template<class CVar , class CPtSet , class DPIm >
StoreToPMSetMap SVF::DDAVFSolver< CVar, CPtSet, DPIm >::storeToDPMs
protected

map store to set of DPM which have been stong updated there

Definition at line 788 of file DDAVFSolver.h.

◆ svfgBuilder

template<class CVar , class CPtSet , class DPIm >
SVFGBuilder SVF::DDAVFSolver< CVar, CPtSet, DPIm >::svfgBuilder
protected

SVFG Builder.

Definition at line 790 of file DDAVFSolver.h.


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