ROSE 0.11.145.147
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.

Inheritance diagram for SgGraphTraversal< CFG >:
Inheritance graph
[legend]
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.
 
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:
 
std::vector< int > getOutEdges (int &node, CFG *&g)
 Gets out edges with integer inputs, internal use only SgGraphTraversal::getOutEdges Input:
 
int getTarget (int &n, CFG *&g)
 Gets the target of an edge SgGraphTraversal::getTarget Input:
 
int getSource (int &n, CFG *&g)
 Gets the source of an edge SgGraphTraversal::getSource Input:
 
 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.
 
 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.
 

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 Typedef Documentation

◆ Vertex

template<class CFG >
typedef boost::graph_traits<CFG>::vertex_descriptor SgGraphTraversal< CFG >::Vertex

Definition at line 86 of file graphProcessing.h.

◆ Edge

template<class CFG >
typedef boost::graph_traits<CFG>::edge_descriptor SgGraphTraversal< CFG >::Edge

Definition at line 87 of file graphProcessing.h.

◆ SynthesizedAttributesList

template<class CFG >
typedef StackFrameVector<SynthesizedAttributeType> SgGraphTraversal< CFG >::SynthesizedAttributesList

Definition at line 137 of file graphProcessingSgIncGraph.h.

Constructor & Destructor Documentation

◆ SgGraphTraversal()

template<class InheritedAttributeType , class SynthesizedAttributeType >
SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType >::SgGraphTraversal ( )

Definition at line 191 of file graphProcessing.h.

◆ ~SgGraphTraversal()

template<class InheritedAttributeType , class SynthesizedAttributeType >
SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType >::~SgGraphTraversal ( )
virtual

Definition at line 209 of file graphProcessing.h.

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 1118 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 262 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 294 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 244 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 225 of file graphProcessing.h.

◆ operator=() [1/2]

template<class CFG >
SgGraphTraversal< CFG > & SgGraphTraversal< CFG >::operator= ( SgGraphTraversal< CFG > &  other)

Definition at line 200 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 1375 of file graphProcessing.h.

◆ operator=() [2/2]

template<class InheritedAttributeType , class SynthesizedAttributeType >
const SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType > & SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType >::operator= ( const SgGraphTraversal< CFG > &  other)

Definition at line 329 of file graphProcessingSgIncGraph.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 359 of file graphProcessingSgIncGraph.h.

◆ defaultSynthesizedAttribute()

template<class InheritedAttributeType , class SynthesizedAttributeType >
SynthesizedAttributeType SgGraphTraversal< InheritedAttributeType, SynthesizedAttributeType >::defaultSynthesizedAttribute ( InheritedAttributeType  inh)
protected

Definition at line 1594 of file graphProcessingSgIncGraph.h.

Member Data Documentation

◆ vertintmap

template<class CFG >
std::map<Vertex, int> SgGraphTraversal< CFG >::vertintmap

Definition at line 95 of file graphProcessing.h.

◆ edgeintmap

template<class CFG >
std::map<Edge, int> SgGraphTraversal< CFG >::edgeintmap

Definition at line 96 of file graphProcessing.h.

◆ intvertmap

template<class CFG >
std::map<int, Vertex> SgGraphTraversal< CFG >::intvertmap

Definition at line 97 of file graphProcessing.h.

◆ intedgemap

template<class CFG >
std::map<int, Edge> SgGraphTraversal< CFG >::intedgemap

Definition at line 98 of file graphProcessing.h.

◆ pathnum

template<class CFG >
int SgGraphTraversal< CFG >::pathnum

Definition at line 103 of file graphProcessing.h.

◆ subpathmap

template<class CFG >
std::set<std::map<int, std::set<int> > > SgGraphTraversal< CFG >::subpathmap

Definition at line 119 of file graphProcessingSgIncGraph.h.

◆ loopNum

template<class CFG >
int SgGraphTraversal< CFG >::loopNum

Definition at line 120 of file graphProcessingSgIncGraph.h.

◆ nullNum

