Static Value-Flow Analysis
|
#include <CHG.h>
Public Types | |
enum | RELATIONTYPE { CONSTRUCTOR = 0x1 , DESTRUCTOR = 0x2 } |
typedef Set< const CHNode * > | CHNodeSetTy |
typedef FIFOWorkList< const CHNode * > | WorkList |
typedef Map< std::string, CHNodeSetTy > | NameToCHNodesMap |
typedef Map< const ICFGNode *, CHNodeSetTy > | CallNodeToCHNodesMap |
typedef Map< const ICFGNode *, VTableSet > | CallNodeToVTableSetMap |
typedef Map< const ICFGNode *, VFunSet > | CallNodeToVFunSetMap |
Public Types inherited from SVF::CommonCHGraph | |
enum | CHGKind { Standard , DI } |
Public Types inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
typedef NodeTy | NodeType |
typedef EdgeTy | EdgeType |
typedef OrderedMap< NodeID, NodeType * > | IDToNodeMapTy |
NodeID to GenericNode map. More... | |
typedef IDToNodeMapTy::iterator | iterator |
Node Iterators. More... | |
typedef IDToNodeMapTy::const_iterator | const_iterator |
Public Member Functions | |
CHGraph (SVFModule *svfModule) | |
~CHGraph () override=default | |
void | addEdge (const std::string className, const std::string baseClassName, CHEdge::CHEDGETYPE edgeType) |
CHNode * | getNode (const std::string name) const |
void | getVFnsFromVtbls (const CallICFGNode *cs, const VTableSet &vtbls, VFunSet &virtualFunctions) override |
void | dump (const std::string &filename) |
void | view () |
void | printCH () |
u32_t | getVirtualFunctionID (const SVFFunction *vfn) const |
const SVFFunction * | getVirtualFunctionBasedonID (u32_t id) const |
void | addInstances (const std::string templateName, CHNode *node) |
const CHNodeSetTy & | getDescendants (const std::string className) |
const CHNodeSetTy & | getInstances (const std::string className) |
bool | csHasVtblsBasedonCHA (const CallICFGNode *cs) override |
bool | csHasVFnsBasedonCHA (const CallICFGNode *cs) override |
const VTableSet & | getCSVtblsBasedonCHA (const CallICFGNode *cs) override |
const VFunSet & | getCSVFsBasedonCHA (const CallICFGNode *cs) override |
Public Member Functions inherited from SVF::CommonCHGraph | |
virtual | ~CommonCHGraph () |
CHGKind | getKind (void) const |
Public Member Functions inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
GenericGraph () | |
Constructor. More... | |
virtual | ~GenericGraph () |
Destructor. More... | |
void | destroy () |
Release memory. More... | |
iterator | begin () |
Iterators. More... | |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
void | addGNode (NodeID id, NodeType *node) |
Add a Node. More... | |
NodeType * | getGNode (NodeID id) const |
Get a node. More... | |
bool | hasGNode (NodeID id) const |
Has a node. More... | |
void | removeGNode (NodeType *node) |
Delete a node. More... | |
u32_t | getTotalNodeNum () const |
Get total number of node/edge. More... | |
u32_t | getTotalEdgeNum () const |
void | incNodeNum () |
Increase number of node/edge. More... | |
void | incEdgeNum () |
Static Public Member Functions | |
static bool | classof (const CommonCHGraph *chg) |
Friends | |
class | SVFIRWriter |
class | SVFIRReader |
class | CHGBuilder |
Additional Inherited Members | |
Public Attributes inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
u32_t | edgeNum |
total num of node More... | |
u32_t | nodeNum |
total num of edge More... | |
Protected Attributes inherited from SVF::CommonCHGraph | |
CHGKind | kind |
Protected Attributes inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
IDToNodeMapTy | IDToNodeMap |
node map More... | |
typedef Map<const ICFGNode*, CHNodeSetTy> SVF::CHGraph::CallNodeToCHNodesMap |
typedef Map<const ICFGNode*, VFunSet> SVF::CHGraph::CallNodeToVFunSetMap |
typedef Map<const ICFGNode*, VTableSet> SVF::CHGraph::CallNodeToVTableSetMap |
typedef Set<const CHNode*> SVF::CHGraph::CHNodeSetTy |
typedef FIFOWorkList<const CHNode*> SVF::CHGraph::WorkList |
|
overridedefault |
void CHGraph::addEdge | ( | const std::string | className, |
const std::string | baseClassName, | ||
CHEdge::CHEDGETYPE | edgeType | ||
) |
Definition at line 97 of file CHG.cpp.
|
inline |
|
inlinestatic |
|
overridevirtual |
|
overridevirtual |
Implements SVF::CommonCHGraph.
Definition at line 74 of file CHG.cpp.
void CHGraph::dump | ( | const std::string & | filename | ) |
Dump call graph into dot file
Definition at line 242 of file CHG.cpp.
|
overridevirtual |
|
overridevirtual |
|
inline |
|
inline |
CHNode * CHGraph::getNode | ( | const std::string | name | ) | const |
|
overridevirtual |
get target virtual functions
get the function name of the virtual callsite
Implements SVF::CommonCHGraph.
Definition at line 124 of file CHG.cpp.
|
inline |
|
inline |
void CHGraph::printCH | ( | ) |
Definition at line 218 of file CHG.cpp.
void CHGraph::view | ( | ) |
Definition at line 248 of file CHG.cpp.
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |