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

#include <DependenceGraph.h>

Inheritance diagram for DependenceGraph:
Collaboration diagram for DependenceGraph:

Public Types

enum  EdgeType {
  CONTROL = 0x1,
  CALL = 0x4,
  CALL_RETURN = 0x5,
  DATA = 0x2,
  SUMMARY = 0x3,
  PARAMETER_IN = 0x7,
  PARAMETER_OUT = 0x8,
  SYNTACTIC = 0xe,
  DATA_HELPER = 0x9,
  CONTROL_HELPER = 0xa,
  GLOBALVAR_HELPER = 0xb,
  COMPLETENESS_HELPER =0xc,
  BELONGS_TO = 0xd,
  DO_NOT_FOLLOW = 0x10,
  CONTROL = 0x1,
  CALL = 0x4,
  CALL_RETURN = 0x5,
  DATA = 0x2,
  SUMMARY = 0x3,
  PARAMETER_IN = 0x7,
  PARAMETER_OUT = 0x8,
  SYNTACTIC = 0xe,
  DATA_HELPER = 0x9,
  CONTROL_HELPER = 0xa,
  GLOBALVAR_HELPER = 0xb,
  COMPLETENESS_HELPER =0xc,
  BELONGS_TO = 0xd,
  DO_NOT_FOLLOW = 0x10
}
 
enum  EdgeType {
  CONTROL = 0x1,
  CALL = 0x4,
  CALL_RETURN = 0x5,
  DATA = 0x2,
  SUMMARY = 0x3,
  PARAMETER_IN = 0x7,
  PARAMETER_OUT = 0x8,
  SYNTACTIC = 0xe,
  DATA_HELPER = 0x9,
  CONTROL_HELPER = 0xa,
  GLOBALVAR_HELPER = 0xb,
  COMPLETENESS_HELPER =0xc,
  BELONGS_TO = 0xd,
  DO_NOT_FOLLOW = 0x10,
  CONTROL = 0x1,
  CALL = 0x4,
  CALL_RETURN = 0x5,
  DATA = 0x2,
  SUMMARY = 0x3,
  PARAMETER_IN = 0x7,
  PARAMETER_OUT = 0x8,
  SYNTACTIC = 0xe,
  DATA_HELPER = 0x9,
  CONTROL_HELPER = 0xa,
  GLOBALVAR_HELPER = 0xb,
  COMPLETENESS_HELPER =0xc,
  BELONGS_TO = 0xd,
  DO_NOT_FOLLOW = 0x10
}
 
- Public Types inherited from SimpleDirectedGraph
enum  TraverseDirection {
  FORWARD = 1,
  BACKWARD = 2,
  FORWARD = 1,
  BACKWARD = 2
}
 This enum determines which direction to travel during a reachability pass. More...
 
enum  TraverseDirection {
  FORWARD = 1,
  BACKWARD = 2,
  FORWARD = 1,
  BACKWARD = 2
}
 This enum determines which direction to travel during a reachability pass. More...
 

Public Member Functions

 DependenceGraph ()
 
virtual ~DependenceGraph ()
 
void debugCoutNodeList ()
 
const char * getEdgeName (EdgeType type)
 
DependenceNodecreateNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
DependenceNodecreateNode (SgNode *node)
 
void deleteNode (DependenceNode *node)
 
DependenceNodegetNode (SgNode *node)
 
DependenceNodegetNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
DependenceNodegetExistingNode (SgNode *node)
 
DependenceNodegetExistingNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
InterproceduralInfogetInterprocedural ()
 
virtual void establishEdge (DependenceNode *from, DependenceNode *to, EdgeType e=CONTROL)
 
virtual void removeEdge (DependenceNode *from, DependenceNode *to, EdgeType e=CONTROL)
 
bool edgeExists (DependenceNode *from, DependenceNode *to, EdgeType e)
 
bool hasOutgingEdge (DependenceNode *src, EdgeType compare)
 
std::set< EdgeTypeedgeType (DependenceNode *from, DependenceNode *to)
 
virtual void writeDot (char *filename)
 
 DependenceGraph ()
 
