svf-lib 1.0.1815 → 1.0.1817

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 (111) hide show
  1. package/SVF-linux/Release-build/svf/libSvfCore.a +0 -0
  2. package/SVF-linux/svf/include/DDA/DDAStat.h +0 -17
  3. package/SVF-linux/svf/include/Graphs/ConsG.h +2 -0
  4. package/SVF-linux/svf/include/Util/PTAStat.h +19 -1
  5. package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
  6. package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  7. package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +2 -0
  8. package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +8 -0
  9. package/SVF-osx/svf/include/AbstractExecution/ExeState.h +8 -0
  10. package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +7 -0
  11. package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +3 -0
  12. package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +2 -0
  13. package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +1 -0
  14. package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +1 -0
  15. package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +1 -0
  16. package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +4 -0
  17. package/SVF-osx/svf/include/AbstractExecution/SingleAbsValue.h +2 -0
  18. package/SVF-osx/svf/include/AbstractExecution/SymState.h +4 -0
  19. package/SVF-osx/svf/include/AbstractExecution/WTO.h +5 -0
  20. package/SVF-osx/svf/include/CFL/CFGrammar.h +4 -0
  21. package/SVF-osx/svf/include/CFL/CFLAlias.h +1 -0
  22. package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +1 -0
  23. package/SVF-osx/svf/include/CFL/CFLStat.h +1 -0
  24. package/SVF-osx/svf/include/CFL/CFLVF.h +1 -0
  25. package/SVF-osx/svf/include/DDA/ContextDDA.h +1 -0
  26. package/SVF-osx/svf/include/DDA/DDAClient.h +5 -0
  27. package/SVF-osx/svf/include/DDA/DDAPass.h +1 -0
  28. package/SVF-osx/svf/include/DDA/DDAStat.h +0 -17
  29. package/SVF-osx/svf/include/FastCluster/fastcluster.h +1 -0
  30. package/SVF-osx/svf/include/Graphs/CDG.h +3 -0
  31. package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +3 -0
  32. package/SVF-osx/svf/include/Graphs/CFLGraph.h +1 -0
  33. package/SVF-osx/svf/include/Graphs/CHG.h +4 -2
  34. package/SVF-osx/svf/include/Graphs/ConsG.h +2 -0
  35. package/SVF-osx/svf/include/Graphs/ConsGEdge.h +5 -0
  36. package/SVF-osx/svf/include/Graphs/ConsGNode.h +1 -0
  37. package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +1 -0
  38. package/SVF-osx/svf/include/Graphs/GenericGraph.h +1 -0
  39. package/SVF-osx/svf/include/Graphs/GraphPrinter.h +3 -0
  40. package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
  41. package/SVF-osx/svf/include/Graphs/ICFG.h +1 -0
  42. package/SVF-osx/svf/include/Graphs/ICFGNode.h +3 -0
  43. package/SVF-osx/svf/include/Graphs/ICFGStat.h +2 -0
  44. package/SVF-osx/svf/include/Graphs/IRGraph.h +1 -0
  45. package/SVF-osx/svf/include/Graphs/PTACallGraph.h +3 -0
  46. package/SVF-osx/svf/include/Graphs/SVFG.h +2 -0
  47. package/SVF-osx/svf/include/Graphs/SVFGEdge.h +1 -0
  48. package/SVF-osx/svf/include/Graphs/SVFGNode.h +7 -0
  49. package/SVF-osx/svf/include/Graphs/SVFGOPT.h +3 -0
  50. package/SVF-osx/svf/include/Graphs/SVFGStat.h +2 -0
  51. package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +3 -0
  52. package/SVF-osx/svf/include/Graphs/VFG.h +2 -0
  53. package/SVF-osx/svf/include/Graphs/VFGEdge.h +3 -0
  54. package/SVF-osx/svf/include/Graphs/VFGNode.h +8 -0
  55. package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +4 -0
  56. package/SVF-osx/svf/include/MSSA/MemPartition.h +1 -0
  57. package/SVF-osx/svf/include/MSSA/MemRegion.h +1 -0
  58. package/SVF-osx/svf/include/MSSA/MemSSA.h +1 -0
  59. package/SVF-osx/svf/include/MTA/FSMPTA.h +6 -0
  60. package/SVF-osx/svf/include/MTA/LockAnalysis.h +5 -0
  61. package/SVF-osx/svf/include/MTA/MHP.h +3 -0
  62. package/SVF-osx/svf/include/MTA/MTA.h +1 -0
  63. package/SVF-osx/svf/include/MTA/MTAResultValidator.h +2 -0
  64. package/SVF-osx/svf/include/MTA/TCT.h +1 -0
  65. package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +2 -0
  66. package/SVF-osx/svf/include/MemoryModel/AccessPath.h +5 -0
  67. package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +5 -0
  68. package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +1 -0
  69. package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +1 -0
  70. package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +1 -0
  71. package/SVF-osx/svf/include/MemoryModel/PointsTo.h +1 -0
  72. package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +1 -0
  73. package/SVF-osx/svf/include/SABER/ProgSlice.h +1 -0
  74. package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +4 -0
  75. package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +1 -0
  76. package/SVF-osx/svf/include/SVFIR/SVFIR.h +2 -0
  77. package/SVF-osx/svf/include/SVFIR/SVFStatements.h +2 -0
  78. package/SVF-osx/svf/include/SVFIR/SVFType.h +2 -0
  79. package/SVF-osx/svf/include/SVFIR/SVFValue.h +3 -0
  80. package/SVF-osx/svf/include/SVFIR/SVFVariables.h +5 -0
  81. package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +5 -0
  82. package/SVF-osx/svf/include/Util/CDGBuilder.h +8 -0
  83. package/SVF-osx/svf/include/Util/CallGraphBuilder.h +2 -0
  84. package/SVF-osx/svf/include/Util/Casting.h +2 -1
  85. package/SVF-osx/svf/include/Util/CommandLine.h +1 -0
  86. package/SVF-osx/svf/include/Util/CxtStmt.h +4 -0
  87. package/SVF-osx/svf/include/Util/DPItem.h +2 -0
  88. package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
  89. package/SVF-osx/svf/include/Util/PTAStat.h +19 -1
  90. package/SVF-osx/svf/include/Util/SCC.h +2 -0
  91. package/SVF-osx/svf/include/Util/SVFBugReport.h +1 -0
  92. package/SVF-osx/svf/include/Util/SVFStat.h +1 -0
  93. package/SVF-osx/svf/include/Util/SVFUtil.h +1 -0
  94. package/SVF-osx/svf/include/Util/ThreadAPI.h +1 -0
  95. package/SVF-osx/svf/include/Util/WorkList.h +1 -0
  96. package/SVF-osx/svf/include/Util/Z3Expr.h +4 -0
  97. package/SVF-osx/svf/include/Util/iterator.h +2 -2
  98. package/SVF-osx/svf/include/WPA/Andersen.h +6 -0
  99. package/SVF-osx/svf/include/WPA/AndersenPWC.h +3 -0
  100. package/SVF-osx/svf/include/WPA/WPAFSSolver.h +5 -0
  101. package/SVF-osx/svf/include/WPA/WPAPass.h +2 -0
  102. package/SVF-osx/svf/include/WPA/WPASolver.h +2 -0
  103. package/SVF-osx/svf/include/WPA/WPAStat.h +1 -0
  104. package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +1 -0
  105. package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +1 -0
  106. package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +3 -0
  107. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +1 -0
  108. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +1 -0
  109. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -0
  110. package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +1 -0
  111. package/package.json +1 -1
