ROSE
0.9.6a
|
A node in the control flow graph. More...
#include <virtualCFG.h>
Public Member Functions | |
CFGNode () | |
CFGNode (SgNode *node, unsigned int index=0) | |
std::string | toString () const |
Pretty string for Dot node labels, etc. More... | |
std::string | toStringForDebugging () const |
String for debugging graphs. More... | |
std::string | id () const |
ID to use for Dot, etc. More... | |
SgNode * | getNode () const |
The underlying AST node. More... | |
unsigned int | getIndex () const |
An identifying index within the AST node given by getNode() More... | |
std::vector< CFGEdge > | outEdges () const |
Outgoing control flow edges from this node. More... | |
std::vector< CFGEdge > | inEdges () const |
Incoming control flow edges to this node. More... | |
bool | isInteresting () const |
Test whether this node satisfies a (fairly arbitrary) standard for "interestingness". More... | |
bool | operator== (const CFGNode &o) const |
Equality operator. More... | |
bool | operator!= (const CFGNode &o) const |
Disequality operator. More... | |
bool | operator< (const CFGNode &o) const |
Less-than operator. More... | |
Private Attributes | |
SgNode * | node |
The AST node from this CFG node. More... | |
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) More... | |
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.
Definition at line 67 of file virtualCFG.h.
|
inline |
Definition at line 76 of file virtualCFG.h.
VirtualCFG::CFGNode::CFGNode | ( | SgNode * | node, |
unsigned int | index = 0 |
||
) |
std::string VirtualCFG::CFGNode::toString | ( | ) | const |
Pretty string for Dot node labels, etc.
Referenced by getGraphNodeType(), VirtualCFG::DataflowNode::toString(), VirtualCFG::FilteredCFGNode< IsImportantForSliceCFGFilter >::toString(), and VirtualCFG::InterestingNode::toString().
std::string VirtualCFG::CFGNode::toStringForDebugging | ( | ) | const |
String for debugging graphs.
Referenced by VirtualCFG::DataflowNode::toStringForDebugging(), VirtualCFG::FilteredCFGNode< IsImportantForSliceCFGFilter >::toStringForDebugging(), and VirtualCFG::InterestingNode::toStringForDebugging().
std::string VirtualCFG::CFGNode::id | ( | ) | const |
ID to use for Dot, etc.
Referenced by VirtualCFG::DataflowNode::id(), VirtualCFG::FilteredCFGNode< IsImportantForSliceCFGFilter >::id(), and VirtualCFG::InterestingNode::id().
|
inline |
The underlying AST node.
Definition at line 86 of file virtualCFG.h.
Referenced by VirtualCFG::CFGEdge::CFGEdge(), VirtualCFG::DataflowNode::getNode(), VirtualCFG::FilteredCFGNode< IsImportantForSliceCFGFilter >::getNode(), VirtualCFG::InterestingNode::getNode(), IsDFAFilter::operator()(), AliasCfgFilter::operator()(), IsImportantForSliceCFGFilter::operator()(), and DominatorTreesAndDominanceFrontiers::DefaultBasicDominatorTreeIsStatementFilter::operator()().
|
inline |
An identifying index within the AST node given by getNode()
Definition at line 88 of file virtualCFG.h.
Referenced by visitorTraversal::analyzePath(), evalFunction(), VirtualCFG::DataflowNode::getIndex(), VirtualCFG::FilteredCFGNode< IsImportantForSliceCFGFilter >::getIndex(), VirtualCFG::InterestingNode::getIndex(), IsDFAFilter::operator()(), and AliasCfgFilter::operator()().
std::vector<CFGEdge> VirtualCFG::CFGNode::outEdges | ( | ) | const |
Outgoing control flow edges from this node.
Referenced by VirtualCFG::FilteredCFGNode< FilterFunction >::outEdges().
std::vector<CFGEdge> VirtualCFG::CFGNode::inEdges | ( | ) | const |
Incoming control flow edges to this node.
Referenced by evalFunction(), and VirtualCFG::FilteredCFGNode< FilterFunction >::inEdges().
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.
Referenced by IsDFAFilter::operator()(), StaticCFG::InterestingCFGNodeFilter::operator()(), IsImportantForSliceCFGFilter::operator()(), Backstroke::InterestingCFGNodeFilter::operator()(), and DominatorTreesAndDominanceFrontiers::DefaultBasicDominatorTreeIsStatementFilter::operator()().
|
inline |
|
inline |
Disequality operator.
Definition at line 101 of file virtualCFG.h.
|
inline |
|
private |
The AST node from this CFG node.
Definition at line 69 of file virtualCFG.h.
Referenced by operator<(), and operator==().
|
private |
An index to differentiate control flow points within a single AST node (for example, before and after the test of an if statement)
Definition at line 73 of file virtualCFG.h.
Referenced by operator<(), and operator==().