svf-lib 1.0.2213 → 1.0.2215

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.
Files changed (72) hide show
  1. package/SVF-linux/Release-build/bin/ae +0 -0
  2. package/SVF-linux/Release-build/bin/cfl +0 -0
  3. package/SVF-linux/Release-build/bin/dvf +0 -0
  4. package/SVF-linux/Release-build/bin/llvm2svf +0 -0
  5. package/SVF-linux/Release-build/bin/mta +0 -0
  6. package/SVF-linux/Release-build/bin/saber +0 -0
  7. package/SVF-linux/Release-build/bin/svf-ex +0 -0
  8. package/SVF-linux/Release-build/bin/wpa +0 -0
  9. package/SVF-linux/Release-build/include/DDA/DDAClient.h +6 -11
  10. package/SVF-linux/Release-build/include/DDA/DDAPass.h +1 -1
  11. package/SVF-linux/Release-build/include/Graphs/CHG.h +2 -3
  12. package/SVF-linux/Release-build/include/Graphs/GenericGraph.h +1 -286
  13. package/SVF-linux/Release-build/include/MTA/MTA.h +2 -2
  14. package/SVF-linux/Release-build/include/MTA/TCT.h +0 -6
  15. package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +1 -7
  16. package/SVF-linux/Release-build/include/SABER/DoubleFreeChecker.h +1 -1
  17. package/SVF-linux/Release-build/include/SABER/FileChecker.h +1 -1
  18. package/SVF-linux/Release-build/include/SABER/LeakChecker.h +1 -1
  19. package/SVF-linux/Release-build/include/SABER/SaberCondAllocator.h +1 -2
  20. package/SVF-linux/Release-build/include/SABER/SrcSnkDDA.h +2 -2
  21. package/SVF-linux/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  22. package/SVF-linux/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
  23. package/SVF-linux/Release-build/include/SVF-LLVM/DCHG.h +1 -1
  24. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMLoopAnalysis.h +1 -1
  25. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +2 -2
  26. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMUtil.h +1 -1
  27. package/SVF-linux/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
  28. package/SVF-linux/Release-build/include/{SVFIR → SVF-LLVM}/SVFModule.h +1 -36
  29. package/SVF-linux/Release-build/include/SVFIR/ObjTypeInfo.h +0 -1
  30. package/SVF-linux/Release-build/include/SVFIR/SVFIR.h +38 -11
  31. package/SVF-linux/Release-build/include/SVFIR/SVFStatements.h +1 -0
  32. package/SVF-linux/Release-build/include/SVFIR/SVFValue.h +202 -799
  33. package/SVF-linux/Release-build/include/Util/CDGBuilder.h +1 -1
  34. package/SVF-linux/Release-build/include/Util/GeneralType.h +1 -0
  35. package/SVF-linux/Release-build/include/Util/SVFLoopAndDomInfo.h +169 -0
  36. package/SVF-linux/Release-build/include/Util/SVFUtil.h +3 -1
  37. package/SVF-linux/Release-build/include/Util/ThreadAPI.h +2 -1
  38. package/SVF-linux/Release-build/include/WPA/FlowSensitive.h +1 -1
  39. package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
  40. package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
  41. package/SVF-osx/Release-build/bin/ae +0 -0
  42. package/SVF-osx/Release-build/bin/cfl +0 -0
  43. package/SVF-osx/Release-build/bin/dvf +0 -0
  44. package/SVF-osx/Release-build/bin/llvm2svf +0 -0
  45. package/SVF-osx/Release-build/bin/mta +0 -0
  46. package/SVF-osx/Release-build/bin/saber +0 -0
  47. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  48. package/SVF-osx/Release-build/bin/wpa +0 -0
  49. package/SVF-osx/Release-build/include/Graphs/BasicBlockG.h +2 -2
  50. package/SVF-osx/Release-build/include/Graphs/CDG.h +1 -1
  51. package/SVF-osx/Release-build/include/Graphs/CFLGraph.h +1 -1
  52. package/SVF-osx/Release-build/include/Graphs/CHG.h +1 -1
  53. package/SVF-osx/Release-build/include/Graphs/CallGraph.h +1 -1
  54. package/SVF-osx/Release-build/include/Graphs/ConsGNode.h +1 -1
  55. package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +3 -3
  56. package/SVF-osx/Release-build/include/Graphs/ICFGNode.h +6 -6
  57. package/SVF-osx/Release-build/include/Graphs/VFGNode.h +20 -20
  58. package/SVF-osx/Release-build/include/MTA/TCT.h +1 -1
  59. package/SVF-osx/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  60. package/SVF-osx/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
  61. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +12 -12
  62. package/SVF-osx/Release-build/include/SVF-LLVM/LLVMUtil.h +2 -2
  63. package/SVF-osx/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
  64. package/SVF-osx/Release-build/include/SVF-LLVM/SVFIRBuilder.h +6 -6
  65. package/SVF-osx/Release-build/include/SVF-LLVM/SVFLLVMValue.h +805 -0
  66. package/SVF-osx/Release-build/include/SVF-LLVM/SVFModule.h +1 -1
  67. package/SVF-osx/Release-build/include/SVFIR/SVFValue.h +2 -2
  68. package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +28 -28
  69. package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
  70. package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
  71. package/package.json +1 -1
  72. /package/{SVF-osx → SVF-linux}/Release-build/include/SVF-LLVM/SVFValue.h +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -48,11 +48,11 @@ namespace SVF
