Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::ContextDDA Class Reference

#include <ContextDDA.h>

Inheritance diagram for SVF::ContextDDA:
SVF::CondPTAImpl< ContextCond > SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem > SVF::PointerAnalysis

Public Member Functions

 ContextDDA (SVFIR *_pag, DDAClient *client)
 Constructor.
virtual ~ContextDDA ()
 Destructor.
virtual void initialize () override
 Initialization of the analysis.
virtual void finalize () override
 Finalize analysis.
virtual void analyze () override
 dummy analyze method
virtual void computeDDAPts (NodeID id) override
 Compute points-to set for an unconditional pointer.
virtual const CxtPtSet & computeDDAPts (const CxtVar &cxtVar)
 Compute points-to set for a context-sensitive pointer.
void handleOutOfBudgetDpm (const CxtLocDPItem &dpm)
 Handle out-of-budget dpm.
virtual CxtPtSet getConservativeCPts (const CxtLocDPItem &dpm) override
 Override parent method.
virtual NodeID getPtrNodeID (const CxtVar &var) const override
 Override parent method.
virtual bool handleBKCondition (CxtLocDPItem &dpm, const SVFGEdge *edge) override
 Handle condition for context or path analysis (backward analysis).
virtual bool isHeapCondMemObj (const CxtVar &var, const StoreSVFGNode *store) override
bool testIndCallReachability (CxtLocDPItem &dpm, const FunObjVar *callee, const CallICFGNode *cs)
 refine indirect call edge
CallSiteID getCSIDAtCall (CxtLocDPItem &dpm, const SVFGEdge *edge)
 get callsite id from call, return 0 if it is a spurious call edge
CallSiteID getCSIDAtRet (CxtLocDPItem &dpm, const SVFGEdge *edge)
 get callsite id from return, return 0 if it is a spurious return edge
virtual void popRecursiveCallSites (CxtLocDPItem &dpm)
 Pop recursive callsites.
virtual bool isEdgeInRecursion (CallSiteID csId)
 Whether call/return inside recursion.
virtual void updateCallGraphAndSVFG (const CxtLocDPItem &dpm, const CallICFGNode *cs, SVFGEdgeSet &svfgEdges) override
 Update call graph.