template<class CFG >
int SgGraphTraversal< CFG >::nullNum

Definition at line 121 of file graphProcessingSgIncGraph.h.

◆ nullEdgesOrdered

template<class CFG >
std::set<SgDirectedGraphEdge*> SgGraphTraversal< CFG >::nullEdgesOrdered

Definition at line 122 of file graphProcessingSgIncGraph.h.

◆ loopNumMap

template<class CFG >
std::map<SgGraphNode*, int> SgGraphTraversal< CFG >::loopNumMap

Definition at line 123 of file graphProcessingSgIncGraph.h.

◆ pathValMap

template<class CFG >
std::map<SgGraphNode*, int> SgGraphTraversal< CFG >::pathValMap

Definition at line 124 of file graphProcessingSgIncGraph.h.

◆ nullloops

template<class CFG >
int SgGraphTraversal< CFG >::nullloops

Definition at line 125 of file graphProcessingSgIncGraph.h.

◆ looppaths

template<class CFG >
std::vector<std::vector<SgGraphNode*> > SgGraphTraversal< CFG >::looppaths

Definition at line 126 of file graphProcessingSgIncGraph.h.

◆ iLoops

template<class CFG >
std::vector<std::vector<SgGraphNode*> > SgGraphTraversal< CFG >::iLoops

Definition at line 127 of file graphProcessingSgIncGraph.h.

◆ ifstatements

template<class CFG >
std::vector<SgGraphNode*> SgGraphTraversal< CFG >::ifstatements

Definition at line 128 of file graphProcessingSgIncGraph.h.

◆ nullEdgesPaths

template<class CFG >
int SgGraphTraversal< CFG >::nullEdgesPaths

Definition at line 132 of file graphProcessingSgIncGraph.h.

◆ turns

template<class CFG >
int SgGraphTraversal< CFG >::turns

Definition at line 133 of file graphProcessingSgIncGraph.h.

◆ numnodes

template<class CFG >
int SgGraphTraversal< CFG >::numnodes

Definition at line 142 of file graphProcessingSgIncGraph.h.

◆ nullnode

template<class CFG >
SgGraphNode* SgGraphTraversal< CFG >::nullnode

Definition at line 145 of file graphProcessingSgIncGraph.h.

◆ primenode

template<class CFG >
std::map<SgGraphNode*, int> SgGraphTraversal< CFG >::primenode

Definition at line 146 of file graphProcessingSgIncGraph.h.

◆ done

template<class CFG >
bool SgGraphTraversal< CFG >::done

Definition at line 147 of file graphProcessingSgIncGraph.h.

◆ lstN

template<class CFG >
std::set<SgGraphNode*> SgGraphTraversal< CFG >::lstN

Definition at line 149 of file graphProcessingSgIncGraph.h.

◆ lstordmap

template<class CFG >
std::map<SgGraphNode*, std::vector<std::set<int> > > SgGraphTraversal< CFG >::lstordmap

Definition at line 150 of file graphProcessingSgIncGraph.h.

◆ solvedLoops

template<class CFG >
std::set<SgGraphNode*> SgGraphTraversal< CFG >::solvedLoops

Definition at line 151 of file graphProcessingSgIncGraph.h.

◆ checkednodes

template<class CFG >
std::map<SgGraphNode*, std::vector<SgGraphNode*> > SgGraphTraversal< CFG >::checkednodes

Definition at line 152 of file graphProcessingSgIncGraph.h.

◆ downed

template<class CFG >
std::map<SgGraphNode*, std::set<SgGraphNode*> > SgGraphTraversal< CFG >::downed

Definition at line 153 of file graphProcessingSgIncGraph.h.

◆ nullInherit

template<class CFG >
InheritedAttributeType SgGraphTraversal< CFG >::nullInherit

Definition at line 157 of file graphProcessingSgIncGraph.h.

◆ loopSet

template<class CFG >
std::set<SgGraphNode*> SgGraphTraversal< CFG >::loopSet

Definition at line 162 of file graphProcessingSgIncGraph.h.


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