ROSE
0.9.6a
|
#include <SDG.h>
Classes | |
struct | CallSiteInfo |
Public Types | |
typedef boost::graph_traits < SystemDependenceGraph > ::vertex_descriptor | Vertex |
typedef boost::graph_traits < SystemDependenceGraph > ::edge_descriptor | Edge |
Public Member Functions | |
SystemDependenceGraph (SgProject *project, StaticCFG::CFGNodeFilter filter) | |
void | build () |
Build the SDG. More... | |
void | setCFGNodeFilter (StaticCFG::CFGNodeFilter filter) |
void | setDefUseChainsGenerator (const DefUseChainsGen &defUseChainsGen) |
void | toDot (const std::string &filename) const |
Write the PDG to a dot file. More... | |
Protected Types | |
typedef StaticCFG::ControlFlowGraph | CFG |
typedef CFG::Vertex | CFGVertex |
typedef CFG::Edge | CFGEdge |
typedef boost::function< void(SgProject *, DefUseChains &)> | DefUseChainsGen |
Protected Member Functions | |
Vertex | addVertex (SDGNode *sdgNode) |
Edge | addEdge (Vertex src, Vertex tgt, SDGEdge *sdgEdge) |
void | addTrueCDEdge (Vertex src, Vertex tgt) |
Add a Control Dependence edge with True label. More... | |
void | addControlDependenceEdges (const boost::unordered_map< CFGVertex, Vertex > &cfgVerticesToSdgVertices, const CFG &cfg, Vertex entry) |
void | addDataDependenceEdges (const boost::unordered_map< SgNode *, Vertex > &astNodesToSdgVertices, const std::vector< CallSiteInfo > &callSiteInfo, const std::map< SgNode *, Vertex > &formalOutPara) |
void | writeGraphNode (std::ostream &out, const Vertex &vertex) 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... | |
void | writeGraphProperty (std::ostream &out) const |
This function helps to write the DOT file for the whole graph. More... | |
Protected Attributes | |
SgProject * | project_ |
The ROSE project object. More... | |
StaticCFG::CFGNodeFilter | cfgNodefilter_ |
The CFG node filter which controls which AST nodes appear in CFG. More... | |
std::map < SgFunctionDeclaration *, CFG * > | functionsToCFGs_ |
A table mapping each function to its CFG. More... | |
std::map < SgFunctionDeclaration *, Vertex > | functionsToEntries_ |
A table mapping each function to its entry in SDG. More... | |
boost::function< void(SgProject *, DefUseChains &)> | defUseChainGenerator_ |
typedef boost::graph_traits<SystemDependenceGraph>::vertex_descriptor SDG::SystemDependenceGraph::Vertex |
typedef boost::graph_traits<SystemDependenceGraph>::edge_descriptor SDG::SystemDependenceGraph::Edge |
|
protected |
|
protected |
|
protected |
|
protected |
|
inline |
void SDG::SystemDependenceGraph::build | ( | ) |
Build the SDG.
|
inline |
Definition at line 147 of file SDG.h.
References cfgNodefilter_.
|
inline |
Definition at line 150 of file SDG.h.
References defUseChainGenerator_.
void SDG::SystemDependenceGraph::toDot | ( | const std::string & | filename) | const |
Write the PDG to a dot file.
Add a Control Dependence edge with True label.
|
protected |
|
protected |
|
protected |
This function helps to write the DOT file for vertices.
|
protected |
This function helps to write the DOT file for edges.
|
protected |
This function helps to write the DOT file for the whole graph.
|
protected |
|
protected |
The CFG node filter which controls which AST nodes appear in CFG.
Definition at line 114 of file SDG.h.
Referenced by setCFGNodeFilter().
|
protected |
|
protected |
|
protected |
Definition at line 122 of file SDG.h.
Referenced by setDefUseChainsGenerator().