@@ -791,6 +791,7 @@ private:
791
791
  }
792
792
  ///@}
793
793
 
794
+
794
795
  private:
795
796
  UpdatedVarMap outUpdatedVarMap;
796
797
  UpdatedVarMap inUpdatedVarMap;
@@ -86,6 +86,7 @@ public:
86
86
  PathS_DDA, ///< Guarded value-flow DDA
87
87
  Cxt_DDA, ///< context sensitive DDA
88
88
 
89
+
89
90
  Default_PTA ///< default pta without any analysis
90
91
  };
91
92
 
@@ -157,6 +157,7 @@ protected:
157
157
  return ptD.get();
158
158
  }
159
159
 
160
+
160
161
  /// Finalization of pointer analysis, and normalize points-to information to Bit Vector representation
161
162
  void finalize() override;
162
163
 
@@ -251,4 +251,5 @@ struct std::hash<SVF::PointsTo>
251
251
  }
252
252
  };
253
253
 
254
+
254
255
  #endif // POINTSTO_H_
@@ -64,6 +64,7 @@ public:
64
64
  /// Report file/close bugs
65
65
  void reportBug(ProgSlice* slice) override;
66
66
 
67
+
67
68
  /// Validate test cases for regression test purpose
68
69
  void testsValidation(ProgSlice* slice);
