|
Static Value-Flow Analysis
|
#include <MTASlicer.h>
Public Member Functions | |
| ~SlicedTCT () override=default | |
Public Member Functions inherited from SVF::TCT | |
| virtual | ~TCT () |
| Destructor. | |
| ThreadCallGraph * | getThreadCallGraph () const |
| Get TCG. | |
| PointerAnalysis * | getPTA () const |
| Get PTA. | |
| TCTNode * | getTCTNode (NodeID id) const |
| Get TCT node. | |
| TCTEdge * | hasGraphEdge (TCTNode *src, TCTNode *dst, TCTEdge::CEDGEK kind) const |
| Whether we have already created this call graph edge. | |
| TCTEdge * | getGraphEdge (TCTNode *src, TCTNode *dst, TCTEdge::CEDGEK kind) |
| Get call graph edge via nodes. | |
| ThreadCreateEdgeSet::const_iterator | getChildrenBegin (const TCTNode *node) const |
| Get children and parent nodes. | |
| ThreadCreateEdgeSet::const_iterator | getChildrenEnd (const TCTNode *node) const |
| ThreadCreateEdgeSet::const_iterator | getParentsBegin (const TCTNode *node) const |
| ThreadCreateEdgeSet::const_iterator | getParentsEnd (const TCTNode *node) const |
| const FunSet & | getMakredProcs () const |
| Get marked candidate functions. | |
| const FunSet & | getEntryProcs () const |
| Get marked candidate functions. | |
| u32_t | getTCTNodeNum () const |
| Get Statistics. | |
| u32_t | getTCTEdgeNum () const |
| u32_t | getMaxCxtSize () const |
| bool | isExtCall (const ICFGNode *inst) |
| Whether it is calling an external function. | |
| bool | isCallSite (const ICFGNode *inst) |
| Whether it is a callsite. | |
| bool | hasTCTNode (const CxtThread &ct) const |
| Find/Get TCT node. | |
| TCTNode * | getTCTNode (const CxtThread &ct) const |
| bool | isCandidateFun (const CallGraph::FunctionSet &callees) const |
| Whether it is a candidate function for indirect call. | |
| bool | isCandidateFun (const FunObjVar *fun) const |
| bool | inSameCallGraphSCC (const CallGraphNode *src, const CallGraphNode *dst) |
| Whether two functions in the same callgraph scc. | |
| bool | hasParentThread (NodeID tid) const |
| Get parent and sibling threads. | |
| NodeBS | getParentThreads (NodeID tid) const |
| Get parent threads. | |
| const NodeBS | getAncestorThreads (NodeID tid) const |
| Get all ancestor threads. | |
| const NodeBS | getSiblingThread (NodeID tid) const |
| Get sibling threads. | |
| const CallStrCxtSet & | getCxtOfCxtThread (const CxtThread &ct) const |
| get the contexts of a thread at its spawning sites (fork sites) | |
| const FunObjVar * | getStartRoutineOfCxtThread (const CxtThread &ct) const |
| get the start routine function of a thread | |
| LoopBBs & | getJoinLoop (const CallICFGNode *join) |
| Get loop for join site. | |
| bool | hasJoinLoop (const CallICFGNode *join) const |
| bool | hasLoop (const SVFBasicBlock *bb) const |
| bool | hasLoop (const ICFGNode *inst) const |
| bool | isJoinMustExecutedInLoop (const LoopBBs &lp, const ICFGNode *join) |
| Return true if a join instruction must be executed inside a loop. | |
| const LoopBBs & | getLoop (const ICFGNode *inst) |
| Get loop for an instruction. | |
| const LoopBBs & | getLoop (const SVFBasicBlock *bb) |
| Get loop for fork/join site. | |
| virtual void | pushCxt (CallStrCxt &cxt, const CallICFGNode *call, const FunObjVar *callee) |
| Context helper functions. | |
| bool | matchAndPopCxt (CallStrCxt &cxt, const CallICFGNode *call, const FunObjVar *callee) |
| Match context. | |
| bool | isContextSuffix (const CallStrCxt &lhs, const CallStrCxt &call) |
| If lhs is a suffix of rhs, including equal. | |
| bool | isJoinSiteInRecursion (const CallICFGNode *join) const |
| Whether a join site is in recursion. | |
| void | dumpCxt (CallStrCxt &cxt) |
| Dump calling context. | |
| void | dump (const std::string &filename) |
| Dump the graph. | |
| void | print () const |
| Print TCT information. | |
Public Member Functions inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
| GenericGraph () | |
| Constructor. | |
| virtual | ~GenericGraph () |
| Destructor. | |
| void | destroy () |
| Release memory. | |
| iterator | begin () |
| Iterators. | |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| void | addGNode (NodeID id, NodeType *node) |
| Add a Node. | |
| NodeType * | getGNode (NodeID id) const |
| Get a node. | |
| bool | hasGNode (NodeID id) const |
| Has a node. | |
| void | removeGNode (NodeType *node) |
| Delete a node. | |
| u32_t | getTotalNodeNum () const |
| Get total number of node/edge. | |
| u32_t | getTotalEdgeNum () const |
| void | incNodeNum () |
| Increase number of node/edge. | |
| void | incEdgeNum () |
Static Public Member Functions | |
| static std::unique_ptr< SlicedTCT > | create (PointerAnalysis &pointerAnalysis, const SlicedSVFIRView &slicedView, u32_t contextLimit) |
Static Public Member Functions inherited from SVF::TCT | |
| static std::unique_ptr< TCT > | create (PointerAnalysis *p) |
| Construct and build a TCT with the command-line context bound. | |
| static std::unique_ptr< TCT > | create (PointerAnalysis *p, u32_t contextLimit) |
Private Member Functions | |
| SlicedTCT (PointerAnalysis &pointerAnalysis, const SlicedSVFIRView &slicedView, u32_t contextLimit) | |
| void | collectEntryFunInCallGraph () override |
| Get entry functions that are neither called by other functions nor extern functions. | |
| bool | isKeptNode (const CallGraphNode *node) const |
| bool | isKeptEdge (const CallGraphEdge *edge) const |
| void | getKeptForkSites (std::vector< const ICFGNode * > &out) const |
| void | getKeptJoinSites (std::vector< const ICFGNode * > &out) const |
Private Attributes | |
| const SlicedThreadCallGraphView & | tcgView |
Definition at line 82 of file MTASlicer.h.
|
overridedefault |
|
private |
Definition at line 66 of file MTASlicer.cpp.
|
overrideprotectedvirtual |
Build TCT.
Start building TCT
Reimplemented from SVF::TCT.
Definition at line 73 of file MTASlicer.cpp.
|
overrideprivatevirtual |
Get entry functions that are neither called by other functions nor extern functions.
Get entry function, i.e., functions without callers, e.g., main function
Reimplemented from SVF::TCT.
Definition at line 209 of file MTASlicer.cpp.
|
overrideprotectedvirtual |
Handle join site in loop.
collect loop info for join sites
Collect loop info for join sites the in-loop join site must be joined if the loop is executed
Reimplemented from SVF::TCT.
Definition at line 182 of file MTASlicer.cpp.
|
static |
| pointerAnalysis | the shared Andersen pre-analysis |
| slicedView | SlicedSVFIRView containing a SlicedThreadCallGraphView |
| contextLimit | maximum context length for the main analysis |
Definition at line 56 of file MTASlicer.cpp.
Definition at line 254 of file MTASlicer.cpp.
Definition at line 275 of file MTASlicer.cpp.
|
overrideprotectedvirtual |
Handle call relations.
Handle call relations
handle calling context for candidate functions only
Create spawnee TCT node
Add TCT nodes and edge
Reimplemented from SVF::TCT.
Definition at line 230 of file MTASlicer.cpp.
|
private |
Definition at line 249 of file MTASlicer.cpp.
|
private |
Definition at line 244 of file MTASlicer.cpp.
|
overrideprotectedvirtual |
Mark relevant procedures that are backward reachable from any fork/join site.
Mark relevant procedures that are backward reachable from any fork/join site
Reimplemented from SVF::TCT.
Definition at line 121 of file MTASlicer.cpp.
Add relevant procedures that are backward reachable from svffun on Thread Call Graph
Reimplemented from SVF::TCT.
Definition at line 157 of file MTASlicer.cpp.
|
private |
Definition at line 107 of file MTASlicer.h.