|
| TypeAnalysis (SVFIR *pag) |
| Constructor.
|
|
virtual | ~TypeAnalysis () |
| Destructor.
|
|
void | analyze () override |
| Type analysis.
|
|
void | initialize () override |
| Initialize analysis.
|
|
virtual void | finalize () override |
| Finalize analysis.
|
|
bool | addCopyEdge (NodeID src, NodeID dst) override |
| Add copy edge on constraint graph.
|
|
void | callGraphSolveBasedOnCHA (const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges) |
| Resolve callgraph based on CHA.
|
|
void | dumpCHAStats () |
| Statistics of CHA and callgraph.
|
|
Public Member Functions inherited from SVF::AndersenBase |
| AndersenBase (SVFIR *_pag, PTATY type=Andersen_BASE, bool alias_check=true) |
| Constructor.
|
|
| ~AndersenBase () override |
| Destructor.
|
|
virtual void | solveAndwritePtsToFile (const std::string &filename) |
|
virtual void | readPtsFromFile (const std::string &filename) |
|
virtual void | solveConstraints () |
|
virtual bool | updateCallGraph (const CallSiteToFunPtrMap &) override |
| Update call graph.
|
|
virtual bool | updateThreadCallGraph (const CallSiteToFunPtrMap &, NodePairSet &) |
| Update thread call graph.
|
|
virtual void | connectCaller2ForkedFunParams (const CallICFGNode *cs, const FunObjVar *F, NodePairSet &cpySrcNodes) |
| Connect formal and actual parameters for indirect forksites.
|
|
virtual void | connectCaller2CalleeParams (const CallICFGNode *cs, const FunObjVar *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 | unionPts (NodeID id, const PointsTo &target) |
|
virtual bool | unionPts (NodeID id, NodeID ptd) |
|
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 SVFVar *V1, const SVFVar *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.
|
|
CallGraph * | 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 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.
|
|
virtual const std::string | PTAName () const |
| Return PTA name.
|
|
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 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 |
|