69
70
  void validateSuccessTests(ProgSlice* slice, const SVFFunction* fun);
@@ -60,6 +60,7 @@ public:
60
60
 
61
61
  typedef SaberCondAllocator::SVFGNodeToSVFGNodeSetMap SVFGNodeToSVFGNodeSetMap;
62
62
 
63
+
63
64
  /// Constructor
64
65
  ProgSlice(const SVFGNode* src, SaberCondAllocator* pa, const SVFG* graph):
65
66
  root(src), partialReachable(false), fullReachable(false), reachGlob(false),
@@ -36,6 +36,7 @@
36
36
  #include "Graphs/SVFG.h"
37
37
  #include "Util/Z3Expr.h"
38
38
 
39
+
39
40
  namespace SVF
40
41
  {
41
42
 
@@ -57,6 +58,7 @@ public:
57
58
  typedef FIFOWorkList<const SVFBasicBlock*> CFWorkList; ///< worklist for control-flow guard computation
58
59
  typedef Map<const SVFGNode*, Set<const SVFGNode*>> SVFGNodeToSVFGNodeSetMap;
59
60
 
61
+
60
62
  /// Constructor
61
63
  SaberCondAllocator();
62
64
 
@@ -231,6 +233,7 @@ public:
231
233
  }
232
234
  //@}
233
235
 
236
+
234
237
  /// mark neg Z3 expression
235
238
  inline void setNegCondInst(const Condition &condition, const SVFInstruction* inst)
236
239
  {
@@ -295,6 +298,7 @@ private:
295
298
  /// extract subexpression from a Z3 expression
296
299
  void extractSubConds(const Condition &condition, NodeBS &support) const;
297
300
 
301
+
298
302
  FunToExitBBsMap funToExitBBsMap; ///< map a function to all its basic blocks calling program exit
299
303
  BBToCondMap bbToCondMap; ///< map a basic block to its path condition starting from root
300
304
  const SVFGNode* curEvalSVFGNode{}; ///< current llvm value to evaluate branch condition when computing guards
@@ -34,6 +34,7 @@
34
34
  #include "SVFIR/SVFValue.h"
35
35
  #include "Util/WorkList.h"
36
36
 
37
+
37
38
  namespace SVF
38
39
  {
39
40
 
@@ -687,4 +687,6 @@ typedef SVFIR PAG;
687
687
 
688
688
  } // End namespace SVF
689
689
 
690
+
691
+
690
692
  #endif /* INCLUDE_SVFIR_H_ */
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * SVFStatements.h
25
26
  *
@@ -550,6 +551,7 @@ public:
550
551
 
551
552
  };
552
553
 
554
+
553
555
  /*!
554
556
  * Call
555
557
  */
@@ -300,6 +300,7 @@ public:
300
300
  return getPointerToTy;
301
301
  }
302
302
 
303
+
303
304
  inline void setTypeInfo(StInfo* ti)
304
305
  {
305
306
  typeinfo = ti;
@@ -502,6 +503,7 @@ public:
502
503
  numOfElement = elemNum;
503
504
  }
504
505
 
506
+
505
507
  };
506
508
 
507
509
  class SVFOtherType : public SVFType
@@ -40,6 +40,7 @@ namespace SVF
40
40
  /// LLVM Aliases and constants
41
41
  typedef SVF::GraphPrinter GraphPrinter;
42
42
 
43
+
43
44
  class SVFInstruction;
44
45
  class SVFBasicBlock;
45
46
  class SVFArgument;
@@ -134,6 +135,7 @@ public:
134
135
  return bb2PIdom;
135
136
  }
136
137
 
138
+
137
139
  inline Map<const SVFBasicBlock*,BBSet>& getDomTreeMap()
138
140
  {
139
141
  return dtBBsMap;
@@ -1102,6 +1104,7 @@ public:
1102
1104
  }
1103
1105
  };
1104
1106
 
1107
+
1105
1108
  class CallSite
1106
1109
  {
1107
1110
  friend class SVFIRReader;
@@ -73,6 +73,7 @@ public:
73
73
  DummyObjNode,
74
74
  };
75
75
 
