00001 #ifndef GRAPH_ALGORITHMS_H_INCLUDED_
00002 #define GRAPH_ALGORITHMS_H_INCLUDED_
00003
00004 #include "rose.h"
00005
00006 namespace risc
00007 {
00008
00009
00010 namespace sa
00011 {
00012
00013
00014 namespace ga
00015 {
00016
00017 enum Color {White, Gray, Black};
00018
00019 typedef std::pair<SgGraphNode*, Color> ColoredGraphNode;
00020 typedef std::vector<ColoredGraphNode> ColoredNodeVector;
00021
00022
00023 std::set<SgFunctionSymbol*> dfs(SgFunctionSymbol *root_func_symbol,
00024 SgIncidenceDirectedGraph &graph);
00025
00026 void dfs_visit(ColoredGraphNode& root, ColoredNodeVector &nodes,
00027 SgIncidenceDirectedGraph &graph);
00028
00029
00030 }
00031
00032 }
00033
00034 }
00035
00036 #endif
00037
00038