ROSE  0.11.96.11
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SgGraphTraversal< CFG > Class Template Referenceabstract

Description

template<class CFG>
class SgGraphTraversal< CFG >

Definition at line 82 of file graphProcessing.h.

Collaboration diagram for SgGraphTraversal< CFG >:
Collaboration graph
[legend]

Public Types

typedef boost::graph_traits< CFG >::vertex_descriptor Vertex
 
typedef boost::graph_traits< CFG >::edge_descriptor Edge
 
typedef StackFrameVector< SynthesizedAttributeType > SynthesizedAttributesList
 

Public Member Functions

void constructPathAnalyzer (CFG *g, bool unbounded=false, Vertex end=0, Vertex begin=0, bool ns=true)
 This is the function that is used by the user directly to start the algorithm. More...
 
virtual void analyzePath (std::vector< Vertex > &pth)=0
 
std::vector< int > getInEdges (int &node, CFG *&g)
 Gets out edges with integer inputs, internal use only SgGraphTraversal::getInEdges Input: More...
 
std::vector< int > getOutEdges (int &node, CFG *&g)
 Gets out edges with integer inputs, internal use only SgGraphTraversal::getOutEdges Input: More...
 
int getTarget (int &n, CFG *&g)
 Gets the target of an edge SgGraphTraversal::getTarget Input: More...
 
int getSource (int &n, CFG *&g)
 Gets the source of an edge SgGraphTraversal::getSource Input: More...
 
 SgGraphTraversal (SgGraphTraversal &)
 
SgGraphTraversaloperator= (SgGraphTraversal &)
 
void firstPrepGraph (CFG *&g)
 DEPRECATED This is the function that preps the graph for traversal, currently this one isn't used but for many traversals on one visitor may necessitate. More...
 
 SgGraphTraversal (const SgGraphTraversal &)
 
const SgGraphTraversaloperator= (const SgGraphTraversal &)
 
InheritedAttributeType traverse (SgGraphNode *basenode, SgIncidenceDirectedGraph *g, InheritedAttributeType inheritedValue, InheritedAttributeType nullInherit, SgGraphNode *endnode, bool insep=false, bool pcHk=false)
 This is the function that is used by the user directly to start the algorithm. More...
 

Public Attributes

std::map< Vertex, int > vertintmap
 
std::map< Edge, int > edgeintmap
 
std::map< int, Vertexintvertmap
 
std::map< int, Edgeintedgemap
 
int pathnum
 
std::set< std::map< int, std::set< int > > > subpathmap
 
int loopNum
 
int nullNum
 
std::set< SgDirectedGraphEdge * > nullEdgesOrdered
 
std::map< SgGraphNode *, int > loopNumMap
 
std::map< SgGraphNode *, int > pathValMap
 
int nullloops
 
std::vector< std::vector< SgGraphNode * > > looppaths
 
std::vector< std::vector< SgGraphNode * > > iLoops
 
std::vector< SgGraphNode * > ifstatements
 
int nullEdgesPaths
 
int turns
 
int numnodes
 
SgGraphNodenullnode
 
std::map< SgGraphNode *, int > primenode
 
bool done
 
std::set< SgGraphNode * > lstN
 
std::map< SgGraphNode *, std::vector< std::set< int > > > lstordmap
 
std::set< SgGraphNode * > solvedLoops
 
std::map< SgGraphNode *, std::vector< SgGraphNode * > > checkednodes
 
std::map< SgGraphNode *, std::set< SgGraphNode * > > downed
 
InheritedAttributeType nullInherit
 
std::set< SgGraphNode * > loopSet
 

Protected Member Functions

virtual InheritedAttributeType evaluateInheritedAttribute (SgGraphNode *n, std::vector< InheritedAttributeType > inheritedValues)=0
 
virtual SynthesizedAttributeType evaluateSynthesizedAttribute (SgGraphNode *n, InheritedAttributeType in, SynthesizedAttributesList l)=0
 
