|
Static Value-Flow Analysis
|
#include <AndersenPWC.h>
Static Public Member Functions | |
| static AndersenSCD * | createAndersenSCD (SVFIR *_pag) |
| Create an singleton instance directly instead of invoking llvm pass manager. | |
| static void | releaseAndersenSCD () |
Static Public Member Functions inherited from SVF::Andersen | |
| static bool | classof (const Andersen *) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
| static bool | classof (const PointerAnalysis *pta) |
Static Public Member Functions inherited from SVF::AndersenBase | |
| static bool | classof (const AndersenBase *) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
| static bool | classof (const PointerAnalysis *pta) |
Static Public Member Functions inherited from SVF::BVDataPTAImpl | |
| static bool | classof (const PointerAnalysis *pta) |
Protected Member Functions | |
| void | addSccCandidate (NodeID nodeId) |
| virtual NodeStack & | SCCDetect () |
| virtual void | PWCDetect () |
| virtual void | solveWorklist () |
| virtual void | handleLoadStore (ConstraintNode *node) |
| virtual void | processAddr (const AddrCGEdge *addr) |
| virtual bool | addCopyEdge (NodeID src, NodeID dst) |
| virtual bool | updateCallGraph (const CallSiteToFunPtrMap &callsites) |
| virtual void | processPWC (ConstraintNode *rep) |
| virtual void | handleCopyGep (ConstraintNode *node) |
Protected Member Functions inherited from SVF::Andersen | |
| virtual void | computeDiffPts (NodeID id) |
| Handle diff points-to set. | |
| virtual const PointsTo & | getDiffPts (NodeID id) |
| void | updatePropaPts (NodeID dstId, NodeID srcId) |
| Handle propagated points-to set. | |
| void | clearPropaPts (NodeID src) |
| virtual void | initWorklist () |
| virtual void | processNode (NodeID nodeId) |
| Override WPASolver function in order to use the default solver. | |
| void | processAllAddr () |
| handling various constraints | |
| virtual bool | processLoad (NodeID node, const ConstraintEdge *load) |
| virtual bool | processStore (NodeID node, const ConstraintEdge *load) |
| virtual bool | processCopy (NodeID node, const ConstraintEdge *edge) |
| virtual bool | processGep (NodeID node, const GepCGEdge *edge) |
| virtual bool | processGepPts (const PointsTo &pts, const GepCGEdge *edge) |
| virtual void | mergeNodeToRep (NodeID nodeId, NodeID newRepId) |
| Merge sub node to its rep. | |
| virtual bool | mergeSrcToTgt (NodeID srcId, NodeID tgtId) |
| void | mergeSccNodes (NodeID repNodeId, const NodeBS &subNodes) |
| Merge sub node in a SCC cycle to their rep node. | |
| void | mergeSccCycle () |
| virtual void | collapsePWCNode (NodeID nodeId) |
| Collapse a field object into its base for field insensitive analysis. | |
| void | collapseFields () |
| collapse positive weight cycles of a graph | |
| bool | collapseNodePts (NodeID nodeId) |
| bool | collapseField (NodeID nodeId) |
| void | updateNodeRepAndSubs (NodeID nodeId, NodeID newRepId) |
| Updates subnodes of its rep, and rep node of its subs. | |
| std::optional< NodeBS > | collectMayAliasesFromIndex (const PointsTo &expandedPts) |
| virtual void | validateSuccessTests (std::string fun) |
| Also check getMayAliases on the pointers that the alias tests use. | |
| void | sanitizePts () |
| Sanitize pts for field insensitive objects. | |
| virtual const std::string | PTAName () const |
| Get PTA name. | |
| virtual void | cluster (void) const |
Protected Member Functions inherited from SVF::AndersenBase | |
| void | heapAllocatorViaIndCall (const CallICFGNode *cs, NodePairSet &cpySrcNodes) |
Protected Member Functions inherited from SVF::WPASolver< GraphType > | |
| WPASolver () | |
| Constructor. | |
| virtual | ~WPASolver ()=default |
| Destructor. | |
| SCC * | getSCCDetector () const |
| Get SCC detector. | |
| const GraphType | graph () |
| Get/Set graph methods. | |
| void | setGraph (GraphType g) |
| virtual NodeStack & | SCCDetect (NodeSet &candidates) |
| virtual void | propagate (GNODE *v) |
| virtual bool | propFromSrcToDst (GEDGE *) |
| Propagate information from source to destination node, to be implemented in the child class. | |
| NodeID | popFromWorklist () |
| Worklist operations. | |
| virtual void | pushIntoWorklist (NodeID id) |
| bool | isWorklistEmpty () |
| bool | isInWorklist (NodeID id) |
| GNODE * | Node (NodeID id) |
| Get node on the graph. | |
| NodeID | Node_Index (GNODE node) |
| Get node ID. | |
Protected Member Functions inherited from SVF::BVDataPTAImpl | |
| PTDataTy * | getPTDataTy () const |
| Get points-to data structure. | |
| void | finalize () override |
| Finalization of pointer analysis, and normalize points-to information to Bit Vector representation. | |
| DiffPTDataTy * | getDiffPTDataTy () const |
| DFPTDataTy * | getDFPTDataTy () const |
| MutDFPTDataTy * | getMutDFPTDataTy () const |
| VersionedPTDataTy * | getVersionedPTDataTy () const |
| virtual void | onTheFlyCallGraphSolve (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges) |
| On the fly call graph construction. | |
| virtual void | onTheFlyThreadCallGraphSolve (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newForkEdges) |
| On the fly thread call graph construction respecting forksite. | |
Protected Member Functions inherited from SVF::PointerAnalysis | |
| 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 | validateExpectedFailureTests (std::string fun) |
| void | resetObjFieldSensitive () |
| Reset all object node as field-sensitive. | |
Protected Attributes | |
| NodeSet | sccCandidates |
| NodeToNodeMap | pwcReps |
Protected Attributes inherited from SVF::Andersen | |
| CallSite2DummyValPN | callsite2DummyValPN |
| Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator. | |
Protected Attributes inherited from SVF::AndersenBase | |
| ConstraintGraph * | consCG |
| Constraint Graph. | |
| CallSite2DummyValPN | callsite2DummyValPN |
Protected Attributes inherited from SVF::WPASolver< GraphType > | |
| bool | reanalyze |
| Reanalyze if any constraint value changed. | |
| u32_t | iterationForPrintStat |
| print out statistics for i-th iteration | |
| GraphType | _graph |
| Graph. | |
| std::unique_ptr< SCC > | scc |
| SCC. | |
| WorkList | worklist |
| Worklist for resolution. | |
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. | |
Static Protected Attributes | |
| static AndersenSCD * | scdAndersen = nullptr |
Static Protected Attributes inherited from SVF::PointerAnalysis | |
| static SVFIR * | pag = nullptr |
| SVFIR. | |
Selective Cycle Detection Based Andersen Analysis
Definition at line 46 of file AndersenPWC.h.
Definition at line 49 of file AndersenPWC.h.
|
inline |
Definition at line 57 of file AndersenPWC.h.
If one copy edge is successful added, the src node should be added into SCC detection
Reimplemented from SVF::Andersen.
Definition at line 262 of file AndersenSCD.cpp.
|
inlineprotected |
Definition at line 82 of file AndersenPWC.h.
|
inlinestatic |
Create an singleton instance directly instead of invoking llvm pass manager.
Definition at line 63 of file AndersenPWC.h.
|
protectedvirtual |
Compute diff points-to set before propagation
Reimplemented from SVF::Andersen.
Definition at line 150 of file AndersenSCD.cpp.
|
protectedvirtual |
Source nodes of new added edges are pushed into sccCandidates. Source nodes of new added edges whose pts differ from those of dst nodes are pushed into worklist.
Reimplemented from SVF::Andersen.
Definition at line 209 of file AndersenSCD.cpp.
|
protectedvirtual |
Initialize worklist via processing addrs
Reimplemented from SVF::Andersen.
Definition at line 248 of file AndersenSCD.cpp.
|
protectedvirtual |
Definition at line 164 of file AndersenSCD.cpp.
|
protectedvirtual |
Reimplemented in SVF::AndersenSFR.
Definition at line 127 of file AndersenSCD.cpp.
|
inlinestatic |
Definition at line 74 of file AndersenPWC.h.
|
protectedvirtual |
SCC detection for SCD
Reimplemented from SVF::Andersen.
Definition at line 98 of file AndersenSCD.cpp.
|
protectedvirtual |
Reimplemented from SVF::WPASolver< GraphType >.
Definition at line 45 of file AndersenSCD.cpp.
|
protectedvirtual |
Update call graph for the input indirect callsites
nodes as a src of a generated new copy edge
Reimplemented from SVF::AndersenBase.
Definition at line 276 of file AndersenSCD.cpp.
|
protected |
Definition at line 54 of file AndersenPWC.h.
|
protected |
Definition at line 53 of file AndersenPWC.h.
|
staticprotected |
Definition at line 52 of file AndersenPWC.h.