33 namespace VirtualCFG {
82 std::string toStringForDebugging()
const;
84 std::string id()
const;
90 std::vector<CFGEdge>
outEdges()
const;
92 std::vector<CFGEdge>
inEdges()
const;
97 bool isInteresting()
const;
120 std::string toStringForDebugging()
const;
122 std::string id()
const;
132 unsigned int computedGotoCaseIndex()
const;
136 std::vector<SgInitializedName*> scopesBeingExited()
const;
138 std::vector<SgInitializedName*> scopesBeingEntered()
const;
162 assert (!a.
edges.empty());
163 assert (!b.
edges.empty());
164 assert (a.
edges.back().target() == b.
edges.front().source());
175 std::string
id()
const;
182 for (
unsigned int i = 0; i <
edges.size(); ++i) {
190 for (
unsigned int i = 0; i <
edges.size(); ++i) {
192 if (label != NULL)
return label;
197 for (
unsigned int i = 0; i <
edges.size(); ++i) {
199 if (base != NULL)
return base;
204 std::vector<SgInitializedName*> result;
205 for (
unsigned int i = 0; i <
edges.size(); ++i) {
206 std::vector<SgInitializedName*> s_i =
edges[i].scopesBeingExited();
207 result.insert(result.end(), s_i.begin(), s_i.end());
212 std::vector<SgInitializedName*> result;
213 for (
unsigned int i = 0; i <
edges.size(); ++i) {
214 std::vector<SgInitializedName*> s_i =
edges[i].scopesBeingEntered();
215 result.insert(result.end(), s_i.begin(), s_i.end());
227 for (
unsigned int i = 0; i <
edges.size(); ++i) {
276 class InterestingEdge;
285 std::string
id()
const {
return n.
id();}
289 std::vector<InterestingEdge>
outEdges()
const;
290 std::vector<InterestingEdge>
inEdges()
const;
304 std::string
id()
const {
return p.
id();}
328 template <
class Node1T,
class Node2T,
class EdgeT>
329 void makeEdge(Node1T from, Node2T to, std::vector<EdgeT>& result);
333 #define SGFUNCTIONCALLEXP_INTERPROCEDURAL_INDEX 2
334 #define SGCONSTRUCTORINITIALIZER_INTERPROCEDURAL_INDEX 1
335 #define SGFUNCTIONDEFINITION_INTERPROCEDURAL_INDEX 2
337 #define SGFUNCTIONCALLEXP_INTERPROCEDURAL_INDEX 2
338 #define SGCONSTRUCTORINITIALIZER_INTERPROCEDURAL_INDEX 1
339 #define SGFUNCTIONDEFINITION_INTERPROCEDURAL_INDEX 2
342 template <
class NodeT1,
class NodeT2,
class EdgeT>
343 void makeEdge(NodeT1 from, NodeT2 to, std::vector<EdgeT>& result);
345 #endif // VIRTUAL_CFG_H