1 #ifndef FILTEREDCFGVIEW_H
2 #define FILTEREDCFGVIEW_H
5 #include "virtualCFG.h"
18 FilterFunction filter;
30 void setFilter(
const FilterFunction& f)
35 const CFGNode& toNode()
const
39 std::string toString()
const
42 if (nToString.find(
'>',0)>0)
43 nToString.insert(nToString.find(
'>',0)+1,
"\n");
46 std::string toStringForDebugging()
const
50 std::string id()
const
58 unsigned int getIndex()
const
62 std::vector < FilteredCFGEdge < FilterFunction > >outEdges()
const;
63 std::vector < FilteredCFGEdge < FilterFunction > >inEdges()
const;
64 bool isInteresting()
const
82 template <
typename FilterFunction >
class FilteredCFGEdge
85 FilterFunction filter;
97 void setFilter(
const FilterFunction& f)
102 std::string toString()
const
106 std::string toStringForDebugging()
const
108 return p.toStringForDebugging();
110 std::string id()
const
114 FilteredCFGNode < FilterFunction > source()
const
116 return FilteredCFGNode < FilterFunction > (p.source());
118 FilteredCFGNode < FilterFunction > target()
const
120 return FilteredCFGNode < FilterFunction > (p.target());
122 EdgeConditionKind condition()
const
124 return p.condition();
128 return p.caseLabel();
130 std::vector < SgInitializedName * >scopesBeingExited()
const
132 return p.scopesBeingExited();
134 std::vector < SgInitializedName * >scopesBeingEntered()
const
136 return p.scopesBeingEntered();
138 bool operator==(
const FilteredCFGEdge < FilterFunction > &o)
const
142 bool operator!=(
const FilteredCFGEdge < FilterFunction > &o)
const
146 bool operator<(const FilteredCFGEdge < FilterFunction > &o)
const
158 template <
typename FilterFunction > std::ostream & cfgToDot(std::ostream & o,
159 std::string graphName,
161 FilterFunction > start);
164 #include "filteredCFGImpl.h"
const CFGPath & getPath() const
The underlying path in the full CFG represented by this edge in the filtered CFG. ...
unsigned int getIndex() const
An identifying index within the AST node given by getNode()
FilteredCFGNode()
Need a default constructor to use with boost_graph.
std::string id() const
ID to use for Dot, etc.
FilteredCFGEdge()
Need a default constructor to use with boost_graph.
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes, since similar to statement, expressions have a concrete location within the user's source code.
A node in the control flow graph.
This class represents the base class for all IR nodes within Sage III.
std::string toStringForDebugging() const
String for debugging graphs.
SgNode * getNode() const
The underlying AST node.
std::string toString() const
Pretty string for Dot node labels, etc.