48
48
  class DDAClient
49
49
  {
50
50
  public:
51
- DDAClient(SVFModule* mod) : pag(nullptr), module(mod), curPtr(0), solveAll(true) {}
51
+ DDAClient() : pag(nullptr), curPtr(0), solveAll(true) {}
52
52
 
53
53
  virtual ~DDAClient() {}
54
54
 
55
- virtual inline void initialise(SVFModule*) {}
55
+ virtual inline void initialise() {}
56
56
 
57
57
  /// Collect candidate pointers for query.
58
58
  virtual inline OrderedNodeSet& collectCandidateQueries(SVFIR* p)
@@ -91,16 +91,12 @@ public:
91
91
  userInput.insert(ptr);
92
92
  solveAll = false;
93
93
  }
94
- /// Get LLVM module
95
- inline SVFModule* getModule() const
96
- {
97
- return module;
98
- }
94
+
99
95
  virtual void answerQueries(PointerAnalysis* pta);
100
96
 
101
97
  virtual inline void performStat(PointerAnalysis*) {}
102
98
 
103
- virtual inline void collectWPANum(SVFModule*) {}
99
+ virtual inline void collectWPANum() {}
104
100
  protected:
105
101
  void addCandidate(NodeID id)
106
102
  {
@@ -109,7 +105,6 @@ protected:
109
105
  }
110
106
 
111
107
  SVFIR* pag; ///< SVFIR graph used by current DDA analysis
112
- SVFModule* module; ///< LLVM module
113
108
  NodeID curPtr; ///< current pointer being queried
114
109
  OrderedNodeSet candidateQueries; ///< store all candidate pointers to be queried
115
110
 
@@ -128,7 +123,7 @@ private:
128
123
  typedef OrderedMap<NodeID,const CallICFGNode*> VTablePtrToCallSiteMap;
129
124
  VTablePtrToCallSiteMap vtableToCallSiteMap;
130
125
  public:
131
- FunptrDDAClient(SVFModule* module) : DDAClient(module) {}
126
+ FunptrDDAClient() : DDAClient() {}
132
127
  ~FunptrDDAClient() {}
133
128
 
134
129
  /// Only collect function pointers as query candidates.
@@ -147,7 +142,7 @@ class AliasDDAClient : public DDAClient
147
142
  public:
148
143
  typedef OrderedSet<const PAGNode*> PAGNodeSet;
149
144
 
