VirtualCFG Namespace Reference


Classes

class  FilteredCFGNode
class  FilteredCFGEdge
struct  MakeClosure
class  CfgToDotImpl
class  CFGNode
 A node in the control flow graph. More...
class  CFGEdge
 A control flow edge connecting two CFG nodes, with an edge condition to indicate edge types. More...
class  CFGPath
class  InterestingNode
class  InterestingEdge

Enumerations

enum  EdgeConditionKind {
  eckUnconditional,
  eckTrue,
  eckFalse,
  eckCaseLabel,
  eckDefault,
  eckDoConditionPassed,
  eckDoConditionFailed,
  eckForallIndicesInRange,
  eckForallIndicesNotInRange,
  eckComputedGotoCaseLabel,
  eckArithmeticIfLess,
  eckArithmeticIfEqual,
  eckArithmeticIfGreater
}
 The conditions attached to edges are marked to determine which conditions trigger control to flow along that edge (as opposed to other edges out of the same source node). More...

Functions

std::ostream & cfgToDot (std::ostream &o, std::string graphName, CFGNode start)
std::ostream & cfgToDot (std::ostream &o, std::string graphName, InterestingNode start)
std::ostream & cfgToDotForDebugging (std::ostream &o, std::string graphName, CFGNode start)
std::ostream & cfgToDotForDebugging (std::ostream &o, std::string graphName, InterestingNode start)
void cfgToDot (SgNode *start, const std::string &file_name)
 Dump the filtered dot graph of a virtual control flow graph starting from SgNode (start).
void interestingCfgToDot (SgNode *start, const std::string &file_name)
 Dump a CFG with only interesting nodes for a SgNode.
void cfgToDotForDebugging (SgNode *start, const std::string &file_name)
 Dump the full dot graph of a virtual control flow graph starting from SgNode (start).
template<typename FilterFunction>
std::ostream & cfgToDot (std::ostream &o, std::string graphName, FilteredCFGNode< FilterFunction > start)
template<typename FilteredEdge, typename FindSuccessors, typename FindEnd, typename AddChildren, typename Join>
std::vector< FilteredEdge > makeClosure (const std::vector< CFGPath > &p, const FindSuccessors &findSuccessors, const FindEnd &findEnd, const AddChildren &addChildren, const Join &join)
template<typename FilteredEdge, typename Filter>
std::vector< FilteredEdge > makeClosure (const std::vector< CFGEdge > &orig, std::vector< CFGEdge >(CFGNode::*closure)() const, CFGNode(CFGPath::*otherSide)() const, CFGPath(*merge)(const CFGPath &, const CFGPath &), const Filter &filter)
template<typename NodeT>
void printNode (std::ostream &o, const NodeT &n)
template<typename EdgeT>
void printEdge (std::ostream &o, const EdgeT &e, bool isInEdge)
template<typename NodeT, typename EdgeT>
void printNodePlusEdges (std::ostream &o, NodeT n)
CFGPath mergePaths (const CFGPath &hd, const CFGPath &tl)
CFGPath mergePathsReversed (const CFGPath &tl, const CFGPath &hd)
CFGNode cfgBeginningOfConstruct (SgNode *c)
 The first CFG node for a construct (before the construct starts to execute).
unsigned int cfgIndexForEndWrapper (SgNode *n)
CFGNode cfgEndOfConstruct (SgNode *c)
 The last CFG node for a construct (after the entire construct has finished executing).
CFGNode makeCfg (SgNode *start)
 Returns CFG node for just before start.
InterestingNode makeInterestingCfg (SgNode *start)
CFGNode getCFGTargetOfFortranLabelSymbol (SgLabelSymbol *sym)
CFGNode getCFGTargetOfFortranLabelRef (SgLabelRefExp *lRef)


Enumeration Type Documentation

enum VirtualCFG::EdgeConditionKind

The conditions attached to edges are marked to determine which conditions trigger control to flow along that edge (as opposed to other edges out of the same source node).

For conditional branches (except eckCaseLabel and eckDefault), the conditions are implicit and depend on knowledge of the particular control structure. Fortran support for this is underdeveloped; single AST nodes representing variable-length loops was not part of the original design of the CFG code.

