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

#include <DependenceGraph.h>

Inheritance diagram for SystemDependenceGraph:
Collaboration diagram for SystemDependenceGraph:

Public Member Functions

void addLibraryExtender (SDGLibraryExtender *le)
 
 SystemDependenceGraph ()
 
SgNodegetMainFunction ()
 
void createSafeConfiguration (SgFunctionDeclaration *fDef)
 
bool isKnownLibraryFunction (SgFunctionDeclaration *fDec)
 
void createConnectionsForLibaryFunction (SgFunctionDeclaration *fDec)
 
void parseProject (SgProject *project)
 
void performInterproceduralAnalysis ()
 
void computeSummaryEdges ()
 
void cleanUp (std::set< SgNode * > preserve)
 
void addFunction (FunctionDependenceGraph *pdg)
 
void createFunctionStub (InterproceduralInfo *info)
 
void addFunction (ControlDependenceGraph *cdg, DataDependenceGraph *ddg)
 
InterproceduralInfogetInterproceduralInformation (SgFunctionDeclaration *dec)
 
void addInterproceduralInformation (InterproceduralInfo *info)
 
void doInterproceduralConnections (InterproceduralInfo *ii)
 
void process ()
 
virtual std::set
< DependenceNode * > 
getSlice (DependenceNode *node)
 
std::set
< FunctionDependenceGraph * > 
getPDGs ()
 
void addLibraryExtender (SDGLibraryExtender *le)
 
 SystemDependenceGraph ()
 
SgNodegetMainFunction ()
 
void createSafeConfiguration (SgFunctionDeclaration *fDef)
 
bool isKnownLibraryFunction (SgFunctionDeclaration *fDec)
 
void createConnectionsForLibaryFunction (SgFunctionDeclaration *fDec)
 
void parseProject (SgProject *project)
 
void performInterproceduralAnalysis ()
 
void computeSummaryEdges ()
 
void cleanUp (std::set< SgNode * > preserve)
 
void addFunction (FunctionDependenceGraph *pdg)
 
void createFunctionStub (InterproceduralInfo *info)
 
void addFunction (ControlDependenceGraph *cdg, DataDependenceGraph *ddg)
 
InterproceduralInfogetInterproceduralInformation (SgFunctionDeclaration *dec)
 
void addInterproceduralInformation (InterproceduralInfo *info)
 
void doInterproceduralConnections (InterproceduralInfo *ii)
 
void process ()
 
virtual std::set
< DependenceNode * > 
getSlice (DependenceNode *node)
 
std::set
< FunctionDependenceGraph * > 
getPDGs ()
 
- Public Member Functions inherited from MergedDependenceGraph
DependenceNode_importNode (DependenceNode *node)
 
std::set< SgNode * > slice (SgNode *node)
 
DependenceNode_importNode (DependenceNode *node)
 
std::set< SgNode * > slice (SgNode *node)
 
- Public Member Functions inherited from DependenceGraph
 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)
 

Private Member Functions

void _processFunction (FunctionDependenceGraph *pdg)
 
std::vector
< InterproceduralInfo * > 
getPossibleFuncs (SgFunctionCallExp *funcCall)
 
Rose_STL_Container
< SgFunctionDeclaration * > 
_getPossibleFuncs (SgFunctionCallExp *funcCall)
 
void _processFunction (FunctionDependenceGraph *pdg)
 
std::vector
< InterproceduralInfo * > 
getPossibleFuncs (SgFunctionCallExp *funcCall)
 
Rose_STL_Container
< SgFunctionDeclaration * > 
_getPossibleFuncs (SgFunctionCallExp *funcCall)
 

Private Attributes

std::vector< SDGLibraryExtender * > libraryExtenders
 
Rose_STL_Container
< InterproceduralInfo * > 
interproceduralInformationList
 
std::map
< SgFunctionDeclaration
*, InterproceduralInfo * > 
interproceduralInformation
 
bool debug
 
std::map
< SgFunctionDeclaration
*, FunctionDependenceGraph * > 
_funcs_map
 
std::map
< SgFunctionDeclaration
*, InterproceduralInfo * > 
functionToInterfunctionalMap
 

Additional Inherited Members

- Public Types inherited from DependenceGraph
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
}
 
- Static Public Attributes inherited from DependenceGraph
static const char * edgeNameArray [8]
 
- Protected Types inherited from DependenceGraph
typedef std::pair
< DependenceNode
*, DependenceNode * > 
Edge
 *! InterproceduralInfo *_interprocedural; More...
 
typedef std::pair
< DependenceNode
*, DependenceNode * > 
Edge
 *! InterproceduralInfo *_interprocedural; More...
 
- Protected Member Functions inherited from MergedDependenceGraph
std::set< DependenceNode * > _getReachable (std::set< DependenceNode * >start, int edgeTypesToFollow=0)
 
void _mergeGraph (DependenceGraph *graph)
 
void mergeGraph (DependenceGraph *graph)
 
std::set< DependenceNode * > _getReachable (std::set< DependenceNode * >start, int edgeTypesToFollow=0)
 
void _mergeGraph (DependenceGraph *graph)
 
void mergeGraph (DependenceGraph *graph)
 
- Protected Attributes inherited from DependenceGraph
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
 

Detailed Description

Definition at line 1248 of file DependenceGraph.h.

Constructor & Destructor Documentation

SystemDependenceGraph::SystemDependenceGraph ( )
inline

Definition at line 1258 of file DependenceGraph.h.

SystemDependenceGraph::SystemDependenceGraph ( )
inline

Definition at line 1260 of file NEW_DependenceGraph.h.

Member Function Documentation

