|
Static Value-Flow Analysis
|
#include <ContextDDA.h>
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. | |
Context-, Flow- Sensitive Demand-driven Analysis
Definition at line 55 of file ContextDDA.h.
Constructor.
Constructor
Definition at line 42 of file ContextDDA.cpp.
|
virtual |
|
inlineoverridevirtual |
dummy analyze method
Implements SVF::PointerAnalysis.
Definition at line 75 of file ContextDDA.h.
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.
|
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.
|
inlinevirtual |
|
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.
|
inlineoverridevirtual |
Finalize analysis.
Reimplemented from SVF::CondPTAImpl< ContextCond >.
Definition at line 69 of file ContextDDA.h.
|
inlineoverridevirtual |
Override parent method.
Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.
Definition at line 87 of file ContextDDA.h.
| 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.
| 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.
|
inline |
Return insensitive edge set.
Definition at line 208 of file ContextDDA.h.
Override parent method.
Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.
Definition at line 101 of file ContextDDA.h.
|
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.
|
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.
| void ContextDDA::handleOutOfBudgetDpm | ( | const CxtLocDPItem & | dpm | ) |
Handle out-of-budget dpm.
Handle out-of-budget dpm
Definition at line 115 of file ContextDDA.cpp.
|
overridevirtual |
Initialization of the analysis.
Analysis initialization
Reimplemented from SVF::PointerAnalysis.
Definition at line 62 of file ContextDDA.cpp.
|
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.
|
inlinevirtual |
Whether call/return inside recursion.
Definition at line 135 of file ContextDDA.h.
|
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.
|
inline |
Whether this edge is treated context-insensitively.
Definition at line 203 of file ContextDDA.h.
|
inlinevirtual |
Pop recursive callsites.
Definition at line 124 of file ContextDDA.h.
|
overridevirtual |
processGep node
Generate field objects for structs
Implements SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.
Definition at line 154 of file ContextDDA.cpp.
|
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.
|
inlineoverridevirtual |
Return PTA name.
Reimplemented from SVF::PointerAnalysis.
Definition at line 218 of file ContextDDA.h.
| bool ContextDDA::testIndCallReachability | ( | CxtLocDPItem & | dpm, |
| const FunObjVar * | callee, | ||
| const CallICFGNode * | cs ) |
refine indirect call edge
Definition at line 189 of file ContextDDA.cpp.
|
inlineoverridevirtual |
Update call graph.
Reimplemented from SVF::DDAVFSolver< CxtVar, CxtPtSet, CxtLocDPItem >.
Definition at line 143 of file ContextDDA.h.
|
private |
DDA client.
Definition at line 226 of file ContextDDA.h.
|
private |
downgrade to flowDDA if out-of-budget
Definition at line 225 of file ContextDDA.h.
|
private |
insensitive call-return edges
Definition at line 224 of file ContextDDA.h.