VirtualCFG::CFGNode Class Reference

#include <virtualCFG.h>

Collaboration diagram for VirtualCFG::CFGNode:

Collaboration graph
[legend]
List of all members.

Detailed Description

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 Member Functions

 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.
SgNodegetNode () const
 The underlying AST node.
unsigned int getIndex () const
 An identifying index within the AST node given by getNode().
std::vector< CFGEdgeoutEdges () const
 Outgoing control flow edges from this node.
std::vector< CFGEdgeinEdges () const
 Incoming control flow edges to this node.
bool isInteresting () const
 Test whether this node satisfies a (fairly arbitrary) standard for "interestingness".
bool operator== (const CFGNode &o) const
 Equality operator.
bool operator!= (const CFGNode &o) const
 Disequality operator.
bool operator< (const CFGNode &o) const
 Less-than operator.

Private Attributes

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


Constructor & Destructor Documentation

VirtualCFG::CFGNode::CFGNode (  )  [inline]

VirtualCFG::CFGNode::CFGNode ( SgNode node,
unsigned int  index = 0 
) [inline, explicit]


Member Function Documentation

std::string VirtualCFG::CFGNode::toString (  )  const

Pretty string for Dot node labels, etc.

std::string VirtualCFG::CFGNode::toStringForDebugging (  )  const

String for debugging graphs.

std::string VirtualCFG::CFGNode::id (  )  const

ID to use for Dot, etc.

SgNode* VirtualCFG::CFGNode::getNode (  )  const [inline]

The underlying AST node.

unsigned int VirtualCFG::CFGNode::getIndex (  )  const [inline]

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

std::vector<CFGEdge> VirtualCFG::CFGNode::outEdges (  )  const

Outgoing control flow edges from this node.

std::vector<CFGEdge> VirtualCFG::CFGNode::inEdges (  )  const

Incoming control flow edges to this node.

bool VirtualCFG::CFGNode::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.

bool VirtualCFG::CFGNode::operator== ( const CFGNode o  )  const [inline]

Equality operator.

bool VirtualCFG::CFGNode::operator!= ( const CFGNode o  )  const [inline]

Disequality operator.

bool VirtualCFG::CFGNode::operator< ( const CFGNode o  )  const [inline]

Less-than operator.


Member Data Documentation

SgNode* VirtualCFG::CFGNode::node [private]

The AST node from this CFG node.

unsigned int VirtualCFG::CFGNode::index [private]

An index to differentiate control flow points within a single AST node (for example, before and after the test of an if statement).


The documentation for this class was generated from the following file:
Generated on Mon Aug 30 21:43:28 2010 for ROSE by  doxygen 1.4.7