76
+
76
77
  protected:
77
78
  const SVFValue* value; ///< value of this SVFIR node
78
79
  SVFStmt::KindToSVFStmtMapTy InEdgeKindToSetMap;
@@ -253,6 +254,8 @@ public:
253
254
  //@}
254
255
  };
255
256
 
257
+
258
+
256
259
  /*
257
260
  * Value (Pointer) variable
258
261
  */
@@ -368,6 +371,7 @@ public:
368
371
  virtual const std::string toString() const;
369
372
  };
370
373
 
374
+
371
375
  /*
372
376
  * Gep Value (Pointer) variable, this variable can be dynamic generated for field sensitive analysis
373
377
  * e.g. memcpy, temp gep value variable needs to be created
@@ -436,6 +440,7 @@ public:
436
440
  virtual const std::string toString() const;
437
441
  };
438
442
 
443
+
439
444
  /*
440
445
  * Gep Obj variable, this is dynamic generated for field sensitive analysis
441
446
  * Each gep obj variable is one field of a MemObj (base)
@@ -30,6 +30,7 @@
30
30
  #ifndef INCLUDE_SVFIR_SYMBOLTABLEINFO_H_
31
31
  #define INCLUDE_SVFIR_SYMBOLTABLEINFO_H_
32
32
 
33
+
33
34
  #include "Util/SVFUtil.h"
34
35
  #include "MemoryModel/AccessPath.h"
35
36
  #include "SVFIR/SVFModule.h"
@@ -241,6 +242,7 @@ public:
241
242
  }
242
243
  //@}
243
244
 
245
+
244
246
  /// Statistics
245
247
  //@{
246
248
  inline u32_t getTotalSymNum() const
@@ -371,6 +373,7 @@ protected:
371
373
  Set<const StInfo*> stInfos;
372
374
  };
373
375
 
376
+
374
377
  /*!
375
378
  * Memory object symbols or MemObj (address-taken variables in LLVM-based languages)
376
379
  */
@@ -441,6 +444,7 @@ public:
441
444
  /// Check if byte size is a const value
442
445
  bool isConstantByteSize() const;
443
446
 
447
+
444
448
  /// object attributes methods
445
449
  //@{
446
450
  bool isFunction() const;
@@ -643,6 +647,7 @@ public:
643
647
  //@}
644
648
  };
645
649
 
650
+
646
651
  } // End namespace SVF
647
652
 
648
653
  #endif /* INCLUDE_SVFIR_SYMBOLTABLEINFO_H_ */
@@ -60,8 +60,11 @@ public:
60
60
  /// build map at icfg node level
61
61
  void buildICFGNodeControlMap();
62
62
 
63
+
64
+
63
65
  private:
64
66
 
67
+
65
68
  /// extract basic block edges to be processed
66
69
  static void
67
70
  extractBBS(const SVFFunction *func,
@@ -72,14 +75,17 @@ private:
72
75
  extractNodesBetweenPdomNodes(const SVFBasicBlock *succ, const SVFBasicBlock *LCA,
73
76
  std::vector<const SVFBasicBlock *> &tgtNodes);
74
77
 
78
+
75
79
  void dfsNodesBetweenPdomNodes(const SVFBasicBlock *cur,
76
80
  const SVFBasicBlock *tgt,
77
81
  std::vector<const SVFBasicBlock *> &path,
78
82
  std::vector<const SVFBasicBlock *> &tgtNodes,
79
83
  SVFLoopAndDomInfo *ld);
80
84
 
85
+
81
86
  s64_t getBBSuccessorBranchID(const SVFBasicBlock *BB, const SVFBasicBlock *Succ);
82
87
 
88
+
83
89
  /// update map
84
90
  inline void updateMap(const SVFBasicBlock *pred, const SVFBasicBlock *bb, s32_t pos)
85
91
  {
@@ -87,6 +93,7 @@ private:
87
93
  _svfdependentOnMap[bb][pred].insert(pos);
88
94
  }
89
95
 
96
+
90
97
  private:
91
98
  CDG *_controlDG;
92
99
  Map<const SVFBasicBlock *, Map<const SVFBasicBlock *, Set<s32_t>>> _svfcontrolMap; ///< map a basicblock to its controlling BBs (position, set of BBs)
@@ -96,4 +103,5 @@ private:
96
103
  };
97
104
  }
98
105
 
