ROSE
0.9.6a
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
interproceduralCFG.h
Go to the documentation of this file.
1
#ifndef INTERPROCEDURAL_CFG_H
2
#define INTERPROCEDURAL_CFG_H
3
4
#include "
staticCFG.h
"
5
#include "
CallGraph.h
"
6
#include <map>
7
#include <set>
8
#include <string>
9
10
11
class
SgIncidenceDirectedGraph
;
12
class
SgGraphNode
;
13
class
SgDirectedGraphEdge
;
14
15
16
namespace
StaticCFG
17
{
18
19
using
VirtualCFG::CFGNode
;
20
using
VirtualCFG::CFGEdge
;
21
22
23
class
ROSE_DLL_API
InterproceduralCFG
:
public
CFG
24
{
25
protected
:
26
virtual
void
buildCFG(
CFGNode
n,
27
std::map<CFGNode, SgGraphNode*>& all_nodes,
28
std::set<CFGNode>& explored,
29
ClassHierarchyWrapper
* classHierarchy);
30
public
:
31
InterproceduralCFG
() :
CFG
() {}
32
33
// The valid nodes are SgProject, SgStatement, SgExpression and SgInitializedName
34
InterproceduralCFG
(
SgNode
* node,
bool
is_filtered =
false
)
35
:
CFG
() {
36
graph_ = NULL;
37
is_filtered_ = is_filtered;
38
start_ = node;
39
buildCFG();
40
}
41
SgNode
*
getEntry
()
42
{
43
return
start_;
44
}
45
SgIncidenceDirectedGraph
*
getGraph
()
46
{
47
return
graph_;
48
}
49
SgGraphNode
*
getGraphNode
(
CFGNode
n) {
50
return
alNodes[n];
51
}
52
// Build CFG according to the 'is_filtered_' flag.
53
virtual
void
buildCFG
()
54
{
55
buildFullCFG();
56
}
57
std::map<CFGNode, SgGraphNode*>
alNodes
;
58
CFGNode
neededStart
;
59
// Build CFG for debugging.
60
virtual
void
buildFullCFG();
61
// Build filtered CFG which only contains interesting nodes.
62
virtual
void
buildFilteredCFG();
63
};
64
65
}
// end of namespace StaticCFG
66
67
#endif
rose-edg4x
src
frontend
SageIII
virtualCFG
interproceduralCFG.h
Generated on Mon May 5 2014 17:29:24 for ROSE by
1.8.4