svf-lib 1.0.1289 → 1.0.1291

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 (161) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/CFL/CFLAlias.h +1 -1
  3. package/SVF-linux/include/CFL/CFLBase.h +1 -1
  4. package/SVF-linux/include/CFL/CFLGrammar.h +1 -1
  5. package/SVF-linux/include/DDA/DDAClient.h +2 -2
  6. package/SVF-linux/include/DDA/DDAPass.h +3 -3
  7. package/SVF-linux/include/Graphs/CHG.h +5 -5
  8. package/SVF-linux/include/Graphs/ConsG.h +1 -1
  9. package/SVF-linux/include/Graphs/ConsGEdge.h +1 -1
  10. package/SVF-linux/include/Graphs/GenericGraph.h +1 -1
  11. package/SVF-linux/include/Graphs/ICFG.h +1 -1
  12. package/SVF-linux/include/Graphs/ICFGEdge.h +3 -3
  13. package/SVF-linux/include/Graphs/IRGraph.h +13 -9
  14. package/SVF-linux/include/Graphs/PTACallGraph.h +1 -1
  15. package/SVF-linux/include/Graphs/SVFGOPT.h +2 -2
  16. package/SVF-linux/include/Graphs/ThreadCallGraph.h +2 -2
  17. package/SVF-linux/include/Graphs/VFG.h +1 -1
  18. package/SVF-linux/include/Graphs/VFGNode.h +7 -7
  19. package/SVF-linux/include/MSSA/MemRegion.h +2 -2
  20. package/SVF-linux/include/MTA/LockAnalysis.h +1 -4
  21. package/SVF-linux/include/MTA/MHP.h +22 -31
  22. package/SVF-linux/include/MTA/MTA.h +13 -32
  23. package/SVF-linux/include/MTA/MTAResultValidator.h +17 -16
  24. package/SVF-linux/include/MTA/MTAStat.h +1 -1
  25. package/SVF-linux/include/MTA/TCT.h +25 -18
  26. package/SVF-linux/include/MemoryModel/AbstractPointsToDS.h +1 -1
  27. package/SVF-linux/include/MemoryModel/ConditionalPT.h +3 -2
  28. package/SVF-linux/include/MemoryModel/LocationSet.h +4 -4
  29. package/SVF-linux/include/MemoryModel/MutablePointsToDS.h +1 -1
  30. package/SVF-linux/include/MemoryModel/PersistentPointsToCache.h +1 -1
  31. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +5 -4
  32. package/SVF-linux/include/MemoryModel/PointerAnalysisImpl.h +4 -4
  33. package/SVF-linux/include/MemoryModel/PointsTo.h +1 -1
  34. package/SVF-linux/include/MemoryModel/SVFLoop.h +1 -1
  35. package/SVF-linux/include/SABER/DoubleFreeChecker.h +2 -2
  36. package/SVF-linux/include/SABER/FileChecker.h +2 -2
  37. package/SVF-linux/include/SABER/LeakChecker.h +2 -2
  38. package/SVF-linux/include/SABER/ProgSlice.h +0 -3
  39. package/SVF-linux/include/SABER/SaberCondAllocator.h +7 -9
  40. package/SVF-linux/include/SABER/SaberSVFGBuilder.h +1 -1
  41. package/SVF-linux/include/SVF-LLVM/BasicTypes.h +248 -0
  42. package/SVF-linux/include/SVF-LLVM/BreakConstantExpr.h +94 -0
  43. package/SVF-linux/include/SVF-LLVM/CHGBuilder.h +73 -0
  44. package/SVF-linux/include/SVF-LLVM/CPPUtil.h +130 -0
  45. package/SVF-linux/include/SVF-LLVM/DCHG.h +481 -0
  46. package/SVF-linux/include/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
  47. package/SVF-linux/include/SVF-LLVM/ICFGBuilder.h +106 -0
  48. package/SVF-linux/include/SVF-LLVM/IRAnnotator.h +323 -0
  49. package/SVF-linux/include/SVF-LLVM/LLVMLoopAnalysis.h +59 -0
  50. package/SVF-linux/include/SVF-LLVM/LLVMModule.h +358 -0
  51. package/SVF-linux/include/SVF-LLVM/LLVMUtil.h +405 -0
  52. package/SVF-linux/include/SVF-LLVM/SVFIRBuilder.h +413 -0
  53. package/SVF-linux/include/SVF-LLVM/SymbolTableBuilder.h +113 -0
  54. package/SVF-linux/include/SVFIR/PAGBuilderFromFile.h +80 -0
  55. package/SVF-linux/include/SVFIR/SVFIR.h +661 -0
  56. package/SVF-linux/include/SVFIR/SVFModule.h +233 -0
  57. package/SVF-linux/include/SVFIR/SVFStatements.h +1101 -0
  58. package/SVF-linux/include/SVFIR/SVFType.h +514 -0
  59. package/SVF-linux/include/SVFIR/SVFValue.h +1129 -0
  60. package/SVF-linux/include/SVFIR/SVFVariables.h +721 -0
  61. package/SVF-linux/include/SVFIR/SymbolTableInfo.h +597 -0
  62. package/SVF-linux/include/Util/Annotator.h +1 -1
  63. package/SVF-linux/include/Util/CallGraphBuilder.h +74 -0
  64. package/SVF-linux/include/Util/Casting.h +1 -3
  65. package/SVF-linux/include/Util/CoreBitVector.h +1 -1
  66. package/SVF-linux/include/Util/CxtStmt.h +8 -8
  67. package/SVF-linux/include/Util/DPItem.h +1 -1
  68. package/SVF-linux/include/Util/ExtAPI.h +1 -1
  69. package/SVF-linux/include/Util/NodeIDAllocator.h +1 -1
  70. package/SVF-linux/include/Util/Options.h +1 -0
  71. package/SVF-linux/include/Util/PTAStat.h +1 -1
  72. package/SVF-linux/include/Util/SCC.h +1 -1
  73. package/SVF-linux/include/Util/SVFUtil.h +26 -95
  74. package/SVF-linux/include/Util/ThreadAPI.h +27 -27
  75. package/SVF-linux/include/Util/WorkList.h +1 -1
  76. package/SVF-linux/include/Util/Z3Expr.h +1 -1
  77. package/SVF-linux/include/WPA/Andersen.h +1 -1
  78. package/SVF-linux/include/WPA/CSC.h +1 -1
  79. package/SVF-linux/include/WPA/TypeAnalysis.h +0 -3
  80. package/SVF-linux/include/WPA/WPAPass.h +8 -8
  81. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  82. package/SVF-osx/include/CFL/CFLAlias.h +1 -1
  83. package/SVF-osx/include/CFL/CFLBase.h +1 -1
  84. package/SVF-osx/include/CFL/CFLGrammar.h +1 -1
  85. package/SVF-osx/include/DDA/DDAClient.h +2 -2
  86. package/SVF-osx/include/DDA/DDAPass.h +3 -3
  87. package/SVF-osx/include/Graphs/CHG.h +5 -5
  88. package/SVF-osx/include/Graphs/ConsG.h +1 -1
  89. package/SVF-osx/include/Graphs/ConsGEdge.h +1 -1
  90. package/SVF-osx/include/Graphs/GenericGraph.h +1 -1
  91. package/SVF-osx/include/Graphs/ICFG.h +1 -1
  92. package/SVF-osx/include/Graphs/ICFGEdge.h +3 -3
  93. package/SVF-osx/include/Graphs/IRGraph.h +13 -9
  94. package/SVF-osx/include/Graphs/PTACallGraph.h +1 -1
  95. package/SVF-osx/include/Graphs/SVFGOPT.h +2 -2
  96. package/SVF-osx/include/Graphs/ThreadCallGraph.h +2 -2
  97. package/SVF-osx/include/Graphs/VFG.h +1 -1
  98. package/SVF-osx/include/Graphs/VFGNode.h +7 -7
  99. package/SVF-osx/include/MSSA/MemRegion.h +2 -2
  100. package/SVF-osx/include/MTA/LockAnalysis.h +1 -4
  101. package/SVF-osx/include/MTA/MHP.h +22 -31
  102. package/SVF-osx/include/MTA/MTA.h +13 -32
  103. package/SVF-osx/include/MTA/MTAResultValidator.h +17 -16
  104. package/SVF-osx/include/MTA/MTAStat.h +1 -1
  105. package/SVF-osx/include/MTA/TCT.h +25 -18
  106. package/SVF-osx/include/MemoryModel/AbstractPointsToDS.h +1 -1
  107. package/SVF-osx/include/MemoryModel/ConditionalPT.h +3 -2
  108. package/SVF-osx/include/MemoryModel/LocationSet.h +4 -4
  109. package/SVF-osx/include/MemoryModel/MutablePointsToDS.h +1 -1
  110. package/SVF-osx/include/MemoryModel/PersistentPointsToCache.h +1 -1
  111. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +5 -4
  112. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +4 -4
  113. package/SVF-osx/include/MemoryModel/PointsTo.h +1 -1
  114. package/SVF-osx/include/MemoryModel/SVFLoop.h +1 -1
  115. package/SVF-osx/include/SABER/DoubleFreeChecker.h +2 -2
  116. package/SVF-osx/include/SABER/FileChecker.h +2 -2
  117. package/SVF-osx/include/SABER/LeakChecker.h +2 -2
  118. package/SVF-osx/include/SABER/ProgSlice.h +0 -3
  119. package/SVF-osx/include/SABER/SaberCondAllocator.h +7 -9
  120. package/SVF-osx/include/SABER/SaberSVFGBuilder.h +1 -1
  121. package/SVF-osx/include/SVF-LLVM/BasicTypes.h +248 -0
  122. package/SVF-osx/include/SVF-LLVM/BreakConstantExpr.h +94 -0
  123. package/SVF-osx/include/SVF-LLVM/CHGBuilder.h +73 -0
  124. package/SVF-osx/include/SVF-LLVM/CPPUtil.h +130 -0
  125. package/SVF-osx/include/SVF-LLVM/DCHG.h +481 -0
  126. package/SVF-osx/include/SVF-LLVM/GEPTypeBridgeIterator.h +183 -0
  127. package/SVF-osx/include/SVF-LLVM/ICFGBuilder.h +106 -0
  128. package/SVF-osx/include/SVF-LLVM/IRAnnotator.h +323 -0
  129. package/SVF-osx/include/SVF-LLVM/LLVMLoopAnalysis.h +59 -0
  130. package/SVF-osx/include/SVF-LLVM/LLVMModule.h +358 -0
  131. package/SVF-osx/include/SVF-LLVM/LLVMUtil.h +405 -0
  132. package/SVF-osx/include/SVF-LLVM/SVFIRBuilder.h +413 -0
  133. package/SVF-osx/include/SVF-LLVM/SymbolTableBuilder.h +113 -0
  134. package/SVF-osx/include/SVFIR/PAGBuilderFromFile.h +80 -0
  135. package/SVF-osx/include/SVFIR/SVFIR.h +661 -0
  136. package/SVF-osx/include/SVFIR/SVFModule.h +233 -0
  137. package/SVF-osx/include/SVFIR/SVFStatements.h +1101 -0
  138. package/SVF-osx/include/SVFIR/SVFType.h +514 -0
  139. package/SVF-osx/include/SVFIR/SVFValue.h +1129 -0
  140. package/SVF-osx/include/SVFIR/SVFVariables.h +721 -0
  141. package/SVF-osx/include/SVFIR/SymbolTableInfo.h +597 -0
  142. package/SVF-osx/include/Util/Annotator.h +1 -1
  143. package/SVF-osx/include/Util/CallGraphBuilder.h +74 -0
  144. package/SVF-osx/include/Util/Casting.h +1 -3
  145. package/SVF-osx/include/Util/CoreBitVector.h +1 -1
  146. package/SVF-osx/include/Util/CxtStmt.h +8 -8
  147. package/SVF-osx/include/Util/DPItem.h +1 -1
  148. package/SVF-osx/include/Util/ExtAPI.h +1 -1
  149. package/SVF-osx/include/Util/NodeIDAllocator.h +1 -1
  150. package/SVF-osx/include/Util/Options.h +1 -0
  151. package/SVF-osx/include/Util/PTAStat.h +1 -1
  152. package/SVF-osx/include/Util/SCC.h +1 -1
  153. package/SVF-osx/include/Util/SVFUtil.h +26 -95
  154. package/SVF-osx/include/Util/ThreadAPI.h +27 -27
  155. package/SVF-osx/include/Util/WorkList.h +1 -1
  156. package/SVF-osx/include/Util/Z3Expr.h +1 -1
  157. package/SVF-osx/include/WPA/Andersen.h +1 -1
  158. package/SVF-osx/include/WPA/CSC.h +1 -1
  159. package/SVF-osx/include/WPA/TypeAnalysis.h +0 -3
  160. package/SVF-osx/include/WPA/WPAPass.h +8 -8
  161. package/package.json +1 -1
