svf-lib 1.0.2112 → 1.0.2114
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-linux/Release-build/bin/ae +0 -0
- package/SVF-linux/Release-build/bin/cfl +0 -0
- package/SVF-linux/Release-build/bin/dvf +0 -0
- package/SVF-linux/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux/Release-build/bin/mta +0 -0
- package/SVF-linux/Release-build/bin/saber +0 -0
- package/SVF-linux/Release-build/bin/svf-ex +0 -0
- package/SVF-linux/Release-build/bin/wpa +0 -0
- package/SVF-linux/Release-build/include/Graphs/ThreadCallGraph.h +5 -4
- package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +1 -1
- package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysisImpl.h +4 -0
- package/SVF-linux/Release-build/include/Util/SVFUtil.h +1 -1
- package/SVF-linux/Release-build/include/Util/ThreadAPI.h +8 -2
- package/SVF-linux/Release-build/include/WPA/Andersen.h +26 -13
- package/SVF-linux/Release-build/include/WPA/Steensgaard.h +10 -20
- package/SVF-linux/Release-build/include/WPA/TypeAnalysis.h +10 -3
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/Graphs/CDG.h +18 -1
- package/SVF-osx/Release-build/include/Graphs/CFLGraph.h +19 -1
- package/SVF-osx/Release-build/include/Graphs/CHG.h +19 -1
- package/SVF-osx/Release-build/include/Graphs/CallGraph.h +19 -1
- package/SVF-osx/Release-build/include/Graphs/ConsGNode.h +19 -1
- package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +243 -17
- package/SVF-osx/Release-build/include/Graphs/ICFG.h +0 -96
- package/SVF-osx/Release-build/include/Graphs/ICFGNode.h +55 -22
- package/SVF-osx/Release-build/include/Graphs/SVFG.h +2 -2
- package/SVF-osx/Release-build/include/Graphs/SVFGNode.h +5 -17
- package/SVF-osx/Release-build/include/Graphs/SVFGOPT.h +2 -1
- package/SVF-osx/Release-build/include/Graphs/VFG.h +2 -2
- package/SVF-osx/Release-build/include/Graphs/VFGNode.h +99 -26
- package/SVF-osx/Release-build/include/MTA/TCT.h +19 -1
- package/SVF-osx/Release-build/include/SABER/SaberCondAllocator.h +2 -2
- package/SVF-osx/Release-build/include/SVF-LLVM/DCHG.h +1 -1
- package/SVF-osx/Release-build/include/SVF-LLVM/ICFGBuilder.h +93 -23
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +84 -0
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +15 -0
- package/SVF-osx/Release-build/include/SVF-LLVM/SVFIRBuilder.h +19 -12
- package/SVF-osx/Release-build/include/SVFIR/SVFFileSystem.h +1 -1
- package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +2 -2
- package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +68 -38
- package/SVF-osx/Release-build/include/SVFIR/SymbolTableInfo.h +11 -1
- package/SVF-osx/Release-build/include/WPA/Andersen.h +1 -1
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
#define RCG_H_
|
|
32
32
|
|
|
33
33
|
#include "Graphs/CallGraph.h"
|
|
34
|
-
#include "MemoryModel/PointerAnalysisImpl.h"
|
|
35
34
|
|
|
36
35
|
namespace SVF
|
|
37
36
|
{
|
|
38
37
|
|
|
39
38
|
class SVFModule;
|
|
40
39
|
class ThreadAPI;
|
|
40
|
+
class PointerAnalysis;
|
|
41
41
|
/*!
|
|
42
42
|
* PTA thread fork edge from fork site to the entry of a start routine function
|
|
43
43
|
*/
|
|
@@ -201,7 +201,8 @@ public:
|
|
|
201
201
|
/// whether this call instruction has a valid call graph edge
|
|
202
202
|
inline bool hasThreadForkEdge(const CallICFGNode* cs) const
|
|
203
203
|
{
|
|
204
|
-
return callinstToThreadForkEdgesMap.find(cs) !=
|
|
204
|
+
return callinstToThreadForkEdgesMap.find(cs) !=
|
|
205
|
+
callinstToThreadForkEdgesMap.end();
|
|
205
206
|
}
|
|
206
207
|
inline ForkEdgeSet::const_iterator getForkEdgeBegin(const CallICFGNode* cs) const
|
|
207
208
|
{
|
|
@@ -345,8 +346,8 @@ public:
|
|
|
345
346
|
|
|
346
347
|
/// Add direct/indirect thread fork edges
|
|
347
348
|
//@{
|
|
348
|
-
|
|
349
|
-
|
|
349
|
+
bool addDirectForkEdge(const CallICFGNode* cs);
|
|
350
|
+
bool addIndirectForkEdge(const CallICFGNode* cs, const SVFFunction* callee);
|
|
350
351
|
//@}
|
|
351
352
|
|
|
352
353
|
/// Add thread join edges
|
|
@@ -199,6 +199,10 @@ protected:
|
|
|
199
199
|
/// On the fly call graph construction
|
|
200
200
|
virtual void onTheFlyCallGraphSolve(const CallSiteToFunPtrMap& callsites, CallEdgeMap& newEdges);
|
|
201
201
|
|
|
202
|
+
/// On the fly thread call graph construction respecting forksite
|
|
203
|
+
virtual void onTheFlyThreadCallGraphSolve(const CallSiteToFunPtrMap& callsites,
|
|
204
|
+
CallEdgeMap& newForkEdges);
|
|
205
|
+
|
|
202
206
|
/// Normalize points-to information for field-sensitive analysis,
|
|
203
207
|
/// i.e., replace fieldObj with baseObj if it is field-insensitive
|
|
204
208
|
virtual void normalizePointsTo();
|
|
@@ -457,7 +457,7 @@ inline bool isBarrierWaitCall(const CallICFGNode* cs)
|
|
|
457
457
|
|
|
458
458
|
/// Return sole argument of the thread routine
|
|
459
459
|
//@{
|
|
460
|
-
inline const
|
|
460
|
+
inline const SVFVar* getActualParmAtForkSite(const CallICFGNode* cs)
|
|
461
461
|
{
|
|
462
462
|
return ThreadAPI::getThreadAPI()->getActualParmAtForkSite(cs);
|
|
463
463
|
}
|
|
@@ -38,6 +38,7 @@ namespace SVF
|
|
|
38
38
|
class SVFModule;
|
|
39
39
|
class ICFGNode;
|
|
40
40
|
class CallICFGNode;
|
|
41
|
+
class SVFVar;
|
|
41
42
|
|
|
42
43
|
/*
|
|
43
44
|
* ThreadAPI class contains interfaces for pthread programs
|
|
@@ -128,11 +129,16 @@ public:
|
|
|
128
129
|
/// Note that, it could be function type or a void* pointer
|
|
129
130
|
const SVFValue* getForkedFun(const CallICFGNode *inst) const;
|
|
130
131
|
|
|
131
|
-
/// Return the
|
|
132
|
+
/// Return the actual param of forksite
|
|
132
133
|
/// Note that, it is the sole argument of start routine ( a void* pointer )
|
|
133
|
-
const
|
|
134
|
+
const SVFVar* getActualParmAtForkSite(const CallICFGNode *inst) const;
|
|
135
|
+
|
|
136
|
+
/// Return the formal parm of forked function (the first arg in pthread)
|
|
137
|
+
const SVFVar* getFormalParmOfForkedFun(const SVFFunction* F) const;
|
|
134
138
|
//@}
|
|
135
139
|
|
|
140
|
+
|
|
141
|
+
|
|
136
142
|
/// Return true if this call create a new thread
|
|
137
143
|
//@{
|
|
138
144
|
bool isTDFork(const CallICFGNode *inst) const;
|
|
@@ -47,6 +47,8 @@ namespace SVF
|
|
|
47
47
|
|
|
48
48
|
class SVFModule;
|
|
49
49
|
|
|
50
|
+
class ThreadCallGraph;
|
|
51
|
+
|
|
50
52
|
/*!
|
|
51
53
|
* Abstract class of inclusion-based Pointer Analysis
|
|
52
54
|
*/
|
|
@@ -54,6 +56,9 @@ typedef WPASolver<ConstraintGraph*> WPAConstraintSolver;
|
|
|
54
56
|
|
|
55
57
|
class AndersenBase: public WPAConstraintSolver, public BVDataPTAImpl
|
|
56
58
|
{
|
|
59
|
+
public:
|
|
60
|
+
typedef OrderedMap<const CallICFGNode*, NodeID> CallSite2DummyValPN;
|
|
61
|
+
|
|
57
62
|
public:
|
|
58
63
|
|
|
59
64
|
/// Constructor
|
|
@@ -81,11 +86,19 @@ public:
|
|
|
81
86
|
/// Finalize analysis
|
|
82
87
|
virtual void finalize() override;
|
|
83
88
|
|
|
84
|
-
///
|
|
85
|
-
virtual
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
/// Update call graph
|
|
90
|
+
virtual bool updateCallGraph(const CallSiteToFunPtrMap&) override;
|
|
91
|
+
|
|
92
|
+
/// Update thread call graph
|
|
93
|
+
virtual bool updateThreadCallGraph(const CallSiteToFunPtrMap&, NodePairSet&);
|
|
94
|
+
|
|
95
|
+
/// Connect formal and actual parameters for indirect forksites
|
|
96
|
+
virtual void connectCaller2ForkedFunParams(const CallICFGNode* cs, const SVFFunction* F,
|
|
97
|
+
NodePairSet& cpySrcNodes);
|
|
98
|
+
|
|
99
|
+
/// Connect formal and actual parameters for indirect callsites
|
|
100
|
+
virtual void connectCaller2CalleeParams(const CallICFGNode* cs, const SVFFunction* F,
|
|
101
|
+
NodePairSet& cpySrcNodes);
|
|
89
102
|
|
|
90
103
|
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
91
104
|
//@{
|
|
@@ -123,6 +136,9 @@ public:
|
|
|
123
136
|
}
|
|
124
137
|
//@}
|
|
125
138
|
|
|
139
|
+
/// Add copy edge on constraint graph
|
|
140
|
+
virtual inline bool addCopyEdge(NodeID src, NodeID dst) = 0;
|
|
141
|
+
|
|
126
142
|
/// dump statistics
|
|
127
143
|
inline void printStat()
|
|
128
144
|
{
|
|
@@ -160,6 +176,11 @@ public:
|
|
|
160
176
|
protected:
|
|
161
177
|
/// Constraint Graph
|
|
162
178
|
ConstraintGraph* consCG;
|
|
179
|
+
CallSite2DummyValPN
|
|
180
|
+
callsite2DummyValPN; ///< Map an instruction to a dummy obj which
|
|
181
|
+
///< created at an indirect callsite, which invokes
|
|
182
|
+
///< a heap allocator
|
|
183
|
+
void heapAllocatorViaIndCall(const CallICFGNode* cs, NodePairSet& cpySrcNodes);
|
|
163
184
|
};
|
|
164
185
|
|
|
165
186
|
/*!
|
|
@@ -171,7 +192,6 @@ class Andersen: public AndersenBase
|
|
|
171
192
|
|
|
172
193
|
public:
|
|
173
194
|
typedef SCCDetection<ConstraintGraph*> CGSCC;
|
|
174
|
-
typedef OrderedMap<const CallICFGNode*, NodeID> CallSite2DummyValPN;
|
|
175
195
|
|
|
176
196
|
/// Constructor
|
|
177
197
|
Andersen(SVFIR* _pag, PTATY type = Andersen_WPA, bool alias_check = true)
|
|
@@ -243,7 +263,6 @@ public:
|
|
|
243
263
|
protected:
|
|
244
264
|
|
|
245
265
|
CallSite2DummyValPN callsite2DummyValPN; ///< Map an instruction to a dummy obj which created at an indirect callsite, which invokes a heap allocator
|
|
246
|
-
void heapAllocatorViaIndCall(const CallICFGNode* cs,NodePairSet &cpySrcNodes);
|
|
247
266
|
|
|
248
267
|
/// Handle diff points-to set.
|
|
249
268
|
virtual inline void computeDiffPts(NodeID id)
|
|
@@ -311,12 +330,6 @@ protected:
|
|
|
311
330
|
return false;
|
|
312
331
|
}
|
|
313
332
|
|
|
314
|
-
/// Update call graph for the input indirect callsites
|
|
315
|
-
virtual bool updateCallGraph(const CallSiteToFunPtrMap& callsites);
|
|
316
|
-
|
|
317
|
-
/// Connect formal and actual parameters for indirect callsites
|
|
318
|
-
void connectCaller2CalleeParams(const CallICFGNode* cs, const SVFFunction* F, NodePairSet& cpySrcNodes);
|
|
319
|
-
|
|
320
333
|
/// Merge sub node to its rep
|
|
321
334
|
virtual void mergeNodeToRep(NodeID nodeId,NodeID newRepId);
|
|
322
335
|
|
|
@@ -23,7 +23,6 @@ class Steensgaard : public AndersenBase
|
|
|
23
23
|
public:
|
|
24
24
|
typedef Map<NodeID, NodeID> NodeToEquivClassMap;
|
|
25
25
|
typedef Map<NodeID, Set<NodeID>> NodeToSubsMap;
|
|
26
|
-
typedef OrderedMap<const CallICFGNode*, NodeID> CallSite2DummyValPN;
|
|
27
26
|
|
|
28
27
|
/// Constructor
|
|
29
28
|
Steensgaard(SVFIR* _pag) : AndersenBase(_pag, Steensgaard_WPA, true) {}
|
|
@@ -46,7 +45,7 @@ public:
|
|
|
46
45
|
steens = nullptr;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
virtual void solveWorklist();
|
|
48
|
+
virtual void solveWorklist() override;
|
|
50
49
|
|
|
51
50
|
void processAllAddr();
|
|
52
51
|
|
|
@@ -69,18 +68,18 @@ public:
|
|
|
69
68
|
//@}
|
|
70
69
|
|
|
71
70
|
/// Operation of points-to set
|
|
72
|
-
virtual inline const PointsTo& getPts(NodeID id)
|
|
71
|
+
virtual inline const PointsTo& getPts(NodeID id) override
|
|
73
72
|
{
|
|
74
73
|
return getPTDataTy()->getPts(getEC(id));
|
|
75
74
|
}
|
|
76
75
|
/// pts(id) = pts(id) U target
|
|
77
|
-
virtual inline bool unionPts(NodeID id, const PointsTo& target)
|
|
76
|
+
virtual inline bool unionPts(NodeID id, const PointsTo& target) override
|
|
78
77
|
{
|
|
79
78
|
id = getEC(id);
|
|
80
79
|
return getPTDataTy()->unionPts(id, target);
|
|
81
80
|
}
|
|
82
81
|
/// pts(id) = pts(id) U pts(ptd)
|
|
83
|
-
virtual inline bool unionPts(NodeID id, NodeID ptd)
|
|
82
|
+
virtual inline bool unionPts(NodeID id, NodeID ptd) override
|
|
84
83
|
{
|
|
85
84
|
id = getEC(id);
|
|
86
85
|
ptd = getEC(ptd);
|
|
@@ -98,6 +97,11 @@ public:
|
|
|
98
97
|
else
|
|
99
98
|
return it->second;
|
|
100
99
|
}
|
|
100
|
+
/// Return getEC(id)
|
|
101
|
+
inline NodeID sccRepNode(NodeID id) const override
|
|
102
|
+
{
|
|
103
|
+
return getEC(id);
|
|
104
|
+
}
|
|
101
105
|
void setEC(NodeID node, NodeID rep);
|
|
102
106
|
|
|
103
107
|
inline Set<NodeID>& getSubNodes(NodeID id)
|
|
@@ -111,25 +115,11 @@ public:
|
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
/// Add copy edge on constraint graph
|
|
114
|
-
virtual inline bool addCopyEdge(NodeID src, NodeID dst)
|
|
118
|
+
virtual inline bool addCopyEdge(NodeID src, NodeID dst) override
|
|
115
119
|
{
|
|
116
120
|
return consCG->addCopyCGEdge(src, dst);
|
|
117
121
|
}
|
|
118
122
|
|
|
119
|
-
protected:
|
|
120
|
-
CallSite2DummyValPN
|
|
121
|
-
callsite2DummyValPN; ///< Map an instruction to a dummy obj which
|
|
122
|
-
///< created at an indirect callsite, which invokes
|
|
123
|
-
///< a heap allocator
|
|
124
|
-
void heapAllocatorViaIndCall(const CallICFGNode* cs, NodePairSet& cpySrcNodes);
|
|
125
|
-
|
|
126
|
-
/// Update call graph for the input indirect callsites
|
|
127
|
-
virtual bool updateCallGraph(const CallSiteToFunPtrMap& callsites);
|
|
128
|
-
|
|
129
|
-
/// Connect formal and actual parameters for indirect callsites
|
|
130
|
-
void connectCaller2CalleeParams(const CallICFGNode* cs, const SVFFunction* F,
|
|
131
|
-
NodePairSet& cpySrcNodes);
|
|
132
|
-
|
|
133
123
|
private:
|
|
134
124
|
static Steensgaard* steens; // static instance
|
|
135
125
|
NodeToEquivClassMap nodeToECMap;
|
|
@@ -51,13 +51,20 @@ public:
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
/// Type analysis
|
|
54
|
-
void analyze();
|
|
54
|
+
void analyze() override;
|
|
55
55
|
|
|
56
56
|
/// Initialize analysis
|
|
57
|
-
void initialize();
|
|
57
|
+
void initialize() override;
|
|
58
58
|
|
|
59
59
|
/// Finalize analysis
|
|
60
|
-
virtual inline void finalize();
|
|
60
|
+
virtual inline void finalize() override;
|
|
61
|
+
|
|
62
|
+
/// Add copy edge on constraint graph
|
|
63
|
+
inline bool addCopyEdge(NodeID src, NodeID dst) override
|
|
64
|
+
{
|
|
65
|
+
assert(false && "this function should never be executed!");
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
61
68
|
|
|
62
69
|
/// Resolve callgraph based on CHA
|
|
63
70
|
void callGraphSolveBasedOnCHA(const CallSiteToFunPtrMap& callsites, CallEdgeMap& newEdges);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -96,7 +96,7 @@ public:
|
|
|
96
96
|
|
|
97
97
|
public:
|
|
98
98
|
/// Constructor
|
|
99
|
-
CDGNode(const ICFGNode *icfgNode) : GenericCDGNodeTy(icfgNode->getId(),
|
|
99
|
+
CDGNode(const ICFGNode *icfgNode) : GenericCDGNodeTy(icfgNode->getId(), CDNodeKd), _icfgNode(icfgNode)
|
|
100
100
|
{
|
|
101
101
|
|
|
102
102
|
}
|
|
@@ -114,6 +114,23 @@ public:
|
|
|
114
114
|
return _icfgNode;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
118
|
+
//@{
|
|
119
|
+
static inline bool classof(const CDGNode *)
|
|
120
|
+
{
|
|
121
|
+
return true;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static inline bool classof(const GenericICFGNodeTy* node)
|
|
125
|
+
{
|
|
126
|
+
return node->getNodeKind() == CDNodeKd;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
130
|
+
{
|
|
131
|
+
return node->getNodeKind() == CDNodeKd;
|
|
132
|
+
}
|
|
133
|
+
//@}
|
|
117
134
|
|
|
118
135
|
private:
|
|
119
136
|
const ICFGNode *_icfgNode;
|
|
@@ -76,7 +76,7 @@ typedef GenericNode<CFLNode, CFLEdge> GenericCFLNodeTy;
|
|
|
76
76
|
class CFLNode: public GenericCFLNodeTy
|
|
77
77
|
{
|
|
78
78
|
public:
|
|
79
|
-
CFLNode (NodeID i = 0, GNodeK k =
|
|
79
|
+
CFLNode (NodeID i = 0, GNodeK k = CFLNodeKd):
|
|
80
80
|
GenericCFLNodeTy(i, k)
|
|
81
81
|
{
|
|
82
82
|
}
|
|
@@ -148,6 +148,24 @@ public:
|
|
|
148
148
|
|
|
149
149
|
return num1 && num2;
|
|
150
150
|
}
|
|
151
|
+
|
|
152
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
153
|
+
//@{
|
|
154
|
+
static inline bool classof(const CFLNode *)
|
|
155
|
+
{
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static inline bool classof(const GenericICFGNodeTy* node)
|
|
160
|
+
{
|
|
161
|
+
return node->getNodeKind() == CFLNodeKd;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
165
|
+
{
|
|
166
|
+
return node->getNodeKind() == CFLNodeKd;
|
|
167
|
+
}
|
|
168
|
+
//@}
|
|
151
169
|
};
|
|
152
170
|
|
|
153
171
|
/// Edge-labeled graph for CFL Reachability analysis
|
|
@@ -120,7 +120,7 @@ public:
|
|
|
120
120
|
|
|
121
121
|
typedef std::vector<const SVFFunction*> FuncVector;
|
|
122
122
|
|
|
123
|
-
CHNode (const std::string& name, NodeID i = 0, GNodeK k =
|
|
123
|
+
CHNode (const std::string& name, NodeID i = 0, GNodeK k = CHNodeKd):
|
|
124
124
|
GenericCHNodeTy(i, k), vtable(nullptr), className(name), flags(0)
|
|
125
125
|
{
|
|
126
126
|
}
|
|
@@ -191,6 +191,24 @@ public:
|
|
|
191
191
|
vtable = vtbl;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
195
|
+
//@{
|
|
196
|
+
static inline bool classof(const CHNode *)
|
|
197
|
+
{
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
static inline bool classof(const GenericCHNodeTy * node)
|
|
202
|
+
{
|
|
203
|
+
return node->getNodeKind() == CHNodeKd;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
207
|
+
{
|
|
208
|
+
return node->getNodeKind() == CHNodeKd;
|
|
209
|
+
}
|
|
210
|
+
//@}
|
|
211
|
+
|
|
194
212
|
private:
|
|
195
213
|
const SVFGlobalValue* vtable;
|
|
196
214
|
std::string className;
|
|
@@ -184,7 +184,7 @@ private:
|
|
|
184
184
|
|
|
185
185
|
public:
|
|
186
186
|
/// Constructor
|
|
187
|
-
CallGraphNode(NodeID i, const SVFFunction* f) : GenericCallGraphNodeTy(i,
|
|
187
|
+
CallGraphNode(NodeID i, const SVFFunction* f) : GenericCallGraphNodeTy(i,CallNodeKd), fun(f)
|
|
188
188
|
{
|
|
189
189
|
|
|
190
190
|
}
|
|
@@ -209,6 +209,24 @@ public:
|
|
|
209
209
|
//@}
|
|
210
210
|
|
|
211
211
|
virtual const std::string toString() const;
|
|
212
|
+
|
|
213
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
214
|
+
//@{
|
|
215
|
+
static inline bool classof(const CallGraphNode *)
|
|
216
|
+
{
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
static inline bool classof(const GenericICFGNodeTy* node)
|
|
221
|
+
{
|
|
222
|
+
return node->getNodeKind() == CallNodeKd;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
226
|
+
{
|
|
227
|
+
return node->getNodeKind() == CallNodeKd;
|
|
228
|
+
}
|
|
229
|
+
//@}
|
|
212
230
|
};
|
|
213
231
|
|
|
214
232
|
/*!
|
|
@@ -71,7 +71,7 @@ public:
|
|
|
71
71
|
NodeBS strides;
|
|
72
72
|
NodeBS baseIds;
|
|
73
73
|
|
|
74
|
-
ConstraintNode(NodeID i) : GenericConsNodeTy(i,
|
|
74
|
+
ConstraintNode(NodeID i) : GenericConsNodeTy(i, ConstraintNodeKd), _isPWCNode(false)
|
|
75
75
|
{
|
|
76
76
|
|
|
77
77
|
}
|
|
@@ -393,6 +393,24 @@ public:
|
|
|
393
393
|
return o;
|
|
394
394
|
}
|
|
395
395
|
//@}
|
|
396
|
+
|
|
397
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
398
|
+
//@{
|
|
399
|
+
static inline bool classof(const ConstraintNode *)
|
|
400
|
+
{
|
|
401
|
+
return true;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
static inline bool classof(const GenericICFGNodeTy* node)
|
|
405
|
+
{
|
|
406
|
+
return node->getNodeKind() == ConstraintNodeKd;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
410
|
+
{
|
|
411
|
+
return node->getNodeKind() == ConstraintNodeKd;
|
|
412
|
+
}
|
|
413
|
+
//@}
|
|
396
414
|
};
|
|
397
415
|
|
|
398
416
|
} // End namespace SVF
|