ROSE 0.11.145.192
customFilteredCFG.h
1/*
2 * File: CustomFilteredCFG.h
3 * Author: rahman2
4 *
5 * Created on July 20, 2011, 3:41 PM
6 */
7
8#ifndef CUSTOMFILTEREDCFG_H
9#define CUSTOMFILTEREDCFG_H
10
11#include "staticCFG.h"
12
13namespace StaticCFG
14{
16template <typename _Filter>
17class ROSE_DLL_API CustomFilteredCFG : public CFG {
18
19public:
20 CustomFilteredCFG(SgNode *node) : CFG(node, true) {
21 }
23 }
24 virtual void buildFilteredCFG();
25
26
27protected:
29 virtual void printEdge(std::ostream & o, SgDirectedGraphEdge* edge, bool isInEdge) {
30
31 AstAttribute* attr = edge->getAttribute("info");
32
34 VirtualCFG::FilteredCFGEdge<_Filter> e = edge_attr->getEdge();
35 o << e.source().id() << " -> " << e.target().id() << " [label=\"" << escapeString(e.toString()) <<
36 "\", style=\"" << (isInEdge ? "dotted" : "solid") << "\"];\n";
37 }
38 else
39 ROSE_ABORT();
40
41 }
42private:
43 template <class NodeT, class EdgeT>
44 void buildTemplatedCFG(NodeT n, std::map<NodeT, SgGraphNode*>& all_nodes, std::set<NodeT>& explored);
45
46 };
47
48}
49#endif /* CUSTOMFILTEREDCFG_H */
50
Base class for all IR node attribute values.
virtual AstAttribute * getAttribute(std::string s) const override
Returns attribute of name 's'.
This class represents the base class for all IR nodes within Sage III.
A CFG implementation with Custom filters.
virtual void buildFilteredCFG()
Build filtered CFG which only contains interesting nodes.
virtual void printEdge(std::ostream &o, SgDirectedGraphEdge *edge, bool isInEdge)
Virtual function Overloaded to print the Custom Filtered CFG Edges.