virtual ~DependenceGraph ()
 
void debugCoutNodeList ()
 
const char * getEdgeName (EdgeType type)
 
DependenceNodecreateNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
DependenceNodecreateNode (SgNode *node)
 
void deleteNode (DependenceNode *node)
 
DependenceNodegetNode (SgNode *node)
 
DependenceNodegetNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
DependenceNodegetExistingNode (SgNode *node)
 
DependenceNodegetExistingNode (DependenceNode::NodeType type, SgNode *identifyingNode)
 
InterproceduralInfogetInterprocedural ()
 
virtual void establishEdge (DependenceNode *from, DependenceNode *to, EdgeType e=CONTROL)
 
virtual void removeEdge (DependenceNode *from, DependenceNode *to, EdgeType e=CONTROL)
 
bool edgeExists (DependenceNode *from, DependenceNode *to, EdgeType e)
 
bool hasOutgingEdge (DependenceNode *src, EdgeType compare)
 
std::set< EdgeTypeedgeType (DependenceNode *from, DependenceNode *to)
 
virtual void writeDot (char *filename)
 
virtual void writeDotAndHighlightAllowedEdgesOnly (char *filename, std::set< DependenceGraph::EdgeType >)
 
- Public Member Functions inherited from SimpleDirectedGraph
 ~SimpleDirectedGraph ()
 
std::set
< SimpleDirectedGraphNode * > 
getNodes ()
 get all the nodes in the graph More...
 
virtual void addNode (SimpleDirectedGraphNode *node)
 Add a node to the graph. More...
 
virtual void addLink (SimpleDirectedGraphNode *from, SimpleDirectedGraphNode *to)
 Add a link to the graph between "from" and to "to". More...
 
bool nodeExists (SimpleDirectedGraphNode *node)
 Check if a node containing data is in the graph. More...
 
bool linkExists (SimpleDirectedGraphNode *from, SimpleDirectedGraphNode *to)
 Check if a dependence is in the graph. More...
 
void printGraph ()
 
std::set
< SimpleDirectedGraphNode * > 
getReachable (SimpleDirectedGraphNode *start, TraverseDirection dir)
 
 SimpleDirectedGraph ()
 
virtual ~SimpleDirectedGraph ()
 
std::set
< SimpleDirectedGraphNode * > 
getNodes ()
 get all the nodes in the graph More...
 
virtual void addNode (SimpleDirectedGraphNode *node)
 Add a node to the graph. More...
 
virtual void removeNode (SimpleDirectedGraphNode *node)
 
virtual void removeLink (SimpleDirectedGraphNode *from, SimpleDirectedGraphNode *to)
 Remove a linkt between "from" and "to". More...
 
virtual void addLink (SimpleDirectedGraphNode *from, SimpleDirectedGraphNode *to)
 Add a link to the graph between "from" and to "to". More...
 
bool nodeExists (SimpleDirectedGraphNode *node)
 Check if a node containing data is in the graph. More...
 
bool linkExists (SimpleDirectedGraphNode *from, SimpleDirectedGraphNode *to)
 Check if a dependence is in the graph. More...
 
void printGraph ()
 
std::set
< SimpleDirectedGraphNode * > 
getReachable (SimpleDirectedGraphNode *start, TraverseDirection dir)
 

Static Public Attributes

static const char * edgeNameArray [8]
 

Protected Types

typedef std::pair
< DependenceNode
*, DependenceNode * > 
Edge
 *! InterproceduralInfo *_interprocedural; More...
 
typedef std::pair
< DependenceNode
*, DependenceNode * > 
Edge
 *! InterproceduralInfo *_interprocedural; More...
 

Protected Member Functions

bool isLibraryFunction (SgFunctionDeclaration *sgFD) const
 
bool isLibraryFunction (SgFunctionDeclaration *sgFD) const
 
- Protected Member Functions inherited from SimpleDirectedGraph
virtual void _displayData (SimpleDirectedGraphNode *node, std::ostream &os)
 
virtual void _displayData (SimpleDirectedGraphNode *node, std::ostream &os)
 