@@ -9,6 +9,7 @@
9
9
  #define MTARESULTVALIDATOR_H_
10
10
 
11
11
  #include "MTA/MHP.h"
12
+ #include "SVF-LLVM/LLVMUtil.h"
12
13
 
13
14
  /*!
14
15
  * Validate the result of context-sensitive analysis, including context-sensitive
@@ -52,9 +53,9 @@ protected:
52
53
  std::vector<std::string> split(const std::string &s, char delim);
53
54
 
54
55
  // Get special arguments of given call sites
55
- NodeID getIntArg(const SVFInstruction* inst, unsigned int arg_num);
56
- std::vector<std::string> getStringArg(const SVFInstruction* inst, unsigned int arg_num);
57
- CallStrCxt getCxtArg(const SVFInstruction* inst, unsigned int arg_num);
56
+ NodeID getIntArg(const Instruction* inst, unsigned int arg_num);
57
+ std::vector<std::string> getStringArg(const Instruction* inst, unsigned int arg_num);
58
+ CallStrCxt getCxtArg(const Instruction* inst, unsigned int arg_num);
58
59
 
59
60
  /*
60
61
  * Get the previous LoadInst or StoreInst from Instruction "I" in the
@@ -274,7 +275,7 @@ protected:
274
275
  void collectValidationTargets()
275
276
  {
276
277
  // Collect call sites of all RC_ACCESS function calls.
277
- std::vector<CallSite> csInsts;
278
+ std::vector<const CallBase*> csInsts;
278
279
  const Function* F = nullptr;
279
280
  for (Module &M : LLVMModuleSet::getLLVMModuleSet()->getLLVMModules())
280
281
  {
@@ -295,9 +296,9 @@ protected:
295
296
  {
296
297
  const Use *u = &*it;
297
298
  const Value *user = u->getUser();
298
- if(SVFUtil::isCallSite(user))
299
+ if(LLVMUtil::isCallSite(user))
299
300
  {
300
- CallSite csInst = SVFUtil::getLLVMCallSite(user);
301
+ const CallBase* csInst = LLVMUtil::getLLVMCallSite(user);
301
302
  csInsts.push_back(csInst);
302
303
  }
303
304
  }
@@ -309,12 +310,12 @@ protected:
309
310
  // Generate access pairs.
310
311
  for (int i = 0, e = csInsts.size(); i != e;)
311
312
  {
312
- CallSite CI1 = csInsts[i++];
313
- CallSite CI2 = csInsts[i++];
314
- const ConstantInt* C = SVFUtil::dyn_cast<ConstantInt>(CI1.getArgOperand(1));
313
+ const CallBase* CI1 = csInsts[i++];
314
+ const CallBase* CI2 = csInsts[i++];
315
+ const ConstantInt* C = SVFUtil::dyn_cast<ConstantInt>(CI1->getArgOperand(1));
315
316
  assert(C);
316
- const Instruction* I1 = getPreviousMemoryAccessInst(CI1.getInstruction()->getLLVMInstruction());
317
- const Instruction* I2 = getPreviousMemoryAccessInst(CI2.getInstruction()->getLLVMInstruction());
317
+ const Instruction* I1 = getPreviousMemoryAccessInst(CI1);
318
+ const Instruction* I2 = getPreviousMemoryAccessInst(CI2);
318
319
  assert(I1 && I2 && "RC_ACCESS should be placed immediately after the target memory access.");
319
320
  RC_FLAG flags = C->getZExtValue();
320
321
  accessPairs.push_back(AccessPair(I1, I2, flags));
@@ -339,8 +340,8 @@ protected:
339
340
  bool racy = mayHaveDataRace(I1, I2);
340
341
 
341
342
  SVFUtil::outs() << "For the memory access pair at ("
342
- << SVFUtil::getSourceLoc(I1) << ", "
343
- << SVFUtil::getSourceLoc(I2) << ")\n";
343
+ << LLVMModuleSet::getLLVMModuleSet()->getSVFValue(I1)->getSourceLoc() << ", "
344
+ << LLVMModuleSet::getLLVMModuleSet()->getSVFValue(I2)->getSourceLoc() << ")\n";
344
345
  if (selectedValidationScenarios & RC_ALIASES)
345
346
  {
346
347
  SVFUtil::outs() << "\t"
@@ -395,10 +396,10 @@ private:
395
396
  * Comparison function to sort the validation targets in ascending order of
396
397
  * the validation id (i.e., the 1st argument of RC_ACCESS function call).
397
398
  */