106
+
99
107
  #endif //SVF_CDGBUILDER_H
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * CallGraphBuilder.h
25
26
  *
@@ -69,4 +70,5 @@ public:
69
70
 
70
71
  } // End namespace SVF
71
72
 
73
+
72
74
  #endif /* INCLUDE_UTIL_CALLGRAPHBUILDER_H_ */
@@ -8,6 +8,7 @@
8
8
  #ifndef INCLUDE_UTIL_CASTING_H_
9
9
  #define INCLUDE_UTIL_CASTING_H_
10
10
 
11
+
11
12
  //===- llvm/Support/Casting.h - Allow flexible, checked, casts --*- C++ -*-===//
12
13
  //
13
14
  // The LLVM Compiler Infrastructure
@@ -381,7 +382,7 @@ inline typename cast_retty<X, Y *>::ret_type cast(Y *Val)
381
382
 
382
383
  template <class X, class Y>
383
384
  inline typename cast_retty<X, std::unique_ptr<Y>>::ret_type
384
- cast(std::unique_ptr<Y> &&Val)
385
+ cast(std::unique_ptr<Y> &&Val)
385
386
  {
386
387
  assert(SVFUtil::isa<X>(Val.get()) && "cast<Ty>() argument of incompatible type!");
387
388
  using ret_type = typename cast_retty<X, std::unique_ptr<Y>>::ret_type;
@@ -311,6 +311,7 @@ protected:
311
311
  return options;
312
312
  }
313
313
 
314
+
314
315
  protected:
315
316
  std::string name;
316
317
  std::string description;
@@ -116,6 +116,7 @@ protected:
116
116
  const SVFInstruction* inst;
117
117
  };
118
118
 
119
+
119
120
  /*!
120
121
  * Context-sensitive thread statement <t,c,s>
121
122
  */
@@ -180,6 +181,7 @@ private:
180
181
  NodeID tid;
181
182
  };
182
183
 
184
+
183
185
  /*!
184
186
  * Context-sensitive thread <c,t>
185
187
  */
@@ -297,6 +299,7 @@ protected:
297
299
  bool incycle;
298
300
  };
299
301
 
302
+
300
303
  /*!
301
304
  * Context-sensitive procedure <c,m>
302
305
  * c represent current context
@@ -382,6 +385,7 @@ protected:
382
385
  const SVFFunction* fun;
383
386
  };
384
387
 
388
+
385
389
  /*!
386
390
  * Context-sensitive procedure <t,c,m>
387
391
  * t represent current thread during traversing
@@ -123,6 +123,7 @@ public:
123
123
  }
124
124
  };
125
125
 
126
+
126
127
  /*!
127
128
  * FlowSensitive DPItem
128
129
  */
@@ -130,6 +131,7 @@ template<class LocCond>
130
131
  class StmtDPItem : public DPItem
131
132
  {
132
133
 
134
+
133
135
  protected:
134
136
  const LocCond* curloc;
135
137
 
@@ -192,8 +192,8 @@ public:
192
192
 
193
193
  // From all the candidates, returns the best mapping for pointsToSets (points-to set -> # occurrences).
194
194
  static inline std::pair<hclust_fast_methods, std::vector<NodeID>> determineBestMapping(
195
- const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
196
- Map<PointsTo, unsigned> pointsToSets, const std::string &evalSubtitle, double &evalTime);
195
+ const std::vector<std::pair<hclust_fast_methods, std::vector<NodeID>>> &candidates,
196
+ Map<PointsTo, unsigned> pointsToSets, const std::string &evalSubtitle, double &evalTime);
197
197
 
198
198
  };
199
199
  };
@@ -53,11 +53,29 @@ public:
53
53
 
54
54
  NodeBS localVarInRecursion;
55
55
 
56
+ inline void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
57
+ {
58
+ _vmrssUsageBefore = vmrss;
59
+ _vmsizeUsageBefore = vmsize;
60
+ }
61
+
62
+ inline void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
63
+ {
64
+ _vmrssUsageAfter = vmrss;
65
+ _vmsizeUsageAfter = vmsize;
66
+ }
67
+
56
68
  void performStat() override;
57
69
 
58
70
  void callgraphStat() override;
59
- private:
71
+
72
+
73
+ protected:
60
74
  PointerAnalysis* pta;
