ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SDG::ProgramDependenceGraph Class Reference

#include <PDG.h>

Inheritance diagram for SDG::ProgramDependenceGraph:
Collaboration diagram for SDG::ProgramDependenceGraph:

Public Types

typedef boost::graph_traits
< ProgramDependenceGraph >
::vertex_descriptor 
Vertex
 
typedef boost::graph_traits
< ProgramDependenceGraph >
::edge_descriptor 
Edge
 

Public Member Functions

 ProgramDependenceGraph ()
 The default constructor. More...
 
 ProgramDependenceGraph (const CFG &cfg)
 The constructor building the PDG from a CFG. More...
 
 ProgramDependenceGraph (SgFunctionDefinition *funcDef)
 The constructor building the PDG from a function definition. More...
 
void build (const CFG &cfg)
 Build the PDG from the given CFG. More...
 
void toDot (const std::string &filename) const
 Write the PDG to a dot file. More...
 
Vertex getEntry () const
 

Protected Types

typedef StaticCFG::ControlFlowGraph CFG
 
typedef CFG::Vertex CFGVertex
 
typedef CFG::Edge CFGEdge
 

Protected Member Functions

void addControlDependenceEdges (const std::map< CFGVertex, Vertex > &cfgVerticesToPdgVertices, const CFG &cfg)
 
void addDataDependenceEdges (const std::map< CFGVertex, Vertex > &cfgVerticesToPdgVertices, const CFG &cfg)
 
void writeGraphNode (std::ostream &out, const Vertex &node) const
 This function helps to write the DOT file for vertices. More...
 
void writeGraphEdge (std::ostream &out, const Edge &edge) const
 This function helps to write the DOT file for edges. More...
 

Protected Attributes

Vertex entry_
 The entry of the PDG. More...
 

Detailed Description

Definition at line 72 of file PDG.h.

Member Typedef Documentation

typedef boost::graph_traits<ProgramDependenceGraph>::vertex_descriptor SDG::ProgramDependenceGraph::Vertex

Definition at line 76 of file PDG.h.

typedef boost::graph_traits<ProgramDependenceGraph>::edge_descriptor SDG::ProgramDependenceGraph::Edge

Definition at line 77 of file PDG.h.

Definition at line 80 of file PDG.h.

Definition at line 81 of file PDG.h.

Definition at line 82 of file PDG.h.

Constructor & Destructor Documentation

SDG::ProgramDependenceGraph::ProgramDependenceGraph ( )
inline

The default constructor.

Definition at line 91 of file PDG.h.

SDG::ProgramDependenceGraph::ProgramDependenceGraph ( const CFG cfg)
inline

The constructor building the PDG from a CFG.

Definition at line 94 of file PDG.h.

References build().

SDG::ProgramDependenceGraph::ProgramDependenceGraph ( SgFunctionDefinition funcDef)
inline

The constructor building the PDG from a function definition.

Definition at line 100 of file PDG.h.

References build(), and cfg.

Member Function Documentation

void SDG::ProgramDependenceGraph::build ( const CFG cfg)

Build the PDG from the given CFG.

Referenced by ProgramDependenceGraph().

void SDG::ProgramDependenceGraph::toDot ( const std::string &  filename) const

Write the PDG to a dot file.

Vertex SDG::ProgramDependenceGraph::getEntry ( ) const
inline

Definition at line 112 of file PDG.h.

References entry_.

void SDG::ProgramDependenceGraph::addControlDependenceEdges ( const std::map< CFGVertex, Vertex > &  cfgVerticesToPdgVertices,
const CFG cfg 
)
protected
void SDG::ProgramDependenceGraph::addDataDependenceEdges ( const std::map< CFGVertex, Vertex > &  cfgVerticesToPdgVertices,
const CFG cfg 
)
protected
void SDG::ProgramDependenceGraph::writeGraphNode ( std::ostream &  out,
const Vertex node 
) const
inlineprotected

This function helps to write the DOT file for vertices.

Definition at line 125 of file PDG.h.

References entry_, and StaticCFG::writeCFGNode().

void SDG::ProgramDependenceGraph::writeGraphEdge ( std::ostream &  out,
const Edge edge 
) const
protected

This function helps to write the DOT file for edges.

Member Data Documentation

Vertex SDG::ProgramDependenceGraph::entry_
protected

The entry of the PDG.

Vertices which postdominate the entry of the CFG are control dependent on this vectex with label T.

Definition at line 87 of file PDG.h.

Referenced by getEntry(), and writeGraphNode().


The documentation for this class was generated from the following file: