1#ifndef FILTEREDCFGVIEW_H
2#define FILTEREDCFGVIEW_H
13 template <
typename FilterFunction >
class FilteredCFGEdge;
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
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"
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes,...
This class represents the base class for all IR nodes within Sage III.
A node in the control flow graph.
SgNode * getNode() const
The underlying AST node.
std::string toString() const
Pretty string for Dot node labels, etc.
unsigned int getIndex() const
An identifying index within the AST node given by getNode()
std::string id() const
ID to use for Dot, etc.
std::string toStringForDebugging() const
String for debugging graphs.
const CFGPath & getPath() const
The underlying path in the full CFG represented by this edge in the filtered CFG.
FilteredCFGEdge()
Need a default constructor to use with boost_graph.
FilteredCFGNode()
Need a default constructor to use with boost_graph.