virtual void pathAnalyze (std::vector< SgGraphNode * > &pth, bool loop=false, std::set< std::vector< SgGraphNode * > > &incloops=NULL)=0
 
SynthesizedAttributeType defaultSynthesizedAttribute (InheritedAttributeType)
 

Member Function Documentation

◆ constructPathAnalyzer()

template<class CFG >
void SgGraphTraversal< CFG >::constructPathAnalyzer ( CFG *  g,
bool  unbounded = false,
Vertex  begin = 0,
Vertex  end = 0,
bool  ns = true 
)

This is the function that is used by the user directly to start the algorithm.

It is immediately available to the user

SgGraphTraversal::constructPathAnalyzer Input:

Parameters
[begin]Vertex, starting node
[end]Vertex, endnode
[g]CFG* g, CFG calculated previously

Definition at line 1119 of file graphProcessing.h.

◆ getInEdges()

template<class CFG >
std::vector< int > SgGraphTraversal< CFG >::getInEdges ( int &  node,
CFG *&  g 
)

Gets out edges with integer inputs, internal use only SgGraphTraversal::getInEdges Input:

Parameters
[node]int, integer representation of the node to get the in edges from
[g]CFG* g, CFG

Definition at line 263 of file graphProcessing.h.

◆ getOutEdges()

template<class CFG >
std::vector< int > SgGraphTraversal< CFG >::getOutEdges ( int &  node,
CFG *&  g 
)

Gets out edges with integer inputs, internal use only SgGraphTraversal::getOutEdges Input:

Parameters
[node]int, integer representation of the node to get the out edges from
[g]CFG* g, CFG

Definition at line 295 of file graphProcessing.h.

◆ getTarget()

template<class CFG >
int SgGraphTraversal< CFG >::getTarget ( int &  edge,
CFG *&  g 
)
inline

Gets the target of an edge SgGraphTraversal::getTarget Input:

Parameters
[edge]int& integer representation of edge in quesution
[g]the CFG*& CFG used

Definition at line 245 of file graphProcessing.h.

◆ getSource()

template<class CFG >
int SgGraphTraversal< CFG >::getSource ( int &  edge,
CFG *&  g 
)
inline

Gets the source of an edge SgGraphTraversal::getSource Input:

Parameters
[edge]int& integer representation of edge in question
[g]CFG*& the CFG used

Definition at line 226 of file graphProcessing.h.

◆ firstPrepGraph()

template<class CFG >
void SgGraphTraversal< CFG >::firstPrepGraph ( CFG *&  g)

DEPRECATED This is the function that preps the graph for traversal, currently this one isn't used but for many traversals on one visitor may necessitate.

SgGraphTraversal::firstPrepGraph Input:

Parameters
[g]CFG*& g, CFG calculated previously

Definition at line 1376 of file graphProcessing.h.

◆ traverse()

template<class InheritedAttributeType , class SynthesizedAttributeType >
InheritedAttributeType SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType >::traverse ( SgGraphNode n,
SgIncidenceDirectedGraph g,
InheritedAttributeType  inheritedValue,
InheritedAttributeType  nullI,
SgGraphNode endnode,
bool  insep = false,
bool  pCh = false 
)

This is the function that is used by the user directly to start the algorithm.

It is immediately available to the user

SgGraphTraversal::traverse Input:

Parameters
[n]n starting node
[g]SgIncidenceDirectedGraph* g, CFG calculated previously
[inheritedValue]InheritedAttributeType inheritedValue, value of the starting node
[nullI]InheritedAttributeType nullI, value of the null Attribute, i.e. what to attribute to a node with no value\
[endnode]SgGraphNode* endnode, final node
[insep]boolean to decide inseparability of the analysis function, not yet in use, set automatically to false
[pCh]deprecated, set to false
Returns
InheritedAttributeType, the value of the attribute at the end node

Definition at line 360 of file graphProcessingSgIncGraph.h.


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