150
- AliasDDAClient(SVFModule* module) : DDAClient(module) {}
145
+ AliasDDAClient() : DDAClient() {}
151
146
  ~AliasDDAClient() {}
152
147
 
153
148
  /// Only collect function pointers as query candidates.
@@ -69,7 +69,7 @@ public:
69
69
  virtual void runOnModule(SVFIR* module);
70
70
 
71
71
  /// Select a client
72
- virtual void selectClient(SVFModule* module);
72
+ virtual void selectClient();
73
73
 
74
74
  /// Pass name
75
75
  virtual inline std::string getPassName() const
@@ -33,7 +33,7 @@
33
33
  #ifndef CHA_H_
34
34
  #define CHA_H_
35
35
 
36
- #include "SVFIR/SVFModule.h"
36
+ #include "Util/ThreadAPI.h"
37
37
  #include "Graphs/GenericGraph.h"
38
38
  #include "Util/WorkList.h"
39
39
 
@@ -252,7 +252,7 @@ public:
252
252
  DESTRUCTOR = 0x2 // connect node based on destructor
253
253
  } RELATIONTYPE;
254
254
 
255
- CHGraph(SVFModule* svfModule): svfMod(svfModule), classNum(0), vfID(0), buildingCHGTime(0)
255
+ CHGraph(): classNum(0), vfID(0), buildingCHGTime(0)
256
256
  {
257
257
  this->kind = Standard;
258
258
  }
@@ -318,7 +318,6 @@ public:
318
318
 
319
319
 
320
320
  private:
321
- SVFModule* svfMod;
322
321
  u32_t classNum;
323
322
  u32_t vfID;
324
323
  double buildingCHGTime;
@@ -33,6 +33,7 @@
33
33
  #include "SVFIR/SVFType.h"
34
34
  #include "Util/iterator.h"
35
35
  #include "Graphs/GraphTraits.h"
36
+ #include "SVFIR/SVFValue.h"
36
37
 
37
38
  namespace SVF
38
39
  {
@@ -134,292 +135,6 @@ protected:
134
135
  };
135
136
 
136
137
 