bool edgeInCallGraphSCC (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.
virtual CxtPtSet processGepPts (const GepSVFGNode *gep, const CxtPtSet &srcPts) override
 processGep node
virtual void handleAddr (CxtPtSet &pts, const CxtLocDPItem &dpm, const AddrSVFGNode *addr) override
 Handle Address SVFGNode to add proper conditional points-to.
virtual bool propagateViaObj (const CxtVar &storeObj, const CxtVar &loadObj) override
 Propagate along indirect value-flow if two objects of load and store are same.
virtual bool isCondCompatible (const ContextCond &cxt1, const ContextCond &cxt2, bool singleton) const override
bool isInsensitiveCallRet (const SVFGEdge *edge)
 Whether this edge is treated context-insensitively.
ConstSVFGEdgeSet & getInsensitiveEdgeSet ()
 Return insensitive edge set.
virtual void dumpContexts (const ContextCond &cxts)
 dump context call strings
virtual const std::string PTAName () const override
 Return PTA name.
Public Member Functions inherited from SVF::CondPTAImpl< ContextCond >
 CondPTAImpl (SVFIR *pag, PTATY type)
 map a pointer to its conditional points-to set
virtual ~CondPTAImpl ()
 Destructor.
void destroy ()
 Release memory.
PTDataTy * getPTDataTy () const
 Get points-to data.
MutPTDataTy * getMutPTDataTy () const
bool hasPtsMap (void) const
const MutPTDataTy::PtsMap & getPtsMap () const
virtual const CPtSet & getPts (CVar id)
virtual const Set< CVar > & getRevPts (CVar nodeId)
virtual void clearPts ()
 Clear all data.
bool overlap (const CPtSet &cpts1, const CPtSet &cpts2) const
 Whether cpts1 and cpts2 have overlap points-to targets.
void expandFIObjs (const CPtSet &cpts, CPtSet &expandedCpts)
 Expand all fields of an aggregate in all points-to sets.
virtual void dumpCPts ()
 Print out conditional pts.
virtual PointsTo getBVPointsTo (const CPtSet &cpts) const
 Given a conditional pts return its bit vector points-to.
virtual const CPtSet & getCondPointsTo (NodeID ptr)
 Given a pointer return its conditional points-to.
virtual AliasResult alias (const SVFVar *V1, const SVFVar *V2)
 Interface expose to users of our pointer analysis, given Value infos.
bool containBlackHoleNode (const CPtSet &cpts)
 Test blk node for cpts.
bool containConstantNode (const CPtSet &cpts)
 Test constant node for cpts.
void dumpTopLevelPtsTo ()
 Dump points-to information of top-level pointers.
Public Member Functions inherited from SVF::PointerAnalysis
ICFG * getICFG () const
 Get ICFG.
u32_t getNumOfResolvedIndCallEdge () const
 Return number of resolved indirect call edges.
CallGraph * getCallGraph () const
 Return call graph.
CallGraphSCC * getCallGraphSCC () const
 Return call graph SCC.
 PointerAnalysis (SVFIR *pag, PTATY ty=PTATY::Default_PTA, bool alias_check=true)
 Constructor.
PTATY getAnalysisTy () const
 Type of pointer analysis.
PTAImplTy getImplTy () const
 Return implementation type of the pointer analysis.
bool printStat ()
 Whether print statistics.
void disablePrintStat ()
 Whether print statistics.
CallEdgeMap & getIndCallMap ()
 Get callees from an indirect callsite.
bool hasIndCSCallees (const CallICFGNode *cs) const
const FunctionSet & getIndCSCallees (const CallICFGNode *cs) const
virtual void resolveIndCalls (const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
 Resolve indirect call edges.
void callGraphSCCDetection ()
 PTACallGraph SCC related methods.
NodeID getCallGraphSCCRepNode (NodeID id) const
 Get SCC rep node of a SVFG node.
bool inSameCallGraphSCC (const FunObjVar *fun1, const FunObjVar *fun2)
 Return TRUE if this edge is inside a PTACallGraph SCC, i.e., src node and dst node are in the same SCC on the SVFG.
bool isInRecursion (const FunObjVar *fun) const
bool isLocalVarInRecursiveFun (NodeID id) const
 Whether a local variable is in function recursions.
CommonCHGraph * getCHGraph () const
 get CHGraph
void getVFnsFromCHA (const CallICFGNode *cs, VFunSet &vfns)
void getVFnsFromPts (const CallICFGNode *cs, const PointsTo &target, VFunSet &vfns)
void connectVCallToVFns (const CallICFGNode *cs, const VFunSet &vfns, CallEdgeMap &newEdges)
virtual void resolveCPPIndCalls (const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
 Resolve cpp indirect call edges.
SVFIR * getPAG () const
PTAStat * getStat () const
 Get PTA stat.
OrderedNodeSet & getAllValidPtrs ()
 Get all Valid Pointers for resolution.
virtual ~PointerAnalysis ()
 Destructor.
virtual AliasResult alias (NodeID node1, NodeID node2)=0
 Interface exposed to users of our pointer analysis, given PAGNodeID.
virtual NodeBS getMayAliases (NodeID node)
virtual const PointsTo & getPts (NodeID ptr)=0
 Get points-to targets of a pointer. It needs to be implemented in child class.
virtual const NodeSet & getRevPts (NodeID nodeId)=0
bool mayAlias (const SVFVar *V1, const SVFVar *V2)
 Convenience bool wrappers: return true if the two operands may/must/partial alias.
bool mayAlias (NodeID node1, NodeID node2)
void printIndCSTargets (const CallICFGNode *cs, const FunctionSet &targets)
 Print targets of a function pointer.
virtual void dumpAllPts ()
virtual void dumpPts (NodeID ptr, const PointsTo &pts)
void printIndCSTargets ()
void dumpAllTypes ()
void dumpStat ()
 Dump the statistics.
bool containBlackHoleNode (const PointsTo &pts)
 Determine whether a points-to contains a black hole or constant node.
bool containConstantNode (const PointsTo &pts)
virtual bool isBlkObjOrConstantObj (NodeID ptd) const
bool isHeapMemObj (NodeID id) const
 Whether this object is heap or array.
bool isArrayMemObj (NodeID id) const
bool isFIObjNode (NodeID id) const
NodeID getBaseObjVarID (NodeID id)
NodeID getFIObjVar (NodeID id)
NodeID getGepObjVar (NodeID id, const APOffset &ap)
virtual const NodeBS & getAllFieldsObjVars (NodeID id)
void setObjFieldInsensitive (NodeID id)
bool isFieldInsensitive (NodeID id) const
Public Member Functions inherited from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >
 DDAVFSolver ()
 Constructor.
virtual ~DDAVFSolver ()
 Destructor.
NodeBS & getCandidateQueries ()
 Return candidate pointers for DDA.
virtual CxtLocDPItem getDPIm (const CxtVar &var, const SVFGNode *loc) const
 Given CVar and location (SVFGNode) return a new DPItem.
virtual bool unionDDAPts (CxtPtSet &pts, const CxtPtSet &targetPts)
 Union pts.
virtual void addDDAPts (CxtPtSet &pts, const CxtVar &var)
 Add pts.
SVFG * getSVFG () const
 Return SVFG.
SVFGSCC * getSVFGSCC () const
 Return SVFGSCC.
void dumpCPtSet (const CxtPtSet &cpts) const
virtual const CxtPtSet & findPT (const CxtLocDPItem &dpm)
 Compute points-to.

Private Attributes

ConstSVFGEdgeSet insensitveEdges
 insensitive call-return edges
FlowDDA * flowDDA
 downgrade to flowDDA if out-of-budget
DDAClient * _client
 DDA client.

Additional Inherited Members

Public Types inherited from SVF::CondPTAImpl< ContextCond >
typedef CondVar< ContextCond > CVar
typedef CondStdSet< CVar > CPtSet
typedef PTData< CVar, Set< CVar >, CVar, CPtSet > PTDataTy
typedef MutablePTData< CVar, Set< CVar >, CVar, CPtSet > MutPTDataTy
typedef Map< NodeID, PointsTo > PtrToBVPtsMap
typedef Map< NodeID, NodeSet > PtrToNSMap
 map a pointer to its BitVector points-to representation
typedef Map< NodeID, CPtSet > PtrToCPtsMap
Public Types inherited from SVF::PointerAnalysis
typedef Set< const CallICFGNode * > CallSiteSet
 Indirect call edges type, map a callsite to a set of callees.
typedef SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
typedef Set< const FunObjVar * > FunctionSet
typedef OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
typedef SCCDetection< CallGraph * > CallGraphSCC
typedef Set< const GlobalObjVar * > VTableSet
typedef Set< const FunObjVar * > VFunSet
Public Types inherited from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >
typedef SCCDetection< SVFG * > SVFGSCC
typedef SCCDetection< CallGraph * > CallGraphSCC
typedef CallGraphEdge::CallInstSet CallInstSet
typedef SVFIR::CallSiteSet CallSiteSet
typedef OrderedSet< CxtLocDPItem > DPTItemSet
typedef OrderedMap< CxtLocDPItem, CxtPtSet > DPImToCPtSetMap
typedef OrderedMap< CxtLocDPItem, CxtVar > DPMToCVarMap
typedef OrderedMap< CxtLocDPItem, CxtLocDPItem > DPMToDPMMap
typedef OrderedMap< NodeID, DPTItemSet > LocToDPMVecMap
typedef OrderedSet< const SVFGEdge * > ConstSVFGEdgeSet
typedef SVFGEdge::SVFGEdgeSetTy SVFGEdgeSet
typedef OrderedMap< const SVFGNode *, DPTItemSet > StoreToPMSetMap
Static Public Member Functions inherited from SVF::CondPTAImpl< ContextCond >
static bool classof (const PointerAnalysis *pta)
Static Public Attributes inherited from SVF::PointerAnalysis
static const std::string aliasTestMayAlias = "MAYALIAS"
static const std::string aliasTestMayAliasMangled = "_Z8MAYALIASPvS_"
static const std::string aliasTestNoAlias = "NOALIAS"
static const std::string aliasTestNoAliasMangled = "_Z7NOALIASPvS_"
static const std::string aliasTestPartialAlias = "PARTIALALIAS"
static const std::string aliasTestPartialAliasMangled = "_Z12PARTIALALIASPvS_"
static const std::string aliasTestMustAlias = "MUSTALIAS"
static const std::string aliasTestMustAliasMangled = "_Z9MUSTALIASPvS_"
static const std::string aliasTestFailMayAlias = "EXPECTEDFAIL_MAYALIAS"
static const std::string aliasTestFailMayAliasMangled = "_Z21EXPECTEDFAIL_MAYALIASPvS_"
static const std::string aliasTestFailNoAlias = "EXPECTEDFAIL_NOALIAS"
static const std::string aliasTestFailNoAliasMangled = "_Z20EXPECTEDFAIL_NOALIASPvS_"
virtual bool unionPts (CVar id, const CPtSet &target)
virtual bool addPts (CVar id, CVar ptd)
bool mustAlias (const CVar &var1, const CVar &var2)
 Internal interface to be used for conditional points-to set queries.
bool contains (const CPtSet &cpts1, const CPtSet &cpts2)
bool isSameVar (const CVar &var1, const CVar &var2) const
 Whether two pointers/objects are the same one by considering their conditions.
virtual void normalizePointsTo ()
 Normalize points-to information to BitVector/conditional representation.
const CallSiteToFunPtrMap & getIndirectCallsites () const
 Return all indirect callsites.
NodeID getFunPtr (const CallICFGNode *cs) const
 Return function pointer PAGNode at a callsite cs.
virtual void validateTests ()
 Alias check functions to verify correctness of pointer analysis.
virtual void validateSuccessTests (std::string fun)
virtual void validateExpectedFailureTests (std::string fun)
void resetObjFieldSensitive ()
 Reset all object node as field-sensitive.
Protected Member Functions inherited from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >
virtual void handleSingleStatement (const CxtLocDPItem &dpm, CxtPtSet &pts)
 Handle single statement.
void reCompute (const CxtLocDPItem &dpm)
 recompute points-to for value-flow cycles and indirect calls
void reComputeForEdges (const CxtLocDPItem &dpm, const SVFGEdgeSet &edgeSet, bool indirectCall=false)
 Traverse along out edges to find all nodes which may be affected by locDPM.
virtual void buildSVFG (SVFIR *pag)
 Build SVFG.
virtual void resetQuery ()
 Reset visited map for next points-to query.
void OOBResetVisited ()
 Reset visited map if the current query is out-of-budget.
const SVFGNode * getDefSVFGNode (const ValVar *valVar) const
 GetDefinition SVFG.
void backtraceAlongIndirectVF (CxtPtSet &pts, const CxtLocDPItem &oldDpm)
 Backward traverse along indirect value flows.
void backtraceAlongDirectVF (CxtPtSet &pts, const CxtLocDPItem &oldDpm)
 Backward traverse along direct value flows.
void startNewPTCompFromLoadSrc (CxtPtSet &pts, const CxtLocDPItem &oldDpm)
void startNewPTCompFromStoreDst (CxtPtSet &pts, const CxtLocDPItem &oldDpm)
void backtraceToStoreSrc (CxtPtSet &pts, const CxtLocDPItem &oldDpm)
virtual void backwardPropDpm (CxtPtSet &pts, NodeID ptr, const CxtLocDPItem &oldDpm, const SVFGEdge *edge)
 dpm transit during backward tracing
virtual bool isMustAlias (const CxtLocDPItem &, const CxtLocDPItem &)
 whether load and store are aliased
virtual bool isStrongUpdate (const CxtPtSet &dstCPSet, const StoreSVFGNode *store)
 Return TRUE if this is a strong update STORE statement.
virtual bool isLocalCVarInRecursion (const CxtVar &var) const
 Whether a local variable is in function recursions.
void resolveFunPtr (const CxtLocDPItem &dpm)
 resolve function pointer
void markbkVisited (const CxtLocDPItem &dpm)
 Visited flags to avoid cycles.
bool isbkVisited (const CxtLocDPItem &dpm)
void clearbkVisited (const CxtLocDPItem &dpm)
virtual const CxtPtSet & getCachedPointsTo (const CxtLocDPItem &dpm)
 Points-to Caching for top-level pointers and address-taken objects.
virtual void updateCachedPointsTo (const CxtLocDPItem &dpm, const CxtPtSet &pts)
virtual const CxtPtSet & getCachedTLPointsTo (const CxtLocDPItem &dpm)
virtual const CxtPtSet & getCachedADPointsTo (const CxtLocDPItem &dpm)
bool isTopLevelPtrStmt (const SVFGNode *stmt)
 Whether this is a top-level pointer statement.
virtual CxtLocDPItem getDPImWithOldCond (const CxtLocDPItem &oldDpm, const CxtVar &var, const SVFGNode *loc)
 Return dpm with old context and path conditions.
void SVFGSCCDetection ()
 SVFG SCC detection.
NodeID getSVFGSCCRepNode (NodeID id)
 Get SCC rep node of a SVFG node.
bool isSVFGNodeInCycle (const SVFGNode *node)
 Return whether this SVFGNode is in cycle.
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.
void setCallGraph (CallGraph *cg)
 Set callgraph.
void setCallGraphSCC (CallGraphSCC *scc)
 Set callgraphSCC.
bool isArrayCondMemObj (const CxtVar &var) const
bool isFieldInsenCondMemObj (const CxtVar &var) const
void addLoadDpmAndCVar (const CxtLocDPItem &dpm, const CxtLocDPItem &loadDpm, const CxtVar &loadVar)
 LoadDpm for must-alias analysis.
void addLoadDpm (const CxtLocDPItem &dpm, const CxtLocDPItem &loadDpm)
 Note that simply use "dpmToloadDpmMap[dpm]=loadDpm", requires DPIm have a default constructor.
const CxtLocDPItem & getLoadDpm (const CxtLocDPItem &dpm) const
void addLoadCVar (const CxtLocDPItem &dpm, const CxtVar &loadVar)
const CxtVar & getLoadCVar (const CxtLocDPItem &dpm) const
AndersenWaveDiff * getAndersenAnalysis () const
 Return Andersen's analysis.
void handleOutOfBudgetDpm (const CxtLocDPItem &dpm)
 handle out-of-budget queries
bool testOutOfBudget (const CxtLocDPItem &dpm)
bool isOutOfBudgetQuery () const
void addOutOfBudgetDpm (const CxtLocDPItem &dpm)
bool isOutOfBudgetDpm (const CxtLocDPItem &dpm) const
DDAStat * setDDAStat (DDAStat *s)
 Set DDAStat.
void addSUStat (const CxtLocDPItem &dpm, const SVFGNode *node)
 stat strong updates num
void rmSUStat (const CxtLocDPItem &dpm, const SVFGNode *node)
 remove strong updates num if the dpm goes to weak updates branch
PTDataTy * ptD
 Points-to data.
bool normalized
 Normalized flag.
PtrToBVPtsMap ptrToBVPtsMap
 Normal points-to representation (without conditions).
PtrToNSMap objToNSRevPtsMap
 Normal points-to representation (without conditions).
PtrToCPtsMap ptrToCPtsMap
 Conditional points-to representation (with conditions).
Protected Attributes inherited from SVF::PointerAnalysis
bool print_stat
 User input flags.
bool alias_validation
 Flag for validating points-to/alias results.
u32_t OnTheFlyIterBudgetForStat
 Flag for iteration budget for on-the-fly statistics.
PTATY ptaTy
 Pointer analysis Type.
PTAImplTy ptaImplTy
 PTA implementation type.
PTAStat * stat
 Statistics.
CallGraph * callgraph
 Call graph used for pointer analysis.
CallGraphSCC * callGraphSCC
 SCC for PTACallGraph.
ICFG * icfg
 Interprocedural control-flow graph.
CommonCHGraph * chgraph
 CHGraph.
bool outOfBudgetQuery
 Whether the current query is out of step limits.
SVFIR * _pag
 SVFIR.
SVFG * _svfg
 SVFG.
AndersenWaveDiff * _ander
 Andersen's analysis.
NodeBS candidateQueries
 candidate pointers;
CallGraph * _callGraph
 PTACallGraph.
CallGraphSCC * _callGraphSCC
 SCC for PTACallGraph.
SVFGSCC * _svfgSCC
 SCC for SVFG.
DPTItemSet backwardVisited
 visited map during backward traversing
DPImToCPtSetMap dpmToTLCPtSetMap
 points-to caching map for top-level vars
DPImToCPtSetMap dpmToADCPtSetMap
 points-to caching map for address-taken vars
LocToDPMVecMap locToDpmSetMap
 map location to its dpms
DPMToDPMMap dpmToloadDpmMap
 dpms at loads for may/must-alias analysis with stores
DPMToCVarMap loadToPTCVarMap
 map a load dpm to its cvar pointed by its pointer operand
DPTItemSet outOfBudgetDpms
 out of budget dpm set
StoreToPMSetMap storeToDPMs
 map store to set of DPM which have been stong updated there
DDAStat * ddaStat
 DDA stat.
SVFGBuilder svfgBuilder
 SVFG Builder.
Static Protected Attributes inherited from SVF::PointerAnalysis
static SVFIR * pag = nullptr
 SVFIR.

Detailed Description

Context-, Flow- Sensitive Demand-driven Analysis

Definition at line 55 of file ContextDDA.h.

Constructor & Destructor Documentation

◆ ContextDDA()

ContextDDA::ContextDDA ( SVFIR * _pag,
DDAClient * client )

Constructor.

Constructor

Definition at line 42 of file ContextDDA.cpp.

44 _client(client)
45{
46 flowDDA = new FlowDDA(_pag, client);
47}
CondPTAImpl(SVFIR *pag, PTATY type)
FlowDDA * flowDDA
downgrade to flowDDA if out-of-budget
Definition ContextDDA.h:225
DDAClient * _client
DDA client.
Definition ContextDDA.h:226
@ Cxt_DDA
context sensitive DDA
Definition PTATY.h:32

◆ ~ContextDDA()

ContextDDA::~ContextDDA ( )
virtual

Destructor.

Destructor

Definition at line 52 of file ContextDDA.cpp.

53{
54 if(flowDDA)
55 delete flowDDA;
56 flowDDA = nullptr;
57}

Member Function Documentation

◆ analyze()

virtual void SVF::ContextDDA::analyze ( )
inlineoverridevirtual

dummy analyze method

Implements SVF::PointerAnalysis.

Definition at line 75 of file ContextDDA.h.

75{}

◆ computeDDAPts() [1/2]

const CxtPtSet & ContextDDA::computeDDAPts ( const CxtVar & var)
virtual

Compute points-to set for a context-sensitive pointer.

Compute points-to set for a context-sensitive pointer

Definition at line 75 of file ContextDDA.cpp.

76{
77
78 resetQuery();
80
81 NodeID id = var.get_id();
82 const ValVar* node = getPAG()->getValVar(id);
83 CxtLocDPItem dpm = getDPIm(var, getDefSVFGNode(node));
84
85 // start DDA analysis
86 DOTIMESTAT(double start = DDAStat::getClk(true));
87 const CxtPtSet& cpts = findPT(dpm);
88 DOTIMESTAT(ddaStat->_AnaTimePerQuery = DDAStat::getClk(true) - start);
89 DOTIMESTAT(ddaStat->_TotalTimeOfQueries += ddaStat->_AnaTimePerQuery);
90
91 if(isOutOfBudgetQuery() == false)
92 unionPts(var,cpts);
93 else
95
96 if (this->printStat())
97 DOSTAT(stat->performStatPerQuery(id));
98 DBOUT(DGENERAL, stat->printStatPerQuery(id,getBVPointsTo(getPts(var))));
99 return this->getPts(var);
100}
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
Definition SVFType.h:576
#define DGENERAL
Definition SVFType.h:582
#define DOSTAT(X)
Definition SVFType.h:577
#define DOTIMESTAT(X)
Definition SVFType.h:578
virtual bool unionPts(CVar id, const CPtSet &target)
virtual PointsTo getBVPointsTo(const CPtSet &cpts) const
virtual const CPtSet & getPts(CVar id)
NodeID get_id() const
void handleOutOfBudgetDpm(const CxtLocDPItem &dpm)
Handle out-of-budget dpm.
virtual const CxtPtSet & findPT(const CxtLocDPItem &dpm)
const SVFGNode * getDefSVFGNode(const ValVar *valVar) const
virtual CxtLocDPItem getDPIm(const CxtVar &var, const SVFGNode *loc) const
Definition DDAVFSolver.h:98
static void setMaxBudget(u32_t max)
set max step budge per query
Definition DPItem.h:87
static const Option< u32_t > CxtBudget
Definition Options.h:77
bool printStat()
Whether print statistics.
PTAStat * stat
Statistics.
SVFIR * getPAG() const
const ValVar * getValVar(NodeID id) const
Definition SVFIR.h:140
static double getClk(bool mark=false)
Definition SVFStat.cpp:52
u32_t NodeID
Definition GeneralType.h:76
CxtStmtDPItem< SVFGNode > CxtLocDPItem
Definition ContextDDA.h:50
CondStdSet< CxtVar > CxtPtSet
Definition DPItem.h:387

◆ computeDDAPts() [2/2]

void ContextDDA::computeDDAPts ( NodeID id)
overridevirtual

Compute points-to set for an unconditional pointer.

Compute points-to set for an unconditional pointer

Reimplemented from SVF::PointerAnalysis.

Definition at line 105 of file ContextDDA.cpp.

106{
107 ContextCond cxt;
108 CxtVar var(cxt, id);
109 computeDDAPts(var);
110}
virtual void computeDDAPts(NodeID id) override
Compute points-to set for an unconditional pointer.
CondVar< ContextCond > CxtVar
Definition DPItem.h:386

◆ dumpContexts()

virtual void SVF::ContextDDA::dumpContexts ( const ContextCond & cxts)
inlinevirtual

dump context call strings

Definition at line 213 of file ContextDDA.h.

214 {
215 SVFUtil::outs() << cxts.toString() << "\n";
216 }
std::ostream & outs()
Overwrite llvm::outs().
Definition SVFUtil.h:58

◆ edgeInCallGraphSCC()

bool SVF::ContextDDA::edgeInCallGraphSCC ( const SVFGEdge * edge)
inline

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 161 of file ContextDDA.h.

162 {
163 const FunObjVar* srcfun = edge->getSrcNode()->getFun();
164 const FunObjVar* dstfun = edge->getDstNode()->getFun();
165
166 if(srcfun && dstfun)
167 return inSameCallGraphSCC(srcfun,dstfun);
168
169 assert(edge->isRetVFGEdge() == false && "should not be an inter-procedural return edge" );
170
171 return false;
172 }
bool inSameCallGraphSCC(const FunObjVar *fun1, const FunObjVar *fun2)
Return TRUE if this edge is inside a PTACallGraph SCC, i.e., src node and dst node are in the same SC...

◆ finalize()

virtual void SVF::ContextDDA::finalize ( )
inlineoverridevirtual

Finalize analysis.

Reimplemented from SVF::CondPTAImpl< ContextCond >.

Definition at line 69 of file ContextDDA.h.

70 {
72 }
virtual void finalize()
Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.

◆ getConservativeCPts()

virtual CxtPtSet SVF::ContextDDA::getConservativeCPts ( const CxtLocDPItem & dpm)
inlineoverridevirtual

Override parent method.

Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 87 of file ContextDDA.h.

88 {
89 const PointsTo& pts = getAndersenAnalysis()->getPts(dpm.getCurNodeID());
90 CxtPtSet tmpCPts;
91 ContextCond cxt;
92 for (PointsTo::iterator piter = pts.begin(); piter != pts.end(); ++piter)
93 {
94 CxtVar var(cxt,*piter);
95 tmpCPts.set(var);
96 }
97 return tmpCPts;
98 }
virtual const PointsTo & getPts(NodeID id)
Operation of points-to set.
Definition Andersen.h:242
const_iterator iterator
Definition PointsTo.h:41

◆ getCSIDAtCall()

CallSiteID ContextDDA::getCSIDAtCall ( CxtLocDPItem & dpm,
const SVFGEdge * edge )

get callsite id from call, return 0 if it is a spurious call edge

get callsite id from call, return 0 if it is a spurious call edge translate the callsite id from pre-computed callgraph on SVFG to the one on current callgraph

Definition at line 210 of file ContextDDA.cpp.

211{
212
213 CallSiteID svfg_csId = 0;
214 if (const CallDirSVFGEdge* callEdge = SVFUtil::dyn_cast<CallDirSVFGEdge>(edge))
215 svfg_csId = callEdge->getCallSiteId();
216 else
217 svfg_csId = SVFUtil::cast<CallIndSVFGEdge>(edge)->getCallSiteId();
218
219 const CallICFGNode* cbn = getSVFG()->getCallSite(svfg_csId);
220 const FunObjVar* callee = edge->getDstNode()->getFun();
221
222 if(getCallGraph()->hasCallSiteID(cbn,callee))
223 {
224 return getCallGraph()->getCallSiteID(cbn,callee);
225 }
226
227 return 0;
228}
CallSiteID getCallSiteID(const CallICFGNode *cs, const FunObjVar *callee) const
Get CallSiteID.
Definition CallGraph.h:389
NodeType * getDstNode() const
CallGraph * getCallGraph() const
Return call graph.
virtual const FunObjVar * getFun() const
Get the function of this SVFGNode.
Definition VFGNode.h:79
const CallICFGNode * getCallSite(CallSiteID id) const
Definition VFG.h:182
std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > cast(const Y &Val)
Definition Casting.h:360
LLVM_NODISCARD std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > dyn_cast(const Y &Val)
Definition Casting.h:405
unsigned CallSiteID
Definition GeneralType.h:78

◆ getCSIDAtRet()

CallSiteID ContextDDA::getCSIDAtRet ( CxtLocDPItem & dpm,
const SVFGEdge * edge )

get callsite id from return, return 0 if it is a spurious return edge

get callsite id from return, return 0 if it is a spurious return edge translate the callsite id from pre-computed callgraph on SVFG to the one on current callgraph

Definition at line 234 of file ContextDDA.cpp.

235{
236
237 CallSiteID svfg_csId = 0;
238 if (const RetDirSVFGEdge* retEdge = SVFUtil::dyn_cast<RetDirSVFGEdge>(edge))
239 svfg_csId = retEdge->getCallSiteId();
240 else
241 svfg_csId = SVFUtil::cast<RetIndSVFGEdge>(edge)->getCallSiteId();
242
243 const CallICFGNode* cbn = getSVFG()->getCallSite(svfg_csId);
244 const FunObjVar* callee = edge->getSrcNode()->getFun();
245
246 if(getCallGraph()->hasCallSiteID(cbn,callee))
247 {
248 return getCallGraph()->getCallSiteID(cbn,callee);
249 }
250
251 return 0;
252}
NodeType * getSrcNode() const

◆ getInsensitiveEdgeSet()

ConstSVFGEdgeSet & SVF::ContextDDA::getInsensitiveEdgeSet ( )
inline

Return insensitive edge set.

Definition at line 208 of file ContextDDA.h.

209 {
210 return insensitveEdges;
211 }
ConstSVFGEdgeSet insensitveEdges
insensitive call-return edges
Definition ContextDDA.h:224

◆ getPtrNodeID()

virtual NodeID SVF::ContextDDA::getPtrNodeID ( const CxtVar & var) const
inlineoverridevirtual

Override parent method.

Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 101 of file ContextDDA.h.

102 {
103 return var.get_id();
104 }

◆ handleAddr()

virtual void SVF::ContextDDA::handleAddr ( CxtPtSet & pts,
const CxtLocDPItem & dpm,
const AddrSVFGNode * addr )
inlineoverridevirtual

Handle Address SVFGNode to add proper conditional points-to.

whether this object is set field-insensitive during pre-analysis

Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 178 of file ContextDDA.h.

179 {
180 NodeID srcID = addr->getSrcNodeID();
182 if (isFieldInsensitive(srcID))
183 srcID = getFIObjVar(srcID);
184
185 CxtVar var(dpm.getCond(),srcID);
186 addDDAPts(pts,var);
187 DBOUT(DDDA, SVFUtil::outs() << "\t add points-to target " << var << " to dpm ");
188 DBOUT(DDDA, dpm.dump());
189 }
#define DDDA
Definition SVFType.h:588
virtual void addDDAPts(CxtPtSet &pts, const CxtVar &var)
bool isFieldInsensitive(NodeID id) const
NodeID getFIObjVar(NodeID id)

◆ handleBKCondition()

bool ContextDDA::handleBKCondition ( CxtLocDPItem & dpm,
const SVFGEdge * edge )
overridevirtual

Handle condition for context or path analysis (backward analysis).

Handle conditions during backward traversing.

we don't handle context in recursions, they treated as assignments

we don't handle context in recursions, they treated as assignments

TODO: When this call site id is contained in current call string, we may find a recursion. Try to solve this later.

Reimplemented from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 256 of file ContextDDA.cpp.

257{
258 _client->handleStatement(edge->getSrcNode(), dpm.getCurNodeID());
259
260 if (edge->isCallVFGEdge())
261 {
263 if(CallSiteID csId = getCSIDAtCall(dpm,edge))
264 {
265
266 if(isEdgeInRecursion(csId))
267 {
268 DBOUT(DDDA,outs() << "\t\t call edge " << getCallGraph()->getCallerOfCallSite(csId)->getName() <<
269 "=>" << getCallGraph()->getCalleeOfCallSite(csId)->getName() << "in recursion \n");
271 }
272 else
273 {
274 if (dpm.matchContext(csId) == false)
275 {
276 DBOUT(DDDA, outs() << "\t\t context not match, edge "
277 << edge->getDstID() << " --| " << edge->getSrcID() << " \t");
279 return false;
280 }
281
282 DBOUT(DDDA, outs() << "\t\t match contexts ");
284 }
285 }
286 }
287
288 else if (edge->isRetVFGEdge())
289 {
291 if(CallSiteID csId = getCSIDAtRet(dpm,edge))
292 {
293
294 if(isEdgeInRecursion(csId))
295 {
296 DBOUT(DDDA,outs() << "\t\t return edge " << getCallGraph()->getCalleeOfCallSite(csId)->getName() <<
297 "=>" << getCallGraph()->getCallerOfCallSite(csId)->getName() << "in recursion \n");
299 }
300 else
301 {
304 if (dpm.getCond().containCallStr(csId))
305 {
306 outOfBudgetQuery = true;
307 SVFUtil::writeWrnMsg("Call site ID is contained in call string. Is this a recursion?");
308 return false;
309 }
310 else
311 {
312 assert(dpm.getCond().containCallStr(csId) ==false && "contain visited call string ??");
313 if(dpm.pushContext(csId))
314 {
315 DBOUT(DDDA, outs() << "\t\t push context ");
317 }
318 else
319 {
320 DBOUT(DDDA, outs() << "\t\t context is full ");
322 }
323 }
324 }
325 }
326 }
327
328 return true;
329}
bool containCallStr(NodeID cxt) const
Whether contains callstring cxt.
Definition DPItem.h:256
virtual void popRecursiveCallSites(CxtLocDPItem &dpm)
Pop recursive callsites.
Definition ContextDDA.h:124
CallSiteID getCSIDAtCall(CxtLocDPItem &dpm, const SVFGEdge *edge)
get callsite id from call, return 0 if it is a spurious call edge
virtual bool isEdgeInRecursion(CallSiteID csId)
Whether call/return inside recursion.
Definition ContextDDA.h:135
CallSiteID getCSIDAtRet(CxtLocDPItem &dpm, const SVFGEdge *edge)
get callsite id from return, return 0 if it is a spurious return edge
virtual void dumpContexts(const ContextCond &cxts)
dump context call strings
Definition ContextDDA.h:213
bool matchContext(NodeID cxt)
Match context.
Definition DPItem.h:431
bool pushContext(NodeID cxt)
Push context.
Definition DPItem.h:425
const ContextCond & getCond() const
Get context.
Definition DPItem.h:415
NodeID getCurNodeID() const
Definition DPItem.h:78
NodeID getDstID() const
NodeID getSrcID() const
get methods of the components
bool isRetVFGEdge() const
Definition VFGEdge.h:88
bool isCallVFGEdge() const
Definition VFGEdge.h:84
void writeWrnMsg(const std::string &msg)
Writes a message run through wrnMsg.
Definition SVFUtil.cpp:88

◆ handleOutOfBudgetDpm()

void ContextDDA::handleOutOfBudgetDpm ( const CxtLocDPItem & dpm)

Handle out-of-budget dpm.

Handle out-of-budget dpm

Definition at line 115 of file ContextDDA.cpp.

116{
117
118 DBOUT(DGENERAL,outs() << "~~~Out of budget query, downgrade to flow sensitive analysis \n");
119 flowDDA->computeDDAPts(dpm.getCurNodeID());
120 const PointsTo& flowPts = flowDDA->getPts(dpm.getCurNodeID());
121 CxtPtSet cxtPts;
122 for(PointsTo::iterator it = flowPts.begin(), eit = flowPts.end(); it!=eit; ++it)
123 {
124 ContextCond cxt;
125 CxtVar var(cxt, *it);
126 cxtPts.set(var);
127 }
128 updateCachedPointsTo(dpm,cxtPts);
129 unionPts(dpm.getCondVar(),cxtPts);
131}
void set(const Element &var)
Add the element into set.
CxtVar getCondVar() const
Get context var.
Definition DPItem.h:409
virtual void updateCachedPointsTo(const CxtLocDPItem &dpm, const CxtPtSet &pts)
void addOutOfBudgetDpm(const CxtLocDPItem &dpm)
const_iterator end() const
Definition PointsTo.h:133
const_iterator begin() const
Definition PointsTo.h:129

◆ initialize()

void ContextDDA::initialize ( )
overridevirtual

Initialization of the analysis.

Analysis initialization

Reimplemented from SVF::PointerAnalysis.

Definition at line 62 of file ContextDDA.cpp.

63{
68 stat = setDDAStat(new DDAStat(this));
69 flowDDA->initialize();
70}
virtual void initialize()
Initialization of a pointer analysis, including building symbol table and SVFIR etc.
static SVFIR * pag
SVFIR.
CallGraphSCC * getCallGraphSCC() const
Return call graph SCC.

◆ isCondCompatible()

bool ContextDDA::isCondCompatible ( const ContextCond & cxt1,
const ContextCond & cxt2,
bool singleton ) const
inlineoverridevirtual

Whether two call string contexts are compatible which may represent the same memory object compare with call strings from last few callsite ids (most recent ids to objects): compatible : (e.g., 123 == 123, 123 == 23). not compatible (e.g., 123 != 423)

context conditions of local(not in recursion) and global variables are compatible

Implements SVF::CondPTAImpl< ContextCond >.

Definition at line 136 of file ContextDDA.cpp.

137{
138 if(singleton)
139 return true;
140
141 int i = cxt1.cxtSize() - 1;
142 int j = cxt2.cxtSize() - 1;
143 for(; i >= 0 && j>=0; i--, j--)
144 {
145 if(cxt1[i] != cxt2[j])
146 return false;
147 }
148 return true;
149}
u32_t cxtSize() const
Get context size.
Definition DPItem.h:261

◆ isEdgeInRecursion()

virtual bool SVF::ContextDDA::isEdgeInRecursion ( CallSiteID csId)
inlinevirtual

Whether call/return inside recursion.

Definition at line 135 of file ContextDDA.h.

136 {
137 const FunObjVar* caller = getCallGraph()->getCallerOfCallSite(csId);
138 const FunObjVar* callee = getCallGraph()->getCalleeOfCallSite(csId);
139 return inSameCallGraphSCC(caller, callee);
140 }
const FunObjVar * getCallerOfCallSite(CallSiteID id) const
Definition CallGraph.cpp:90
const FunObjVar * getCalleeOfCallSite(CallSiteID id) const
Definition CallGraph.h:413

◆ isHeapCondMemObj()

bool ContextDDA::isHeapCondMemObj ( const CxtVar & var,
const StoreSVFGNode * store )
overridevirtual

we exclude concrete heap given the following conditions: (1) concrete calling context (not involved in recursion and not exceed the maximum context limit) (2) not inside loop

Reimplemented from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 335 of file ContextDDA.cpp.

336{
337 const BaseObjVar* obj = _pag->getBaseObject(getPtrNodeID(var));
338 assert(obj && "base object is null??");
339 const BaseObjVar* baseVar = _pag->getBaseObject(getPtrNodeID(var));
340 assert(baseVar && "base object is null??");
342 {
343 if (isa<DummyObjVar>(baseVar))
344 {
345 const SVFVar* pnode = _pag->getSVFVar(getPtrNodeID(var));
346 const GepObjVar* gepobj = SVFUtil::dyn_cast<GepObjVar>(pnode);
347 if (gepobj != nullptr)
348 {
349 assert(SVFUtil::isa<DummyObjVar>(_pag->getSVFVar(gepobj->getBaseNode()))
350 && "empty refVal in a gep object whose base is a non-dummy object");
351 }
352 else
353 {
355 && "empty refVal in non-dummy object");
356 }
357 return true;
358 }
359 else if(const ICFGNode* node = obj->getICFGNode())
360 {
361 const FunObjVar* svfFun = node->getFun();
362 if(_ander->isInRecursion(svfFun))
363 return true;
364 if(var.get_cond().isConcreteCxt() == false)
365 return true;
366 if(_pag->getICFG()->isInLoop(node))
367 return true;
368 }
369 }
370 return false;
371}
const ICFGNode * getICFGNode() const
Get the ICFGNode related to the creation of this object.
const Cond & get_cond() const
bool isConcreteCxt() const
Whether it is an concrete context.
Definition DPItem.h:246
virtual NodeID getPtrNodeID(const CxtVar &var) const override
Override parent method.
Definition ContextDDA.h:101
NodeID getBaseNode(void) const
Return the base object from which this GEP node came from.
LLVM_NODISCARD bool isa(const Y &Val)
Definition Casting.h:241

◆ isInsensitiveCallRet()

bool SVF::ContextDDA::isInsensitiveCallRet ( const SVFGEdge * edge)
inline

Whether this edge is treated context-insensitively.

Definition at line 203 of file ContextDDA.h.

204 {
205 return insensitveEdges.find(edge) != insensitveEdges.end();
206 }

◆ popRecursiveCallSites()

virtual void SVF::ContextDDA::popRecursiveCallSites ( CxtLocDPItem & dpm)
inlinevirtual

Pop recursive callsites.

Definition at line 124 of file ContextDDA.h.

125 {
126 ContextCond& cxtCond = dpm.getCond();
127 cxtCond.setNonConcreteCxt();
128 CallStrCxt& cxt = cxtCond.getContexts();
129 while(!cxt.empty() && isEdgeInRecursion(cxt.back()))
130 {
131 cxt.pop_back();
132 }
133 }
std::vector< u32_t > CallStrCxt
Definition GeneralType.h:96

◆ processGepPts()

CxtPtSet ContextDDA::processGepPts ( const GepSVFGNode * gep,
const CxtPtSet & srcPts )
overridevirtual

processGep node

Generate field objects for structs

Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 154 of file ContextDDA.cpp.

155{
156 CxtPtSet tmpDstPts;
157 for (CxtPtSet::iterator piter = srcPts.begin(); piter != srcPts.end(); ++piter)
158 {
159
160 CxtVar ptd = *piter;
161 if (isBlkObjOrConstantObj(ptd.get_id()))
162 tmpDstPts.set(ptd);
163 else
164 {
165 const GepStmt* gepStmt = SVFUtil::cast<GepStmt>(gep->getSVFStmt());
166 if (gepStmt->isVariantFieldGep())
167 {
169 CxtVar var(ptd.get_cond(),getFIObjVar(ptd.get_id()));
170 tmpDstPts.set(var);
171 }
172 else
173 {
174 CxtVar var(ptd.get_cond(),getGepObjVar(ptd.get_id(),
176 tmpDstPts.set(var);
177 }
178 }
179 }
180
181 DBOUT(DDDA, outs() << "\t return created gep objs ");
182 DBOUT(DDDA, outs() << srcPts.toString());
183 DBOUT(DDDA, outs() << " --> ");
184 DBOUT(DDDA, outs() << tmpDstPts.toString());
185 DBOUT(DDDA, outs() << "\n");
186 return tmpDstPts;
187}
APOffset getConstantStructFldIdx() const
Get methods.
Definition AccessPath.h:102
std::string toString() const
OrderedSet< CxtVar >::iterator iterator
iterator begin()
Iterators.
bool isVariantFieldGep() const
Gep statement with a variant field index (pointer arithmetic) for struct field access.
const AccessPath & getAccessPath() const
virtual bool isBlkObjOrConstantObj(NodeID ptd) const
NodeID getGepObjVar(NodeID id, const APOffset &ap)
void setObjFieldInsensitive(NodeID id)
const SVFStmt * getSVFStmt() const
Definition VFGNode.h:147

◆ propagateViaObj()

virtual bool SVF::ContextDDA::propagateViaObj ( const CxtVar & storeObj,
const CxtVar & loadObj )
inlineoverridevirtual

Propagate along indirect value-flow if two objects of load and store are same.

Reimplemented from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 192 of file ContextDDA.h.

193 {
194 return isSameVar(storeObj,loadObj);
195 }
bool isSameVar(const CVar &var1, const CVar &var2) const

◆ PTAName()

virtual const std::string SVF::ContextDDA::PTAName ( ) const
inlineoverridevirtual

Return PTA name.

Reimplemented from SVF::PointerAnalysis.

Definition at line 218 of file ContextDDA.h.

219 {
220 return "Context Sensitive DDA";
221 }

◆ testIndCallReachability()

bool ContextDDA::testIndCallReachability ( CxtLocDPItem & dpm,
const FunObjVar * callee,
const CallICFGNode * cs )

refine indirect call edge

Definition at line 189 of file ContextDDA.cpp.

190{
191 if(getPAG()->isIndirectCallSites(cs))
192 {
193 NodeID id = getPAG()->getFunPtr(cs);
194 const ValVar* node = getPAG()->getValVar(id);
195 CxtVar funptrVar(dpm.getCondVar().get_cond(), id);
196 CxtLocDPItem funptrDpm = getDPIm(funptrVar,getDefSVFGNode(node));
197 PointsTo pts = getBVPointsTo(findPT(funptrDpm));
198 if(pts.test(callee->getId()))
199 return true;
200 else
201 return false;
202 }
203 return true;
204}
NodeID getId() const
Get the memory object id.
bool test(u32_t n) const
Returns true if n is in this set.
Definition PointsTo.cpp:143
NodeID getFunPtr(const CallICFGNode *cs) const
Definition SVFIR.h:458

◆ updateCallGraphAndSVFG()

virtual void SVF::ContextDDA::updateCallGraphAndSVFG ( const CxtLocDPItem & dpm,
const CallICFGNode * cs,
SVFGEdgeSet & svfgEdges )
inlineoverridevirtual

Update call graph.

Reimplemented from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.

Definition at line 143 of file ContextDDA.h.

144 {
145 CallEdgeMap newEdges;
147 for (CallEdgeMap::const_iterator iter = newEdges.begin(),eiter = newEdges.end(); iter != eiter; iter++)
148 {
149 const CallICFGNode* newcs = iter->first;
150 const FunctionSet & functions = iter->second;
151 for (FunctionSet::const_iterator func_iter = functions.begin(); func_iter != functions.end(); func_iter++)
152 {
153 const FunObjVar* func = *func_iter;
154 getSVFG()->connectCallerAndCallee(newcs, func, svfgEdges);
155 }
156 }
157 }
virtual const CxtPtSet & getCachedPointsTo(const CxtLocDPItem &dpm)
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
Set< const FunObjVar * > FunctionSet
virtual void resolveIndCalls(const CallICFGNode *cs, const PointsTo &target, CallEdgeMap &newEdges)
Resolve indirect call edges.
virtual void connectCallerAndCallee(const CallICFGNode *cs, const FunObjVar *callee, SVFGEdgeSetTy &edges)
Connect SVFG nodes between caller and callee for indirect call site.
Definition SVFG.cpp:658

Member Data Documentation

◆ _client

DDAClient* SVF::ContextDDA::_client
private

DDA client.

Definition at line 226 of file ContextDDA.h.

◆ flowDDA

FlowDDA* SVF::ContextDDA::flowDDA
private

downgrade to flowDDA if out-of-budget

Definition at line 225 of file ContextDDA.h.

◆ insensitveEdges

ConstSVFGEdgeSet SVF::ContextDDA::insensitveEdges
private

insensitive call-return edges

Definition at line 224 of file ContextDDA.h.


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