Skip to content

VirtualCFG::CFGNode

A node in the control flow graph. Each CFG node corresponds to an AST node, but there can be several CFG nodes for a given AST node.

Synopsis

Declared in <SageIII/virtualCFG/virtualCFG.h>

class [[visibility("default")]] CFGNode;

Member Functions

Name Description
CFGNode
CFGNode(); [constructor]
Constructors
getIndex
unsigned int getIndex() const;
An identifying index within the AST node given by getNode()
getNode
SgNode* getNode() const;
The underlying AST node
id
std::string id() const;
ID to use for Dot, etc.
inEdges
std::vector<CFGEdge> inEdges() const;
Incoming control flow edges to this node
isInteresting
bool isInteresting() const;
Test whether this node satisfies a (fairly arbitrary) standard for "interestingness". There are many administrative nodes in the raw CFG (nodes that do not correspond to operations in the program), and this function filters them out.
outEdges
std::vector<CFGEdge> outEdges() const;
Outgoing control flow edges from this node
toString
std::string toString() const;
Pretty string for Dot node labels, etc.
toStringForDebugging
std::string toStringForDebugging() const;
String for debugging graphs
operator==
bool operator==(CFGNode const& o) const;
Equality operator
operator!=
bool operator!=(CFGNode const& o) const;
Disequality operator
operator<
bool operator<(CFGNode const& o) const;
Less-than operator

Private Data Members

Name Description
index An index to differentiate control flow points within a single AST node (for example, before and after the test of an if statement)
node The AST node from this CFG node

Created with MrDocs