75
+ u32_t _vmrssUsageBefore;
76
+ u32_t _vmrssUsageAfter;
77
+ u32_t _vmsizeUsageBefore;
78
+ u32_t _vmsizeUsageAfter;
61
79
  };
62
80
 
63
81
  } // End namespace SVF
@@ -121,6 +121,7 @@ public:
121
121
  _I(0)
122
122
  {}
123
123
 
124
+
124
125
  // Return a handle to the stack of nodes in topological
125
126
  // order. This will be used to seed the initial solution
126
127
  // and improve efficiency.
@@ -143,6 +144,7 @@ public:
143
144
  return rep!= UINT_MAX ? rep : n ;
144
145
  }
145
146
 
147
+
146
148
  /// whether the node is in a cycle
147
149
  inline bool isInCycle(NodeID n) const
148
150
  {
@@ -47,6 +47,7 @@ namespace SVF
47
47
  * Bug Detector Recoder
48
48
  */
49
49
 
50
+
50
51
  class SVFBugEvent
51
52
  {
52
53
  public:
@@ -33,6 +33,7 @@
33
33
  namespace SVF
34
34
  {
35
35
 
36
+
36
37
  /*!
37
38
  * Pointer Analysis Statistics
38
39
  */
@@ -671,6 +671,7 @@ template <typename... Ts>
671
671
  constexpr bool is_sequence_container_v = is_sequence_container<Ts...>::value;
672
672
  ///@}
673
673
 
674
+
674
675
  } // End namespace SVFUtil
675
676
 
676
677
  } // End namespace SVF
@@ -253,6 +253,7 @@ public:
253
253
  }
254
254
  //@}
255
255
 
256
+
256
257
  /// Return true if this call exits/terminate a thread
257
258
  //@{
258
259
  inline bool isTDExit(const SVFInstruction *inst) const
@@ -32,6 +32,7 @@
32
32
  *
33
33
  */
34
34
 
35
+
35
36
  #ifndef WORKLIST_H_
36
37
  #define WORKLIST_H_
37
38
 
@@ -93,6 +93,7 @@ public:
93
93
  /// release z3 solver
94
94
  static void releaseSolver();
95
95
 
96
+
96
97
  /// null expression
97
98
  static z3::expr nullExpr()
98
99
  {
@@ -272,6 +273,7 @@ public:
272
273
  /// output Z3 expression as a string
273
274
  static std::string dumpStr(const Z3Expr &z3Expr);
274
275
 
276
+
275
277
  /// get the number of subexpression of a Z3 expression
276
278
  static u32_t getExprSize(const Z3Expr &z3Expr);
277
279
 
@@ -281,6 +283,7 @@ public:
281
283
  return getContext().bool_val(true);
282
284
  }
283
285
 
286
+
284
287
  /// Return the unique false condition
285
288
  static inline Z3Expr getFalseCond()
286
289
  {
@@ -312,3 +315,4 @@ struct std::hash<SVF::Z3Expr>
312
315
  };
313
316
 
314
317
  #endif //Z3_EXAMPLE_Z3EXPR_H
318
+
@@ -352,7 +352,7 @@ struct pointee_iter
352
352
  template <typename RangeT, typename WrappedIteratorT =
353
353
  decltype(std::begin(std::declval<RangeT>()))>
354
354
  iter_range<pointee_iter<WrappedIteratorT>>
