Class CFGNode#

Class Documentation#

class 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.

Public Functions

inline CFGNode()#
CFGNode(SgNode *node, unsigned int index = 0)#
std::string toString() const#

Pretty string for Dot node labels, etc.

std::string toStringForDebugging() const#

String for debugging graphs.

std::string id() const#

ID to use for Dot, etc.

inline SgNode *getNode() const#

The underlying AST node.

inline unsigned int getIndex() const#

An identifying index within the AST node given by getNode()

std::vector<CFGEdge> outEdges() const#

Outgoing control flow edges from this node.

std::vector<CFGEdge> inEdges() const#

Incoming control flow edges to this node.

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.

inline bool operator==(const CFGNode &o) const#

Equality operator.

inline bool operator!=(const CFGNode &o) const#

Disequality operator.

inline bool operator<(const CFGNode &o) const#

Less-than operator.