Protected Attributes

bool debugme
 
std::map< SgNode
*, DependenceNode * > 
sgNodeToDepNodeMap
 *! std::map < DependenceNode *, DependenceNode * >_depnode_map; More...
 
std::map
< DependenceNode::NodeType,
std::map< SgNode
*, DependenceNode * > > 
nodeTypeToDepNodeMapMap
 
std::map< EdgeType, std::set
< Edge > > 
edgeTypeMap
 
std::map< Edge, std::set
< EdgeType > > 
edgeMap
 
- Protected Attributes inherited from SimpleDirectedGraph
std::set
< SimpleDirectedGraphNode * > 
_nodes
 

Detailed Description

Definition at line 672 of file DependenceGraph.h.

Member Typedef Documentation

typedef std::pair< DependenceNode *, DependenceNode * > DependenceGraph::Edge
protected

*! InterproceduralInfo *_interprocedural;

Definition at line 858 of file DependenceGraph.h.

typedef std::pair< DependenceNode *, DependenceNode * > DependenceGraph::Edge
protected

*! InterproceduralInfo *_interprocedural;

Definition at line 859 of file NEW_DependenceGraph.h.

Member Enumeration Documentation

Enumerator
CONTROL 
CALL 
CALL_RETURN 
DATA 
SUMMARY 
PARAMETER_IN 
PARAMETER_OUT 
SYNTACTIC 
DATA_HELPER 
CONTROL_HELPER 
GLOBALVAR_HELPER 
COMPLETENESS_HELPER 
BELONGS_TO 
DO_NOT_FOLLOW 
CONTROL 
CALL 
CALL_RETURN 
DATA 
SUMMARY 
PARAMETER_IN 
PARAMETER_OUT 
SYNTACTIC 
DATA_HELPER 
CONTROL_HELPER 
GLOBALVAR_HELPER 
COMPLETENESS_HELPER 
BELONGS_TO 
DO_NOT_FOLLOW 

Definition at line 692 of file DependenceGraph.h.

Enumerator
CONTROL 
CALL 
CALL_RETURN 
DATA 
SUMMARY 
PARAMETER_IN 
PARAMETER_OUT 
SYNTACTIC 
DATA_HELPER 
CONTROL_HELPER 
GLOBALVAR_HELPER 
COMPLETENESS_HELPER 
BELONGS_TO 
DO_NOT_FOLLOW 
CONTROL 
CALL 
CALL_RETURN 
DATA 
SUMMARY 
PARAMETER_IN 
PARAMETER_OUT 
SYNTACTIC 
DATA_HELPER 
CONTROL_HELPER 
GLOBALVAR_HELPER 
COMPLETENESS_HELPER 
BELONGS_TO 
DO_NOT_FOLLOW 

Definition at line 692 of file NEW_DependenceGraph.h.

Constructor & Destructor Documentation

DependenceGraph::DependenceGraph ( )
inline

Definition at line 677 of file DependenceGraph.h.

virtual DependenceGraph::~DependenceGraph ( )
inlinevirtual

Definition at line 678 of file DependenceGraph.h.

DependenceGraph::DependenceGraph ( )
inline

Definition at line 677 of file NEW_DependenceGraph.h.

virtual DependenceGraph::~DependenceGraph ( )
inlinevirtual

Definition at line 678 of file NEW_DependenceGraph.h.

Member Function Documentation

void DependenceGraph::debugCoutNodeList ( )
inline

Definition at line 679 of file DependenceGraph.h.

const char* DependenceGraph::getEdgeName ( EdgeType  type)
DependenceNode* DependenceGraph::createNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
DependenceNode* DependenceGraph::createNode ( SgNode node)
void DependenceGraph::deleteNode ( DependenceNode node)
DependenceNode* DependenceGraph::getNode ( SgNode node)
DependenceNode* DependenceGraph::getNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
DependenceNode* DependenceGraph::getExistingNode ( SgNode node)
DependenceNode* DependenceGraph::getExistingNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
InterproceduralInfo* DependenceGraph::getInterprocedural ( )
inline

*! return _interprocedural;

