|
typedef Map< NodeID, NodeID > | NodeToNodeMap |
|
Public Types inherited from SVF::Andersen |
typedef SCCDetection< ConstraintGraph * > | CGSCC |
|
Public Types inherited from SVF::AndersenBase |
typedef OrderedMap< const CallICFGNode *, NodeID > | CallSite2DummyValPN |
|
typedef SVF::GenericGraphTraits< GraphType > | GTraits |
| Define the GTraits and node iterator for printing.
|
|
typedef GTraits::NodeRef | GNODE |
|
typedef GTraits::EdgeType | GEDGE |
|
typedef GTraits::ChildIteratorType | child_iterator |
|
typedef SCCDetection< GraphType > | SCC |
|
typedef FIFOWorkList< NodeID > | WorkList |
|
enum | PTBackingType { Mutable
, Persistent
} |
| How the PTData used is implemented. More...
|
|
typedef PTData< NodeID, NodeSet, NodeID, PointsTo > | PTDataTy |
|
typedef DiffPTData< NodeID, NodeSet, NodeID, PointsTo > | DiffPTDataTy |
|
typedef DFPTData< NodeID, NodeSet, NodeID, PointsTo > | DFPTDataTy |
|
typedef VersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > | VersionedPTDataTy |
|
typedef MutablePTData< NodeID, NodeSet, NodeID, PointsTo > | MutPTDataTy |
|
typedef MutableDiffPTData< NodeID, NodeSet, NodeID, PointsTo > | MutDiffPTDataTy |
|
typedef MutableDFPTData< NodeID, NodeSet, NodeID, PointsTo > | MutDFPTDataTy |
|
typedef MutableIncDFPTData< NodeID, NodeSet, NodeID, PointsTo > | MutIncDFPTDataTy |
|
typedef MutableVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > | MutVersionedPTDataTy |
|
typedef PersistentPTData< NodeID, NodeSet, NodeID, PointsTo > | PersPTDataTy |
|
typedef PersistentDiffPTData< NodeID, NodeSet, NodeID, PointsTo > | PersDiffPTDataTy |
|
typedef PersistentDFPTData< NodeID, NodeSet, NodeID, PointsTo > | PersDFPTDataTy |
|
typedef PersistentIncDFPTData< NodeID, NodeSet, NodeID, PointsTo > | PersIncDFPTDataTy |
|
typedef PersistentVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > | PersVersionedPTDataTy |
|
enum | PTATY {
Andersen_BASE
, Andersen_WPA
, AndersenSCD_WPA
, AndersenSFR_WPA
,
AndersenWaveDiff_WPA
, Steensgaard_WPA
, CSCallString_WPA
, CSSummary_WPA
,
FSDATAFLOW_WPA
, FSSPARSE_WPA
, VFS_WPA
, FSCS_WPA
,
CFLFICI_WPA
, CFLFSCI_WPA
, CFLFSCS_WPA
, TypeCPP_WPA
,
FieldS_DDA
, FlowS_DDA
, PathS_DDA
, Cxt_DDA
,
Default_PTA
} |
| Pointer analysis type list. More...
|
|
enum | PTAImplTy { BaseImpl
, BVDataImpl
, CondImpl
} |
| Implementation type: BVDataPTAImpl or CondPTAImpl. More...
|
|
typedef Set< const CallICFGNode * > | CallSiteSet |
| Indirect call edges type, map a callsite to a set of callees.
|
|
typedef SVFIR::CallSiteToFunPtrMap | CallSiteToFunPtrMap |
|
typedef Set< const SVFFunction * > | FunctionSet |
|
typedef OrderedMap< const CallICFGNode *, FunctionSet > | CallEdgeMap |
|
typedef SCCDetection< PTACallGraph * > | CallGraphSCC |
|
typedef Set< const SVFGlobalValue * > | VTableSet |
|
typedef Set< const SVFFunction * > | VFunSet |
|
|
| AndersenSCD (SVFIR *_pag, PTATY type=AndersenSCD_WPA) |
|
Public Member Functions inherited from SVF::Andersen |
| Andersen (SVFIR *_pag, PTATY type=Andersen_WPA, bool alias_check=true) |
| Constructor.
|
|
virtual | ~Andersen () |
| Destructor.
|
|
virtual void | initialize () |
| Initialize analysis.
|
|
virtual void | finalize () |
| Finalize analysis.
|
|
void | resetData () |
| Reset data.
|
|
virtual const PointsTo & | getPts (NodeID id) |
| Operation of points-to set.
|
|
virtual bool | unionPts (NodeID id, const PointsTo &target) |
|
virtual bool | unionPts (NodeID id, NodeID ptd) |
|
void | dumpTopLevelPtsTo () |
|
void | setDetectPWC (bool flag) |
|
Public Member Functions inherited from SVF::AndersenBase |
| AndersenBase (SVFIR *_pag, PTATY type=Andersen_BASE, bool alias_check=true) |
| Constructor.
|
|
| ~AndersenBase () override |
| Destructor.
|
|
virtual void | analyze () override |
| Andersen analysis.
|
|
virtual void | solveAndwritePtsToFile (const std::string &filename) |
|
virtual void | readPtsFromFile (const std::string &filename) |
|
virtual void | solveConstraints () |
|
virtual bool | updateThreadCallGraph (const CallSiteToFunPtrMap &, NodePairSet &) |
| Update thread call graph.
|
|
virtual void | connectCaller2ForkedFunParams (const CallICFGNode *cs, const SVFFunction *F, NodePairSet &cpySrcNodes) |
| Connect formal and actual parameters for indirect forksites.
|
|
virtual void | connectCaller2CalleeParams (const CallICFGNode *cs, const SVFFunction *F, NodePairSet &cpySrcNodes) |
| Connect formal and actual parameters for indirect callsites.
|
|
ConstraintGraph * | getConstraintGraph () |
| Get constraint graph.
|
|
NodeID | sccRepNode (NodeID id) const override |
| SCC methods.
|
|
NodeBS & | sccSubNodes (NodeID repId) |
|
void | printStat () |
| dump statistics
|
|
virtual void | normalizePointsTo () override |
|
void | cleanConsCG (NodeID id) |
| remove redundant gepnodes in constraint graph
|
|
| BVDataPTAImpl (SVFIR *pag, PointerAnalysis::PTATY type, bool alias_check=true) |
| Constructor.
|
|
| ~BVDataPTAImpl () override=default |
| Destructor.
|
|
PersistentPointsToCache< PointsTo > & | getPtCache () |
|
const PointsTo & | getPts (NodeID id) override |
|
const NodeSet & | getRevPts (NodeID nodeId) override |
|
virtual void | clearPts (NodeID id, NodeID element) |
| Remove element from the points-to set of id.
|
|
virtual void | clearFullPts (NodeID id) |
| Clear points-to set of id.
|
|
virtual bool | addPts (NodeID id, NodeID ptd) |
|
virtual void | clearAllPts () |
| Clear all data.
|
|
virtual void | expandFIObjs (const PointsTo &pts, PointsTo &expandedPts) |
| Expand FI objects.
|
|
virtual void | expandFIObjs (const NodeBS &pts, NodeBS &expandedPts) |
| TODO: remove repetition.
|
|
void | remapPointsToSets (void) |
| Remap all points-to sets to use the current mapping.
|
|
virtual void | writeToFile (const std::string &filename) |
| Interface for analysis result storage on filesystem.
|
|
virtual void | writeObjVarToFile (const std::string &filename) |
|
virtual void | writePtsResultToFile (std::fstream &f) |
|
virtual void | writeGepObjVarMapToFile (std::fstream &f) |
|
virtual bool | readFromFile (const std::string &filename) |
|
virtual void | readPtsResultFromFile (std::ifstream &f) |
|
virtual void | readGepObjVarMapFromFile (std::ifstream &f) |
|
virtual void | readAndSetObjFieldSensitivity (std::ifstream &f, const std::string &delimiterStr) |
|
AliasResult | alias (const SVFValue *V1, const SVFValue *V2) override |
| Interface expose to users of our pointer analysis, given Value infos.
|
|
AliasResult | alias (NodeID node1, NodeID node2) override |
| Interface expose to users of our pointer analysis, given PAGNodeID.
|
|
virtual AliasResult | alias (const PointsTo &pts1, const PointsTo &pts2) |
| Interface expose to users of our pointer analysis, given two pts.
|
|
void | dumpCPts () override |
| dump and debug, print out conditional pts
|
|
void | dumpTopLevelPtsTo () override |
|
void | dumpAllPts () override |
|
ICFG * | getICFG () const |
| Get ICFG.
|
|
u32_t | getNumOfResolvedIndCallEdge () const |
| Return number of resolved indirect call edges.
|
|
PTACallGraph * | getCallGraph () const |
| Return call graph.
|
|
CallGraphSCC * | getCallGraphSCC () const |
| Return call graph SCC.
|
|
| PointerAnalysis (SVFIR *pag, PTATY ty=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 SVFFunction *fun1, const SVFFunction *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 SVFFunction *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.
|
|
SVFModule * | getModule () const |
| Module.
|
|
OrderedNodeSet & | getAllValidPtrs () |
| Get all Valid Pointers for resolution.
|
|
virtual void | computeDDAPts (NodeID) |
| Compute points-to results on-demand, overridden by derived classes.
|
|
void | printIndCSTargets (const CallICFGNode *cs, const FunctionSet &targets) |
| Print targets of a function pointer.
|
|
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 | getBaseObjVar (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 |
|
|
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.
|
|
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) |
|
| 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.
|
|
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.
|
|
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.
|
|
Selective Cycle Detection Based Andersen Analysis
Definition at line 44 of file AndersenPWC.h.