398
- static bool compare(CallSite CI1, CallSite CI2)
399
+ static bool compare(const CallBase* CI1, const CallBase* CI2)
399
400
  {
400
- const Value *V1 = CI1.getArgOperand(0);
401
- const Value *V2 = CI2.getArgOperand(0);
401
+ const Value *V1 = CI1->getArgOperand(0);
402
+ const Value *V2 = CI2->getArgOperand(0);
402
403
  const ConstantInt* C1 = SVFUtil::dyn_cast<ConstantInt>(V1);
403
404
  const ConstantInt* C2 = SVFUtil::dyn_cast<ConstantInt>(V2);
404
405
  assert(0 != C1 && 0 != C2);
@@ -60,7 +60,7 @@ public:
60
60
  /// Statistics for MHP statement pairs
61
61
  void performMHPPairStat(MHP* mhp, LockAnalysis* lsa);
62
62
  /// Statistics for annotation
63
- void performAnnotationStat(MTAAnnotator* anno);
63
+ //void performAnnotationStat(MTAAnnotator* anno);
64
64
 
65
65
  double TCTTime;
66
66
  double MHPTime;
@@ -34,7 +34,6 @@
34
34
  #include "Util/SVFUtil.h"
35
35
  #include "Graphs/ThreadCallGraph.h"
36
36
  #include "Util/CxtStmt.h"
37
- #include "SVF-FE/DataFlowUtil.h"
38
37
  #include <set>
39
38
  #include <vector>
40
39
 
@@ -137,6 +136,7 @@ class TCT: public GenericThreadCreateTreeTy
137
136
  {
138
137
 
139
138
  public:
139
+ typedef SVFLoopAndDomInfo::LoopBBs LoopBBs;
140
140
  typedef TCTEdge::ThreadCreateEdgeSet ThreadCreateEdgeSet;
141
141
  typedef ThreadCreateEdgeSet::iterator TCTNodeIter;
142
142
  typedef Set<const SVFFunction*> FunSet;
@@ -146,7 +146,7 @@ public:
146
146
  typedef Map<CxtThread,TCTNode*> CxtThreadToNodeMap;
147
147
  typedef Map<CxtThread,CallStrCxt> CxtThreadToForkCxt;
148
148
  typedef Map<CxtThread,const SVFFunction*> CxtThreadToFun;
149
- typedef Map<const SVFInstruction*, const Loop*> InstToLoopMap;
149
+ typedef Map<const SVFInstruction*, LoopBBs> InstToLoopMap;
150
150
  typedef FIFOWorkList<CxtThreadProc> CxtThreadProcVec;
151
151
  typedef Set<CxtThreadProc> CxtThreadProcSet;
152
152
  typedef SCCDetection<PTACallGraph*> ThreadCallGraphSCC;
@@ -355,29 +355,37 @@ public:
355
355
  }
356
356
 
357
357
  /// Get loop for join site
358
- inline const Loop* getJoinLoop(const SVFInstruction* join)
358
+ inline LoopBBs& getJoinLoop(const SVFInstruction* join)
359
+ {
360
+ assert(tcg->getThreadAPI()->isTDJoin(join) && "not a join site");
361
+ InstToLoopMap::iterator it = joinSiteToLoopMap.find(join);
362
+ assert(it!=joinSiteToLoopMap.end() && "loop not found");
363
+ return it->second;
364
+ }
365
+
366
+ inline bool hasJoinLoop(const SVFInstruction* join) const
359
367
  {
360
368
  assert(tcg->getThreadAPI()->isTDJoin(join) && "not a join site");
361
369
  InstToLoopMap::const_iterator it = joinSiteToLoopMap.find(join);
362
- if(it!=joinSiteToLoopMap.end())
363
- return it->second;
364
- return nullptr;
370
+ return it!=joinSiteToLoopMap.end();
371
+ }
372
+
373
+ bool hasLoop(const SVFBasicBlock* bb) const
374
+ {
375
+ const SVFFunction* fun = bb->getParent();
376
+ return fun->hasLoopInfo(bb);
377
+ }
378
+ bool hasLoop(const SVFInstruction* inst) const
379
+ {
380
+ return hasLoop(inst->getParent());
365
381
  }
366
382
  /// Return true if a join instruction must be executed inside a loop
367
- bool isJoinMustExecutedInLoop(const Loop* lp,const SVFInstruction* join);
383
+ bool isJoinMustExecutedInLoop(const LoopBBs& lp,const SVFInstruction* join);
368
384
  /// Get loop for an instruction
369
- const Loop* getLoop(const SVFInstruction* inst);
370
- /// Get dominator for a function
371
- const DominatorTree* getDT(const Function* fun);
372
- /// Get dominator for a function
373
- const PostDominatorTree* getPostDT(const Function* fun);
385
+ const LoopBBs& getLoop(const SVFInstruction* inst);
374
386
  /// Get loop for fork/join site
375
- const Loop* getLoop(const SVFBasicBlock* bb);
376
- /// Get SE for function
377
- ScalarEvolution* getSE(const SVFInstruction* inst);
387
+ const LoopBBs& getLoop(const SVFBasicBlock* bb);
378
388
 
379
- /// Get the next instructions following control flow
380
- void getNextInsts(const SVFInstruction* inst, InstVec& instSet);
381
389
  /// Push calling context
382
390
  void pushCxt(CallStrCxt& cxt, const SVFInstruction* call, const SVFFunction* callee);
383
391
  /// Match context
@@ -558,7 +566,6 @@ private:
558
566
  CxtThreadToNodeMap ctpToNodeMap; /// Map a ctp to its graph node
559
567
  CxtThreadToForkCxt ctToForkCxtMap; /// Map a CxtThread to the context at its spawning site (fork site).
560
568
  CxtThreadToFun ctToRoutineFunMap; /// Map a CxtThread to its start routine function.
561
- PTACFInfoBuilder loopInfoBuilder; ///< LoopInfo
562
569
  InstToLoopMap joinSiteToLoopMap; ///< map an inloop join to its loop class
563
570
  InstSet inRecurJoinSites; ///< Fork or Join sites in recursions
564
571
  };