Enumerator:
eckUnconditional 
eckTrue  Normal, unconditional edge.
eckFalse  True case of a two-way branch.
eckCaseLabel  False case of a two-way branch.
eckDefault  Case label (constant is given by caseLabel()).
eckDoConditionPassed  Default label.
eckDoConditionFailed  Enter Fortran do loop body.
eckForallIndicesInRange  Fortran do loop finished.
eckForallIndicesNotInRange  Start testing forall mask.
eckComputedGotoCaseLabel  End of forall loop.
eckArithmeticIfLess  Case in computed goto -- number needs to be computed separately.
eckArithmeticIfEqual  Edge for the arithmetic if expression being less than zero.
eckArithmeticIfGreater  Edge for the arithmetic if expression being greater than zero.


Function Documentation

std::ostream& VirtualCFG::cfgToDot ( std::ostream &  o,
std::string  graphName,
CFGNode  start 
)

std::ostream& VirtualCFG::cfgToDot ( std::ostream &  o,
std::string  graphName,
InterestingNode  start 
)

std::ostream& VirtualCFG::cfgToDotForDebugging ( std::ostream &  o,
std::string  graphName,
CFGNode  start 
)

std::ostream& VirtualCFG::cfgToDotForDebugging ( std::ostream &  o,
std::string  graphName,
InterestingNode  start 
)

void VirtualCFG::cfgToDot ( SgNode start,
const std::string &  file_name 
)

Dump the filtered dot graph of a virtual control flow graph starting from SgNode (start).

void VirtualCFG::interestingCfgToDot ( SgNode start,
const std::string &  file_name 
)

Dump a CFG with only interesting nodes for a SgNode.

void VirtualCFG::cfgToDotForDebugging ( SgNode start,
const std::string &  file_name 
)

Dump the full dot graph of a virtual control flow graph starting from SgNode (start).

template<typename FilterFunction>
std::ostream & VirtualCFG::cfgToDot ( std::ostream &  o,
std::string  graphName,
FilteredCFGNode< FilterFunction >  start 
)

template<typename FilteredEdge, typename FindSuccessors, typename FindEnd, typename AddChildren, typename Join>
std::vector< FilteredEdge > VirtualCFG::makeClosure ( const std::vector< CFGPath > &  p,
const FindSuccessors &  findSuccessors,
const FindEnd &  findEnd,
const AddChildren &  addChildren,
const Join &  join 
)

template<typename FilteredEdge, typename Filter>
std::vector< FilteredEdge > VirtualCFG::makeClosure ( const std::vector< CFGEdge > &  orig,
std::vector< CFGEdge >(CFGNode::*)() const   closure,
CFGNode(CFGPath::*)() const   otherSide,
CFGPath(*)(const CFGPath &, const CFGPath &)  merge,
const Filter &  filter 
)

template<typename NodeT>
void VirtualCFG::printNode ( std::ostream &  o,
const NodeT &  n 
) [inline]

template<typename EdgeT>
void VirtualCFG::printEdge ( std::ostream &  o,
const EdgeT &  e,
bool  isInEdge 
) [inline]

template<typename NodeT, typename EdgeT>
void VirtualCFG::printNodePlusEdges ( std::ostream &  o,
NodeT  n 
)

CFGPath VirtualCFG::mergePaths ( const CFGPath &  hd,
const CFGPath &  tl 
) [inline]

For internal use only.

Merge two CFG paths

CFGPath VirtualCFG::mergePathsReversed ( const CFGPath &  tl,
const CFGPath &  hd 
) [inline]

For internal use only.

mergePaths() with the arguments reversed

CFGNode VirtualCFG::cfgBeginningOfConstruct ( SgNode c  )  [inline]

The first CFG node for a construct (before the construct starts to execute).

unsigned int VirtualCFG::cfgIndexForEndWrapper ( SgNode n  ) 

For internal use only.

Non-member wrapper for SgNode::cfgIndexForEnd since that has not yet been defined

CFGNode VirtualCFG::cfgEndOfConstruct ( SgNode c  )  [inline]

The last CFG node for a construct (after the entire construct has finished executing).

This node may not actually be reached if, for example, a goto causes a loop to be exited in the middle

CFGNode VirtualCFG::makeCfg ( SgNode start  )  [inline]

Returns CFG node for just before start.

InterestingNode VirtualCFG::makeInterestingCfg ( SgNode start  )  [inline]

CFGNode VirtualCFG::getCFGTargetOfFortranLabelSymbol ( SgLabelSymbol sym  ) 

For internal use only.

Get the CFG node for a Fortran label from its symbol

CFGNode VirtualCFG::getCFGTargetOfFortranLabelRef ( SgLabelRefExp lRef  ) 

For internal use only.

Get the CFG node for a Fortran label from a reference to it


Generated on Mon Aug 30 21:43:27 2010 for ROSE by  doxygen 1.4.7