void SystemDependenceGraph::addLibraryExtender ( SDGLibraryExtender le)
inline

Definition at line 1253 of file DependenceGraph.h.

SgNode* SystemDependenceGraph::getMainFunction ( )
void SystemDependenceGraph::createSafeConfiguration ( SgFunctionDeclaration fDef)
bool SystemDependenceGraph::isKnownLibraryFunction ( SgFunctionDeclaration fDec)
void SystemDependenceGraph::createConnectionsForLibaryFunction ( SgFunctionDeclaration fDec)
void SystemDependenceGraph::parseProject ( SgProject project)
void SystemDependenceGraph::performInterproceduralAnalysis ( )

once all functions have been added to the SystemDependenceGraph this function performas the connection of callsites to all possible called functions and establishes summary-edges

void SystemDependenceGraph::computeSummaryEdges ( )
void SystemDependenceGraph::cleanUp ( std::set< SgNode * >  preserve)
void SystemDependenceGraph::addFunction ( FunctionDependenceGraph pdg)
void SystemDependenceGraph::createFunctionStub ( InterproceduralInfo info)
void SystemDependenceGraph::addFunction ( ControlDependenceGraph cdg,
DataDependenceGraph ddg 
)
InterproceduralInfo* SystemDependenceGraph::getInterproceduralInformation ( SgFunctionDeclaration dec)
inline

Definition at line 1281 of file DependenceGraph.h.

void SystemDependenceGraph::addInterproceduralInformation ( InterproceduralInfo info)
inline

Definition at line 1290 of file DependenceGraph.h.

References InterproceduralInfo::getFunctionDeclaration().

void SystemDependenceGraph::doInterproceduralConnections ( InterproceduralInfo ii)
void SystemDependenceGraph::process ( )
virtual std::set< DependenceNode * > SystemDependenceGraph::getSlice ( DependenceNode node)
virtual

Implements MergedDependenceGraph.

std::set< FunctionDependenceGraph * > SystemDependenceGraph::getPDGs ( )
void SystemDependenceGraph::_processFunction ( FunctionDependenceGraph pdg)
private
std::vector<InterproceduralInfo*> SystemDependenceGraph::getPossibleFuncs ( SgFunctionCallExp funcCall)
private
Rose_STL_Container< SgFunctionDeclaration * > SystemDependenceGraph::_getPossibleFuncs ( SgFunctionCallExp funcCall)
private
void SystemDependenceGraph::addLibraryExtender ( SDGLibraryExtender le)
inline

Definition at line 1255 of file NEW_DependenceGraph.h.

SgNode* SystemDependenceGraph::getMainFunction ( )
void SystemDependenceGraph::createSafeConfiguration ( SgFunctionDeclaration fDef)
bool SystemDependenceGraph::isKnownLibraryFunction ( SgFunctionDeclaration fDec)
void SystemDependenceGraph::createConnectionsForLibaryFunction ( SgFunctionDeclaration fDec)
void SystemDependenceGraph::parseProject ( SgProject project)
void SystemDependenceGraph::performInterproceduralAnalysis ( )

once all functions have been added to the SystemDependenceGraph this function performas the connection of callsites to all possible called functions and establishes summary-edges

void SystemDependenceGraph::computeSummaryEdges ( )
void SystemDependenceGraph::cleanUp ( std::set< SgNode * >  preserve)
void SystemDependenceGraph::addFunction ( FunctionDependenceGraph pdg)
void SystemDependenceGraph::createFunctionStub ( InterproceduralInfo info)
void SystemDependenceGraph::addFunction ( ControlDependenceGraph cdg,
DataDependenceGraph ddg 
)
InterproceduralInfo* SystemDependenceGraph::getInterproceduralInformation ( SgFunctionDeclaration dec)
inline

Definition at line 1283 of file NEW_DependenceGraph.h.

void SystemDependenceGraph::addInterproceduralInformation ( InterproceduralInfo info)
inline
void SystemDependenceGraph::doInterproceduralConnections ( InterproceduralInfo ii)
void SystemDependenceGraph::process ( )
virtual std::set< DependenceNode * > SystemDependenceGraph::getSlice ( DependenceNode node)
virtual

Implements MergedDependenceGraph.

std::set< FunctionDependenceGraph * > SystemDependenceGraph::getPDGs ( )
void SystemDependenceGraph::_processFunction ( FunctionDependenceGraph pdg)
private
std::vector<InterproceduralInfo*> SystemDependenceGraph::getPossibleFuncs ( SgFunctionCallExp funcCall)
private
Rose_STL_Container< SgFunctionDeclaration * > SystemDependenceGraph::_getPossibleFuncs ( SgFunctionCallExp funcCall)
private

Member Data Documentation

std::vector< SDGLibraryExtender * > SystemDependenceGraph::libraryExtenders
private

Definition at line 1251 of file DependenceGraph.h.

Rose_STL_Container< InterproceduralInfo * > SystemDependenceGraph::interproceduralInformationList
private

Definition at line 1332 of file DependenceGraph.h.

std::map< SgFunctionDeclaration *, InterproceduralInfo * > SystemDependenceGraph::interproceduralInformation
private

Definition at line 1333 of file DependenceGraph.h.

bool SystemDependenceGraph::debug
private

Definition at line 1344 of file DependenceGraph.h.

std::map< SgFunctionDeclaration *, FunctionDependenceGraph * > SystemDependenceGraph::_funcs_map
private

Definition at line 1362 of file DependenceGraph.h.

std::map< SgFunctionDeclaration *, InterproceduralInfo * > SystemDependenceGraph::functionToInterfunctionalMap
private

Definition at line 1364 of file DependenceGraph.h.


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