355
- make_pointee_range(RangeT &&Range)
355
+ make_pointee_range(RangeT &&Range)
356
356
  {
357
357
  using PointeeIteratorT = pointee_iter<WrappedIteratorT>;
358
358
  return make_range(PointeeIteratorT(std::begin(std::forward<RangeT>(Range))),
@@ -388,7 +388,7 @@ public:
388
388
  template <typename RangeT, typename WrappedIteratorT =
389
389
  decltype(std::begin(std::declval<RangeT>()))>
390
390
  iter_range<pointer_iterator<WrappedIteratorT>>
391
- make_pointer_range(RangeT &&Range)
391
+ make_pointer_range(RangeT &&Range)
392
392
  {
393
393
  using PointerIteratorT = pointer_iterator<WrappedIteratorT>;
394
394
  return make_range(PointerIteratorT(std::begin(std::forward<RangeT>(Range))),
@@ -156,6 +156,7 @@ protected:
156
156
  class Andersen: public AndersenBase
157
157
  {
158
158
 
159
+
159
160
  public:
160
161
  typedef SCCDetection<ConstraintGraph*> CGSCC;
161
162
  typedef OrderedMap<CallSite, NodeID> CallSite2DummyValPN;
@@ -231,6 +232,7 @@ public:
231
232
  return getPTDataTy()->unionPts(id,ptd);
232
233
  }
233
234
 
235
+
234
236
  void dumpTopLevelPtsTo();
235
237
 
236
238
  void setDetectPWC(bool flag)
@@ -339,6 +341,8 @@ protected:
339
341
  /// SCC detection
340
342
  virtual NodeStack& SCCDetect();
341
343
 
344
+
345
+
342
346
  /// Sanitize pts for field insensitive objects
343
347
  void sanitizePts()
344
348
  {
@@ -372,6 +376,8 @@ protected:
372
376
  virtual void cluster(void) const;
373
377
  };
374
378
 
379
+
380
+
375
381
  /**
376
382
  * Wave propagation with diff points-to set.
377
383
  */
@@ -30,6 +30,7 @@
30
30
  #ifndef PROJECT_ANDERSENSFR_H
31
31
  #define PROJECT_ANDERSENSFR_H
32
32
 
33
+
33
34
  #include "WPA/Andersen.h"
34
35
  #include "WPA/CSC.h"
35
36
  #include "MemoryModel/PointsTo.h"
@@ -93,6 +94,8 @@ protected:
93
94
 
94
95
  };
95
96
 
97
+
98
+
96
99
  /*!
97
100
  * Selective Cycle Detection with Stride-based Field Representation
98
101
  */
@@ -32,6 +32,7 @@
32
32
  *
33
33
  */
34
34
 
35
+
35
36
  #ifndef WPAFSSOLVER_H_
36
37
  #define WPAFSSOLVER_H_
37
38
 
@@ -97,6 +98,8 @@ protected:
97
98
  }
98
99
  };
99
100
 
101
+
102
+
100
103
  /*!
101
104
  * Solver based on SCC cycles.
102
105
  */
@@ -168,6 +171,8 @@ protected:
168
171
  NodeID curSCCID; ///< index of current SCC.
169
172
  };
170
173
 
174
+
175
+
171
176
  /*!
172
177
  * Only solve nodes which need to be analyzed.
173
178
  */
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * @file: WPA.h
25
26
  * @author: yesen
@@ -32,6 +33,7 @@
32
33
  *
33
34
  */
34
35
 
36
+
35
37
  #ifndef WPA_H_
36
38
  #define WPA_H_
37
39
 
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * WPASolver.h
25
26
  *
@@ -171,6 +172,7 @@ protected:
171
172
  /// print out statistics for i-th iteration
172
173
  u32_t iterationForPrintStat;
173
174
 
175
+
174
176
  /// Get node on the graph
175
177
  inline GNODE* Node(NodeID id)
176
178
  {
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * FlowSensitiveStat.h
25
26
  *
@@ -44,6 +44,7 @@ public:
44
44
  virtual bool runOnModule (Module & M);
45
45
  };
46
46
 
47
+
47
48
  //
48
49
  // Pass: MergeFunctionRets
49
50
  //
@@ -447,6 +447,7 @@ private:
447
447
  return nullptr;
448
448
  }
449
449
 
450
+
450
451
  /// Creates an edge between from t1 to t2.
451
452
  DCHEdge* addEdge(const DIType* t1, const DIType* t2, DCHEdge::GEdgeKind et);
452
453
  /// Returns the edge between t1 and t2 if it exists, returns nullptr otherwise.
@@ -100,6 +100,7 @@ public:
100
100
  return const_cast<Value*>(&**OpIt);
101
101
  }
102
102
 
103
+
103
104
  generic_bridge_gep_type_iterator& operator++()
104
105
  {
105
106
  if ( CurTy.getInt() )
@@ -132,6 +133,7 @@ public:
132
133
  return *this;
133
134
  }
134
135
 
136
+
135
137
  generic_bridge_gep_type_iterator operator++(int)
136
138
  {
137
139
  generic_bridge_gep_type_iterator tmp = *this;
@@ -141,6 +143,7 @@ public:
141
143
 
142
144
  };
143
145
 
146
+
144
147
  typedef generic_bridge_gep_type_iterator<> bridge_gep_iterator;
145
148
 
146
149
  inline bridge_gep_iterator bridge_gep_begin(const User* GEP)