137
- class SVFBaseNode
138
- {
139
-
140
- public:
141
-
142
- enum GNodeK
143
- {
144
- // ┌─────────────────────────────────────────────────────────────────────────┐
145
- // │ ICFGNode: Classes of inter-procedural and intra-procedural control flow │
146
- // │ graph nodes (Parent class: ICFGNode) │
147
- // └─────────────────────────────────────────────────────────────────────────┘
148
- IntraBlock, // ├── Represents a node within a single procedure
149
- GlobalBlock, // ├── Represents a global-level block
150
- // │ └─ Subclass: InterICFGNode
151
- FunEntryBlock, // │ ├── Entry point of a function
152
- FunExitBlock, // │ ├── Exit point of a function
153
- FunCallBlock, // │ ├── Call site in the function
154
- FunRetBlock, // │ └── Return site in the function
155
-
156
- // ┌─────────────────────────────────────────────────────────────────────────┐
157
- // │ SVFVar: Classes of variable nodes (Parent class: SVFVar) │
158
- // │ Includes two main subclasses: ValVar and ObjVar │
159
- // └─────────────────────────────────────────────────────────────────────────┘
160
- // └─ Subclass: ValVar (Top-level variable nodes)
161
- ValNode, // ├── Represents a standard value variable
162
- ArgValNode, // ├── Represents an argument value variable
163
- FunValNode, // ├── Represents a function value variable
164
- GepValNode, // ├── Represents a GEP value variable
165
- RetValNode, // ├── Represents a return value node
166
- VarargValNode, // ├── Represents a variadic argument node
167
- GlobalValNode, // ├── Represents a global variable node
168
- ConstAggValNode, // ├── Represents a constant aggregate value node
169
- // │ └─ Subclass: ConstDataValVar
170
- ConstDataValNode, // │ ├── Represents a constant data variable
171
- BlackHoleValNode, // │ ├── Represents a black hole node
172
- ConstFPValNode, // │ ├── Represents a constant floating-point value node
173
- ConstIntValNode, // │ ├── Represents a constant integer value node
174
- ConstNullptrValNode, // │ └── Represents a constant nullptr value node
175
- // │ └─ Subclass: DummyValVar
176
- DummyValNode, // │ └── Dummy node for uninitialized values
177
-
178
- // └─ Subclass: ObjVar (Object variable nodes)
179
- ObjNode, // ├── Represents an object variable
180
- // │ └─ Subclass: GepObjVar
181
- GepObjNode, // │ ├── Represents a GEP object variable
182
- // │ └─ Subclass: BaseObjVar
183
- BaseObjNode, // │ ├── Represents a base object node
184
- FunObjNode, // │ ├── Represents a function object
185
- HeapObjNode, // │ ├── Represents a heap object
186
- StackObjNode, // │ ├── Represents a stack object
187
- GlobalObjNode, // │ ├── Represents a global object
188
- ConstAggObjNode, // │ ├── Represents a constant aggregate object
189
- // │ └─ Subclass: ConstDataObjVar
190
- ConstDataObjNode, // │ ├── Represents a constant data object
191
- ConstFPObjNode, // │ ├── Represents a constant floating-point object
192
- ConstIntObjNode, // │ ├── Represents a constant integer object
193
- ConstNullptrObjNode, // │ └── Represents a constant nullptr object
194
- // │ └─ Subclass: DummyObjVar
195
- DummyObjNode, // │ └── Dummy node for uninitialized objects
196
-
197
- // ┌─────────────────────────────────────────────────────────────────────────┐
198
- // │ VFGNode: Classes of Value Flow Graph (VFG) node kinds (Parent class: │
199
- // │ VFGNode) │
200
- // │ Includes operation nodes and specialized subclasses │
201
- // └─────────────────────────────────────────────────────────────────────────┘
202
- Cmp, // ├── Represents a comparison operation
203
- BinaryOp, // ├── Represents a binary operation
204
- UnaryOp, // ├── Represents a unary operation
205
- Branch, // ├── Represents a branch operation
206
- DummyVProp, // ├── Dummy node for value propagation
207
- NPtr, // ├── Represents a null pointer operation
208
- // │ └─ Subclass: ArgumentVFGNode
209
- FRet, // │ ├── Represents a function return value
210
- ARet, // │ ├── Represents an argument return value
211
- AParm, // │ ├── Represents an argument parameter
212
- FParm, // │ └── Represents a function parameter
213
- // │ └─ Subclass: StmtVFGNode
214
- Addr, // │ ├── Represents an address operation
215
- Copy, // │ ├── Represents a copy operation
216
- Gep, // │ ├── Represents a GEP operation
217
- Store, // │ ├── Represents a store operation
218
- Load, // │ └── Represents a load operation
219
- // │ └─ Subclass: PHIVFGNode
220
- TPhi, // │ ├── Represents a type-based PHI node
221
- TIntraPhi, // │ ├── Represents an intra-procedural PHI node
222
- TInterPhi, // │ └── Represents an inter-procedural PHI node
223
- // │ └─ Subclass: MRSVFGNode
224
- FPIN, // │ ├── Function parameter input
225
- FPOUT, // │ ├── Function parameter output
226
- APIN, // │ ├── Argument parameter input
227
- APOUT, // │ └── Argument parameter output
228
- // │ └─ Subclass: MSSAPHISVFGNode
229
- MPhi, // │ ├── Memory PHI node
230
- MIntraPhi, // │ ├── Intra-procedural memory PHI node
231
- MInterPhi, // │ └── Inter-procedural memory PHI node
232
-
233
- // ┌─────────────────────────────────────────────────────────────────────────┐
234
- // │ Additional specific graph node types │
235
- // └─────────────────────────────────────────────────────────────────────────┘
236
- CallNodeKd, // Callgraph node
237
- CDNodeKd, // Control dependence graph node
238
- CFLNodeKd, // CFL graph node
239
- CHNodeKd, // Class hierarchy graph node
240
- ConstraintNodeKd, // Constraint graph node
241
- TCTNodeKd, // Thread creation tree node
242
- DCHNodeKd, // DCHG node
243
- BasicBlockKd, // Basic block node
244
- OtherKd // Other node kind
245
- };
246
-
247
-
248
- SVFBaseNode(NodeID i, GNodeK k, const SVFType* ty = nullptr): id(i),nodeKind(k), type(ty)
249
- {
250
-
251
- }
252
-
253
- /// Get ID
254
- inline NodeID getId() const
255
- {
256
- return id;
257
- }
258
-
259
- /// Get node kind
260
- inline GNodeK getNodeKind() const
261
- {
262
- return nodeKind;
263
- }
264
-
265
- virtual const SVFType* getType() const
266
- {
267
- return type;
268
- }
269
-
270
- inline virtual void setName(const std::string& nameInfo)
271
- {
272
- name = nameInfo;
273
- }
274
-
275
- inline virtual void setName(std::string&& nameInfo)
276
- {
277
- name = std::move(nameInfo);
278
- }
279
-
280
- virtual const std::string& getName() const
281
- {
282
- return name;
283
- }
284
-
285
- inline virtual void setSourceLoc(const std::string& sourceCodeInfo)
286
- {
287
- sourceLoc = sourceCodeInfo;
288
- }
289
-
290
- virtual const std::string getSourceLoc() const
291
- {
292
- return sourceLoc;
293
- }
294
-
295
- const std::string valueOnlyToString() const;
296
-
297
-
298
- protected:
299
- NodeID id; ///< Node ID
300
- GNodeK nodeKind; ///< Node kind
301
- const SVFType* type; ///< SVF type
302
-
303
- std::string name;
304
- std::string sourceLoc; ///< Source code information of this value
305
-
306
- /// Helper functions to check node kinds
307
- //{@ Check node kind
308
- static inline bool isICFGNodeKinds(GNodeK n)
309
- {
310
- static_assert(FunRetBlock - IntraBlock == 5,
311
- "the number of ICFGNodeKinds has changed, make sure "
312
- "the range is correct");
313
- return n <= FunRetBlock && n >= IntraBlock;
314
- }
315
-
316
- static inline bool isInterICFGNodeKind(GNodeK n)
317
- {
318
- static_assert(FunRetBlock - FunEntryBlock == 3,
319
- "the number of InterICFGNodeKind has changed, make sure "
320
- "the range is correct");
321
- return n <= FunRetBlock && n >= FunEntryBlock;
322
- }
323
-
324
- static inline bool isSVFVarKind(GNodeK n)
325
- {
326
- static_assert(DummyObjNode - ValNode == 26,
327
- "The number of SVFVarKinds has changed, make sure the "
328
- "range is correct");
329
-
330
- return n <= DummyObjNode && n >= ValNode;
331
- }
332
-
333
- static inline bool isValVarKinds(GNodeK n)
334
- {
335
- static_assert(DummyValNode - ValNode == 13,
336
- "The number of ValVarKinds has changed, make sure the "
337
- "range is correct");
338
- return n <= DummyValNode && n >= ValNode;
339
- }
340
-
341
-
342
- static inline bool isConstantDataValVar(GNodeK n)
343
- {
344
- static_assert(ConstNullptrValNode - ConstDataValNode == 4,
345
- "The number of ConstantDataValVarKinds has changed, make "
346
- "sure the range is correct");
347
- return n <= ConstNullptrValNode && n >= ConstDataValNode;
348
- }
349
-
350
- static inline bool isObjVarKinds(GNodeK n)
351
- {
352
- static_assert(DummyObjNode - ObjNode == 12,
353
- "The number of ObjVarKinds has changed, make sure the "
354
- "range is correct");
355
- return n <= DummyObjNode && n >= ObjNode;
356
- }
357
-
358
- static inline bool isBaseObjVarKinds(GNodeK n)
359
- {
360
- static_assert(DummyObjNode - BaseObjNode == 10,
361
- "The number of BaseObjVarKinds has changed, make sure the "
362
- "range is correct");
363
- return n <= DummyObjNode && n >= BaseObjNode;
364
- }
365
-
366
- static inline bool isConstantDataObjVarKinds(GNodeK n)
367
- {
368
- static_assert(ConstNullptrObjNode - ConstDataObjNode == 3,
369
- "The number of ConstantDataObjVarKinds has changed, make "
370
- "sure the range is correct");
371
- return n <= ConstNullptrObjNode && n >= ConstDataObjNode;
372
- }
373
-
374
- static inline bool isVFGNodeKinds(GNodeK n)
375
- {
376
- static_assert(MInterPhi - Cmp == 24,
377
- "The number of VFGNodeKinds has changed, make sure the "
378
- "range is correct");
379
- return n <= MInterPhi && n >= Cmp;
380
- }
381
-
382
- static inline bool isArgumentVFGNodeKinds(GNodeK n)
383
- {
384
- static_assert(FParm - FRet == 3,
385
- "The number of ArgumentVFGNodeKinds has changed, make "
386
- "sure the range is correct");
387
- return n <= FParm && n >= FRet;
388
- }
389
-
390
- static inline bool isStmtVFGNodeKinds(GNodeK n)
391
- {
392
- static_assert(Load - Addr == 4,
393
- "The number of StmtVFGNodeKinds has changed, make sure "
394
- "the range is correct");
395
- return n <= Load && n >= Addr;
396
- }
397
-
398
- static inline bool isPHIVFGNodeKinds(GNodeK n)
399
- {
400
- static_assert(TInterPhi - TPhi == 2,
401
- "The number of PHIVFGNodeKinds has changed, make sure "
402
- "the range is correct");
403
- return n <= TInterPhi && n >= TPhi;
404
- }
405
-
406
- static inline bool isMRSVFGNodeKinds(GNodeK n)
407
- {
408
- static_assert(MInterPhi - FPIN == 6,
409
- "The number of MRSVFGNodeKinds has changed, make sure "
410
- "the range is correct");
411
- return n <= MInterPhi && n >= FPIN;
412
- }
413
-
414
- static inline bool isMSSAPHISVFGNodeKinds(GNodeK n)
415
- {
416
- static_assert(MInterPhi - MPhi == 2,
417
- "The number of MSSAPHISVFGNodeKinds has changed, make "
418
- "sure the range is correct");
419
- return n <= MInterPhi && n >= MPhi;
420
- }
421
- //@}
422
- };
423
138
 