Definition at line 799 of file DependenceGraph.h.

virtual void DependenceGraph::establishEdge ( DependenceNode from,
DependenceNode to,
EdgeType  e = CONTROL 
)
virtual
virtual void DependenceGraph::removeEdge ( DependenceNode from,
DependenceNode to,
EdgeType  e = CONTROL 
)
virtual
bool DependenceGraph::edgeExists ( DependenceNode from,
DependenceNode to,
EdgeType  e 
)
bool DependenceGraph::hasOutgingEdge ( DependenceNode src,
EdgeType  compare 
)
std::set< EdgeType > DependenceGraph::edgeType ( DependenceNode from,
DependenceNode to 
)
virtual void DependenceGraph::writeDot ( char *  filename)
virtual

Reimplemented from SimpleDirectedGraph.

bool DependenceGraph::isLibraryFunction ( SgFunctionDeclaration sgFD) const
inlineprotected

Definition at line 873 of file DependenceGraph.h.

References SgFunctionDeclaration::get_definition().

void DependenceGraph::debugCoutNodeList ( )
inline

Definition at line 679 of file NEW_DependenceGraph.h.

const char* DependenceGraph::getEdgeName ( EdgeType  type)
DependenceNode* DependenceGraph::createNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
DependenceNode* DependenceGraph::createNode ( SgNode node)
void DependenceGraph::deleteNode ( DependenceNode node)
DependenceNode* DependenceGraph::getNode ( SgNode node)
DependenceNode* DependenceGraph::getNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
DependenceNode* DependenceGraph::getExistingNode ( SgNode node)
DependenceNode* DependenceGraph::getExistingNode ( DependenceNode::NodeType  type,
SgNode identifyingNode 
)
InterproceduralInfo* DependenceGraph::getInterprocedural ( )
inline

*! return _interprocedural;

Definition at line 799 of file NEW_DependenceGraph.h.

virtual void DependenceGraph::establishEdge ( DependenceNode from,
DependenceNode to,
EdgeType  e = CONTROL 
)
virtual
virtual void DependenceGraph::removeEdge ( DependenceNode from,
DependenceNode to,
EdgeType  e = CONTROL 
)
virtual
bool DependenceGraph::edgeExists ( DependenceNode from,
DependenceNode to,
EdgeType  e 
)
bool DependenceGraph::hasOutgingEdge ( DependenceNode src,
EdgeType  compare 
)
std::set< EdgeType > DependenceGraph::edgeType ( DependenceNode from,
DependenceNode to 
)
virtual void DependenceGraph::writeDot ( char *  filename)
virtual

Reimplemented from SimpleDirectedGraph.

virtual void DependenceGraph::writeDotAndHighlightAllowedEdgesOnly ( char *  filename,
std::set< DependenceGraph::EdgeType  
)
virtual
bool DependenceGraph::isLibraryFunction ( SgFunctionDeclaration sgFD) const
inlineprotected

Definition at line 874 of file NEW_DependenceGraph.h.

References SgFunctionDeclaration::get_definition().

Member Data Documentation

bool DependenceGraph::debugme
protected

Definition at line 675 of file DependenceGraph.h.

static const char * DependenceGraph::edgeNameArray
static

Definition at line 721 of file DependenceGraph.h.

std::map< SgNode *, DependenceNode * > DependenceGraph::sgNodeToDepNodeMap
protected

*! std::map < DependenceNode *, DependenceNode * >_depnode_map;

*! std::map < SgNode *, DependenceNode * >_sgnode_map;

Definition at line 852 of file DependenceGraph.h.

std::map< DependenceNode::NodeType, std::map< SgNode *, DependenceNode * > > DependenceGraph::nodeTypeToDepNodeMapMap
protected

Definition at line 853 of file DependenceGraph.h.

std::map< EdgeType, std::set< Edge > > DependenceGraph::edgeTypeMap
protected

Definition at line 861 of file DependenceGraph.h.

std::map< Edge, std::set< EdgeType > > DependenceGraph::edgeMap
protected

Definition at line 868 of file DependenceGraph.h.


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