@@ -53,7 +53,7 @@
53
53
  #ifndef ABSTRACT_POINTSTO_H_
54
54
  #define ABSTRACT_POINTSTO_H_
55
55
 
56
- #include "Util/SVFBasicTypes.h"
56
+ #include "SVFIR/SVFType.h"
57
57
 
58
58
  namespace SVF
59
59
  {
@@ -32,6 +32,7 @@
32
32
 
33
33
  #include "Util/SVFUtil.h"
34
34
  #include "MemoryModel/PointsTo.h"
35
+ #include <sstream>
35
36
 
36
37
  namespace SVF
37
38
  {
@@ -108,7 +109,7 @@ public:
108
109
  inline std::string toString() const
109
110
  {
110
111
  std::string str;
111
- raw_string_ostream rawstr(str);
112
+ std::stringstream rawstr(str);
112
113
  rawstr << "<" << m_id << " " << m_cond.toString() << "> ";
113
114
  return rawstr.str();
114
115
  }
@@ -273,7 +274,7 @@ public:
273
274
  inline std::string toString() const
274
275
  {
275
276
  std::string str;
276
- raw_string_ostream rawstr(str);
277
+ std::stringstream rawstr(str);
277
278
  rawstr << "{ ";
278
279
  for (const_iterator i = elements.begin(); i != elements.end(); ++i)
279
280
  {
@@ -34,7 +34,7 @@
34
34
  #define LOCATIONSET_H_
35
35
 
36
36
 
37
- #include "Util/BasicTypes.h"
37
+ #include "SVFIR/SVFValue.h"
38
38
 
39
39
  namespace SVF
40
40
  {
@@ -54,7 +54,7 @@ public:
54
54
  NonOverlap, Overlap, Subset, Superset, Same
55
55
  };
56
56
 
57
- typedef std::vector<std::pair<const Value*, const Type*> > OffsetValueVec;
57
+ typedef std::vector<std::pair<const SVFValue*, const SVFType*> > OffsetValueVec;
58
58
 
59
59
  /// Constructor
60
60
  LocationSet(s32_t o = 0) : fldIdx(o)
@@ -105,9 +105,9 @@ public:
105
105
  s32_t accumulateConstantOffset() const;
106
106
 
107
107
  /// Return element number of a type.
108
- u32_t getElementNum(const Type* type) const;
108
+ u32_t getElementNum(const SVFType* type) const;
109
109
 
110
- bool addOffsetValue(const Value* offsetValue, const Type* type);
110
+ bool addOffsetValue(const SVFValue* offsetValue, const SVFType* type);
111
111
 
112
112
  /// Return TRUE if this is a constant location set.
113
113
  bool isConstantOffset() const;
@@ -39,7 +39,7 @@
39
39
  #include<fstream>
40
40
 
41
41
  #include "MemoryModel/AbstractPointsToDS.h"
42
- #include "Util/SVFBasicTypes.h"
42
+ #include "SVFIR/SVFType.h"
43
43
  #include "Util/SVFUtil.h"
44
44
 
45
45
  namespace SVF
@@ -18,7 +18,7 @@
18
18
  #include <iostream>
19
19
  #include <vector>
20
20
 
21
- #include "Util/SVFBasicTypes.h"
21
+ #include "SVFIR/SVFType.h"
22
22
 
23
23
  namespace SVF
24
24
  {
@@ -33,12 +33,13 @@
33
33
  #include <unistd.h>
34
34
  #include <signal.h>
35
35
 
36
- #include "MemoryModel/SVFIR.h"
36
+ #include "SVFIR/SVFIR.h"
37
37
  #include "MemoryModel/ConditionalPT.h"
38
38
  #include "MemoryModel/AbstractPointsToDS.h"
39
39
  #include "MemoryModel/MutablePointsToDS.h"
40
40
  #include "MemoryModel/PersistentPointsToDS.h"
41
41
  #include "Graphs/PTACallGraph.h"
42
+ #include "Graphs/CHG.h"
42
43
  #include "Util/SCC.h"
43
44
  #include "MemoryModel/PointsTo.h"
44
45
 
@@ -104,7 +105,7 @@ public:
104
105
  typedef Set<const SVFFunction*> FunctionSet;
105
106
  typedef OrderedMap<const CallICFGNode*, FunctionSet> CallEdgeMap;
106
107
  typedef SCCDetection<PTACallGraph*> CallGraphSCC;
107
- typedef Set<const GlobalValue*> VTableSet;
108
+ typedef Set<const SVFGlobalValue*> VTableSet;
108
109
  typedef Set<const SVFFunction*> VFunSet;
109
110
  //@}
110
111
 
@@ -235,8 +236,8 @@ public:
235
236
  virtual void computeDDAPts(NodeID) {}
236
237
 
237
238
  /// Interface exposed to users of our pointer analysis, given Value infos
238
- virtual AliasResult alias(const Value* V1,
239
- const Value* V2) = 0;
239
+ virtual AliasResult alias(const SVFValue* V1,
240
+ const SVFValue* V2) = 0;
240
241
 
241
242
  /// Interface exposed to users of our pointer analysis, given PAGNodeID
242
243
  virtual AliasResult alias(NodeID node1, NodeID node2) = 0;
@@ -218,8 +218,8 @@ private:
218
218
 
219
219
  public:
220
220
  /// Interface expose to users of our pointer analysis, given Value infos
221
- virtual AliasResult alias(const Value* V1,
222
- const Value* V2);
221
+ virtual AliasResult alias(const SVFValue* V1,
222
+ const SVFValue* V2);
223
223
 
224
224
  /// Interface expose to users of our pointer analysis, given PAGNodeID
225
225
  virtual AliasResult alias(NodeID node1, NodeID node2);
@@ -504,7 +504,7 @@ public:
504
504
  }
505
505
 
506
506
  /// Interface expose to users of our pointer analysis, given Value infos
507
- virtual inline AliasResult alias(const Value* V1, const Value* V2)
507
+ virtual inline AliasResult alias(const SVFValue* V1, const SVFValue* V2)
508
508
  {
509
509
  return alias(pag->getValueNode(V1),pag->getValueNode(V2));
510
510
  }
@@ -573,7 +573,7 @@ public:
573
573
  }
574
574
  else if (!SVFUtil::isa<DummyValVar>(node))
575
575
  {
576
- SVFUtil::outs() << "##<" << node->getValue()->getName().str() << "> ";
576
+ SVFUtil::outs() << "##<" << node->getValue()->getName() << "> ";
577
577
  //SVFUtil::outs() << "Source Loc: " << SVFUtil::getSourceLoc(node->getValue());
578
578
  }
579
579
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  #include <vector>
16
16
 
17
- #include "Util/SVFBasicTypes.h"
17
+ #include "SVFIR/SVFType.h"
18
18
  #include "Util/BitVector.h"
19
19
  #include "Util/CoreBitVector.h"
20
20
  #include "Util/SparseBitVector.h"
@@ -30,7 +30,7 @@
30
30
  #ifndef SVF_SVFLOOP_H
31
31
  #define SVF_SVFLOOP_H
32
32
 
33
- #include "Util/SVFBasicTypes.h"
33
+ #include "SVFIR/SVFType.h"
34
34
 
35
35
  namespace SVF
36
36
  {
@@ -54,10 +54,10 @@ public:
54
54
  }
55
55
 
56
56
  /// We start from here
57
- virtual bool runOnModule(SVFModule* module) override
57
+ virtual bool runOnModule(SVFIR* pag) override
58
58
  {
59
59
  /// start analysis
60
- analyze(module);
60
+ analyze(pag->getModule());
61
61
  return false;
62
62
  }
63
63
 
@@ -55,10 +55,10 @@ public:
55
55
  }
56
56
 
57
57
  /// We start from here
58
- virtual bool runOnModule(SVFModule* module)
58
+ virtual bool runOnModule(SVFIR* pag)
59
59
  {
60
60
  /// start analysis
61
- analyze(module);
61
+ analyze(pag->getModule());
62
62
  return false;
63
63
  }
64
64
 
@@ -65,10 +65,10 @@ public:
65
65
  }
66
66
 
67
67
  /// We start from here
68
- virtual bool runOnModule(SVFModule* module)
68
+ virtual bool runOnModule(SVFIR* pag)
69
69
  {
70
70
  /// start analysis
71
- analyze(module);
71
+ analyze(pag->getModule());
72
72
  return false;
73
73
  }
74
74
 
@@ -203,9 +203,6 @@ public:
203
203
  std::string evalFinalCond() const;
204
204
  //@}
205
205
 
206
- /// Annotate program according to final condition
207
- void annotatePaths();
208
-
209
206
  protected:
210
207
  inline const SVFG* getSVFG() const
211
208
  {
@@ -30,9 +30,8 @@
30
30
  #ifndef PATHALLOCATOR_H_
31
31
  #define PATHALLOCATOR_H_
32
32
 
33
- #include "Util/SVFModule.h"
34
- #include "SVF-FE/DataFlowUtil.h"
35
- #include "SVF-FE/BasicTypes.h"
33
+ #include "SVFIR/SVFModule.h"
34
+ #include "SVFIR/SVFValue.h"
36
35
  #include "Util/WorkList.h"
37
36
  #include "Graphs/SVFG.h"
38
37
  #include "Util/Z3Expr.h"
@@ -272,15 +271,15 @@ private:
272
271
  /// Evaluate test null/not null like expressions
273
272
  //@{
274
273
  /// Return true if the predicate of this compare instruction is equal
275
- bool isEQCmp(const CmpInst* cmp) const;
274
+ bool isEQCmp(const CmpStmt* cmp) const;
276
275
  /// Return true if the predicate of this compare instruction is not equal
277
- bool isNECmp(const CmpInst* cmp) const;
276
+ bool isNECmp(const CmpStmt* cmp) const;
278
277
  /// Return true if this is a test null expression
279
- bool isTestNullExpr(const Value* test) const;
278
+ bool isTestNullExpr(const SVFValue* test) const;
280
279
  /// Return true if this is a test not null expression
281
- bool isTestNotNullExpr(const Value* test) const;
280
+ bool isTestNotNullExpr(const SVFValue* test) const;
282
281
  /// Return true if two values on the predicate are what we want
283
- bool isTestContainsNullAndTheValue(const CmpInst* cmp) const;
282
+ bool isTestContainsNullAndTheValue(const CmpStmt* cmp) const;
284
283
  //@}
285
284
 
286
285
  /// Release memory
@@ -293,7 +292,6 @@ private:
293
292
  void extractSubConds(const Condition &condition, NodeBS &support) const;
294
293
 
295
294
 
296
- PTACFInfoBuilder cfInfoBuilder; ///< map a function to its loop info
297
295
  FunToExitBBsMap funToExitBBsMap; ///< map a function to all its basic blocks calling program exit
298
296
  BBToCondMap bbToCondMap; ///< map a basic block to its path condition starting from root
299
297
  const SVFGNode* curEvalSVFGNode{}; ///< current llvm value to evaluate branch condition when computing guards
@@ -31,7 +31,7 @@
31
31
  #define SABERSVFGBUILDER_H_
32
32
 
33
33
  #include "MSSA/SVFGBuilder.h"
34
- #include "Util/BasicTypes.h"
34
+ #include "SVFIR/SVFValue.h"
35
35
  #include "Util/WorkList.h"
36
36
 
37
37
  namespace SVF