424
139
  /*!
425
140
  * Generic node on the graph as base class
@@ -67,11 +67,11 @@ public:
67
67
  /// We start the pass here
68
68
  virtual bool runOnModule(SVFIR* module);
69
69
  /// Compute MHP
70
- virtual MHP* computeMHP(SVFModule* module);
70
+ virtual MHP* computeMHP();
71
71
  /// Compute locksets
72
72
  virtual LockAnalysis* computeLocksets(TCT* tct);
73
73
  /// Perform detection
74
- virtual void detect(SVFModule* module);
74
+ virtual void detect();
75
75
 
76
76
  // Not implemented for now
77
77
  // void dump(Module &module, MHP *mhp, LockAnalysis *lsa);
@@ -186,12 +186,6 @@ public:
186
186
  destroy();
187
187
  }
188
188
 
189
- /// Get SVFFModule
190
- SVFModule* getSVFModule() const
191
- {
192
- return pta->getModule();
193
- }
194
-
195
189
  /// Get TCG
196
190
  inline ThreadCallGraph* getThreadCallGraph() const
197
191
  {
@@ -139,8 +139,6 @@ protected:
139
139
 
140
140
  /// SVFIR
141
141
  static SVFIR* pag;
142
- /// Module
143
- SVFModule* svfMod;
144
142
  /// Pointer analysis Type
145
143
  PTATY ptaTy;
146
144
  /// PTA implementation type.
@@ -206,11 +204,7 @@ public:
206
204
  {
207
205
  return stat;
208
206
  }
209
- /// Module
210
- inline SVFModule* getModule() const
211
- {
212
- return svfMod;
213
- }
207
+
214
208
  /// Get all Valid Pointers for resolution
215
209
  inline OrderedNodeSet& getAllValidPtrs()
216
210
  {
@@ -57,7 +57,7 @@ public:
57
57
  virtual bool runOnModule(SVFIR* pag) override
58
58
  {
59
59
  /// start analysis
60
- analyze(pag->getModule());
60
+ analyze();
61
61
  return false;
62
62
  }
63
63
 
@@ -58,7 +58,7 @@ public:
58
58
  virtual bool runOnModule(SVFIR* pag)
59
59
  {
60
60
  /// start analysis
61
- analyze(pag->getModule());
61
+ analyze();
62
62
  return false;
63
63
  }
64
64
 
@@ -68,7 +68,7 @@ public:
68
68
  virtual bool runOnModule(SVFIR* pag)
69
69
  {
70
70
  /// start analysis
71
- analyze(pag->getModule());
71
+ analyze();
72
72
  return false;
73
73
  }
74
74
 
@@ -30,7 +30,6 @@
30
30
  #ifndef PATHALLOCATOR_H_
31
31
  #define PATHALLOCATOR_H_
32
32
 
33
- #include "SVFIR/SVFModule.h"
34
33
  #include "SVFIR/SVFValue.h"
35
34
  #include "Util/WorkList.h"
36
35
  #include "Graphs/SVFG.h"
@@ -121,7 +120,7 @@ public:
121
120
  Condition newCond(const ICFGNode* inst);
122
121
 
123
122
  /// Perform path allocation
124
- void allocate(const SVFModule* module);
123
+ void allocate();
125
124
 
126
125
  /// Get/Set instruction based on Z3 expression id
127
126
  //{@
@@ -105,10 +105,10 @@ public:
105
105
  }
106
106
 
107
107
  /// Start analysis here
108
- virtual void analyze(SVFModule* module);
108
+ virtual void analyze();
109
109
 
110
110
  /// Initialize analysis
111
- virtual void initialize(SVFModule* module);
111
+ virtual void initialize();
112
112
 
113
113
  /// Finalize analysis
114
114
  virtual void finalize()
@@ -15,7 +15,7 @@
15
15
  #ifndef BREAKCONSTANTGEPS_H
16
16
  #define BREAKCONSTANTGEPS_H
17
17
 
18
- #include "SVFIR/SVFValue.h"
18
+ #include "SVF-LLVM/SVFValue.h"
19
19
 
20
20
  namespace SVF
21
21
  {
@@ -30,7 +30,7 @@
30
30
  #ifndef CPPUtil_H_
31
31
  #define CPPUtil_H_
32
32
 
33
- #include "SVFIR/SVFValue.h"
33
+ #include "SVF-LLVM/SVFValue.h"
34
34
  #include "SVF-LLVM/BasicTypes.h"
35
35
 
36
36
  namespace SVF
@@ -17,7 +17,7 @@
17
17
  #include "Graphs/GenericGraph.h"
18
18
  #include "Graphs/CHG.h"
19
19
  #include "SVF-LLVM/BasicTypes.h"
20
- #include "SVFIR/SVFModule.h"
20
+ #include "SVF-LLVM/SVFModule.h"
21
21
  #include "Util/SVFUtil.h"
22
22
  #include "Util/WorkList.h"
23
23
 
@@ -47,7 +47,7 @@ public:
47
47
  virtual ~LLVMLoopAnalysis() = default;
48
48
 
49
49
  /// Build llvm loops based on LoopInfo analysis
50
- virtual void buildLLVMLoops(SVFModule *mod, ICFG* icfg);
50
+ virtual void buildLLVMLoops(ICFG* icfg);
51
51
 
52
52
  /// Start from here
53
53
  virtual void build(ICFG *icfg);
@@ -31,8 +31,8 @@
31
31
  #define INCLUDE_SVF_FE_LLVMMODULE_H_
32
32
 
33
33
  #include "SVF-LLVM/BasicTypes.h"
34
- #include "SVFIR/SVFValue.h"
35
- #include "SVFIR/SVFModule.h"
34
+ #include "SVF-LLVM/SVFValue.h"
35
+ #include "SVF-LLVM/SVFModule.h"
36
36
  #include "Util/Options.h"
37
37
  #include "Graphs/BasicBlockG.h"
38
38
 
@@ -32,7 +32,7 @@
32
32
 
33
33
  #include "Util/SVFUtil.h"
34
34
  #include "SVF-LLVM/BasicTypes.h"
35
- #include "SVFIR/SVFValue.h"
35
+ #include "SVF-LLVM/SVFValue.h"
36
36
  #include "Util/ThreadAPI.h"
37
37
 
38
38
  namespace SVF
@@ -32,7 +32,7 @@
32
32
 
33
33
  #include "Util/SVFUtil.h"
34
34
  #include "SVF-LLVM/BasicTypes.h"
35
- #include "SVFIR/SVFValue.h"
35
+ #include "SVF-LLVM/SVFValue.h"
36
36
  #include "Util/ThreadAPI.h"
37
37
 
38
38
  namespace SVF
@@ -30,7 +30,7 @@
30
30
  #ifndef INCLUDE_SVFMODULE_H_
31
31
  #define INCLUDE_SVFMODULE_H_
32
32
 
33
- #include "SVFIR/SVFValue.h"
33
+ #include "SVF-LLVM/SVFValue.h"
34
34
  #include "Util/NodeIDAllocator.h"
35
35
  #include "Util/ThreadAPI.h"
36
36
 
@@ -63,8 +63,6 @@ public:
63
63
 
64
64
  private:
65
65
  static SVFModule* svfModule;
66
- static std::string pagReadFromTxt;
67
- std::string moduleIdentifier;
68
66
  FunctionSetType FunctionSet; ///< The Functions in the module
69
67
  GlobalSetType GlobalSet; ///< The Global Variables in the module
70
68
  AliasSetType AliasSet; ///< The Aliases in the module
@@ -80,25 +78,6 @@ public:
80
78
 
81
79
  ~SVFModule();
82
80
 
83
- static inline void setPagFromTXT(const std::string& txt)
84
- {
85
- pagReadFromTxt = txt;
86
- }
87
-
88
- inline void setModuleIdentifier(const std::string& moduleIdentifier)
89
- {
90
- this->moduleIdentifier = moduleIdentifier;
91
- }
92
-
93
- static inline std::string pagFileName()
94
- {
95
- return pagReadFromTxt;
96
- }
97
-
98
- static inline bool pagReadFromTXT()
99
- {
100
- return !pagReadFromTxt.empty();
101
- }
102
81
 
103
82
  const SVFFunction* getSVFFunction(const std::string& name);
104
83
 
@@ -182,20 +161,6 @@ public:
182
161
  }
183
162
  ///@}
184
163
 
185
- const std::string& getModuleIdentifier() const
186
- {
187
- if (pagReadFromTxt.empty())
188
- {
189
- assert(!moduleIdentifier.empty() &&
190
- "No module found! Reading from a file other than LLVM-IR?");
191
- return moduleIdentifier;
192
- }
193
- else
194
- {
195
- return pagReadFromTxt;
196
- }
197
- }
198
-
199
164
  inline const FunctionSetType& getFunctionSet() const
200
165
  {
201
166
  return FunctionSet;