1 #ifndef GRAPH_HELPER_H_INCLUDED_ 
    2 #define GRAPH_HELPER_H_INCLUDED_ 
   10 #include "boost/graph/adjacency_list.hpp" 
   11 #include "boost/graph/breadth_first_search.hpp" 
   35     if(boost::out_degree(vertex, graph) == 0) {
 
   67     for(std::list<NodeWithPath>::const_iterator
 
   68         iter  = graph[vertex].expressions_.begin();
 
   69         iter != graph[vertex].expressions_.end();
 
   72       if(isSgBreakStmt(iter->node_)) {
 
  106     for(std::list<NodeWithPath>::const_iterator
 
  107         iter  = graph[vertex].expressions_.begin();
 
  108         iter != graph[vertex].expressions_.end();
 
  111       if(isSgContinueStmt(iter->node_)) {
 
  140 std::vector<VertexDescriptor>
 
  152 std::pair<risc::sg::VertexDescriptor, risc::sg::SegmentGraph::SegmentSet>
 
  156     bool channel_segments);
 
  169     SgFunctionCallExp *func_call_exp);
 
  182     SgVariableDefinition* socket_def);
 
BreakStmtVisitor(std::set< Graph::vertex_descriptor > &segment_with_break)
Definition: graph_helper.h:51
 
This class represents a segment graph for a process. 
Definition: segment_graph.h:79
 
boost::graph_traits< Graph >::vertex_descriptor VertexDescriptor
Definition: segment_graph.h:34
 
std::set< VertexDescriptor, SegmentCmp > SegmentSet
Definition: segment_graph.h:93
 
Definition: graph_helper.h:86
 
void add_pcp_to_graph(risc::sg::VertexDescriptor start_vertex, risc::sg::SegmentGraph &sg, SgFunctionCallExp *func_call_exp)
add a style one pcp to all the segments starting from start_vertex 
Definition: graph_helper.cpp:224
 
void discover_vertex(const Graph::vertex_descriptor vertex, const Graph &graph)
This function adds all break segments into segment_with_continue_. 
Definition: graph_helper.h:103
 
void discover_vertex(const Graph::vertex_descriptor vertex, const Graph &graph)
Definition: graph_helper.h:32
 
std::pair< risc::sg::VertexDescriptor, risc::sg::SegmentGraph::SegmentSet > clone_graph(risc::sg::VertexDescriptor start_vertex, risc::sg::SegmentGraph::SegmentSet leaving_vertices, risc::sg::SegmentGraph &sg, bool channel_segments)
clones a subgraph 
Definition: graph_helper.cpp:136
 
std::set< Graph::vertex_descriptor > & segment_with_break_
A set containing all the segments that contains a continue statement. 
Definition: graph_helper.h:121
 
std::list< int > get_all_reachable_segments(SegmentGraph &segment_graph, int starting_id)
This function returns which segments are reachable from the given segment. 
Definition: graph_helper.cpp:6
 
BreakStmtVisitor(const BreakStmtVisitor &other)
Definition: graph_helper.h:55
 
std::set< Graph::vertex_descriptor > & segment_with_break_
A set containing all the segments that contains a break statement. 
Definition: graph_helper.h:82
 
ContinueStmtVisitor(std::set< Graph::vertex_descriptor > &segment_with_break)
Definition: graph_helper.h:90
 
void discover_vertex(const Graph::vertex_descriptor vertex, const Graph &graph)
This function adds all break segments into segment_with_break_. 
Definition: graph_helper.h:64
 
Definition: graph_helper.h:19
 
ContinueStmtVisitor(const ContinueStmtVisitor &other)
Definition: graph_helper.h:94
 
std::set< Graph::vertex_descriptor > & leaf_nodes_
A set containing all the leaf nodes. 
Definition: graph_helper.h:43
 
LeafNodeVisitor(std::set< Graph::vertex_descriptor > &leaf_nodes)
Definition: graph_helper.h:23
 
boost::adjacency_list< boost::listS, boost::listS, boost::bidirectionalS, Segment, Edge, boost::property< boost::vertex_index_t, int > > Graph
Definition: segment_graph.h:29
 
LeafNodeVisitor(const LeafNodeVisitor &other)
Definition: graph_helper.h:27
 
Definition: graph_helper.h:47