svf-lib 1.0.1820 → 1.0.1821

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 (109) hide show
  1. package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
  2. package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  3. package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +2 -0
  4. package/SVF-osx/svf/include/AbstractExecution/CFBasicBlockGWTO.h +83 -0
  5. package/SVF-osx/svf/include/AbstractExecution/ConsExeState.h +8 -0
  6. package/SVF-osx/svf/include/AbstractExecution/ExeState.h +8 -0
  7. package/SVF-osx/svf/include/AbstractExecution/ICFGWTO.h +78 -0
  8. package/SVF-osx/svf/include/AbstractExecution/IntervalExeState.h +7 -0
  9. package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +3 -0
  10. package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +2 -0
  11. package/SVF-osx/svf/include/AbstractExecution/RelExeState.h +1 -0
  12. package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +1 -0
  13. package/SVF-osx/svf/include/AbstractExecution/SVFIR2ConsExeState.h +1 -0
  14. package/SVF-osx/svf/include/AbstractExecution/SVFIR2ItvExeState.h +4 -0
  15. package/SVF-osx/svf/include/AbstractExecution/SingleAbsValue.h +2 -0
  16. package/SVF-osx/svf/include/AbstractExecution/SymState.h +4 -0
  17. package/SVF-osx/svf/include/CFL/CFGrammar.h +4 -0
  18. package/SVF-osx/svf/include/CFL/CFLAlias.h +1 -0
  19. package/SVF-osx/svf/include/CFL/CFLGraphBuilder.h +1 -0
  20. package/SVF-osx/svf/include/CFL/CFLStat.h +1 -0
  21. package/SVF-osx/svf/include/CFL/CFLVF.h +1 -0
  22. package/SVF-osx/svf/include/DDA/ContextDDA.h +1 -0
  23. package/SVF-osx/svf/include/DDA/DDAClient.h +5 -0
  24. package/SVF-osx/svf/include/DDA/DDAPass.h +3 -2
  25. package/SVF-osx/svf/include/DDA/DDAVFSolver.h +2 -2
  26. package/SVF-osx/svf/include/FastCluster/fastcluster.h +1 -0
  27. package/SVF-osx/svf/include/Graphs/CDG.h +3 -0
  28. package/SVF-osx/svf/include/Graphs/CFBasicBlockG.h +3 -0
  29. package/SVF-osx/svf/include/Graphs/CFLGraph.h +1 -0
  30. package/SVF-osx/svf/include/Graphs/CHG.h +4 -2
  31. package/SVF-osx/svf/include/Graphs/ConsGEdge.h +5 -0
  32. package/SVF-osx/svf/include/Graphs/ConsGNode.h +1 -0
  33. package/SVF-osx/svf/include/Graphs/DOTGraphTraits.h +1 -0
  34. package/SVF-osx/svf/include/Graphs/GenericGraph.h +1 -0
  35. package/SVF-osx/svf/include/Graphs/GraphPrinter.h +3 -0
  36. package/SVF-osx/svf/include/Graphs/GraphTraits.h +2 -2
  37. package/SVF-osx/svf/include/Graphs/ICFG.h +1 -0
  38. package/SVF-osx/svf/include/Graphs/ICFGNode.h +3 -0
  39. package/SVF-osx/svf/include/Graphs/ICFGStat.h +2 -0
  40. package/SVF-osx/svf/include/Graphs/IRGraph.h +1 -0
  41. package/SVF-osx/svf/include/Graphs/PTACallGraph.h +3 -0
  42. package/SVF-osx/svf/include/Graphs/SCC.h +354 -0
  43. package/SVF-osx/svf/include/Graphs/SVFG.h +2 -0
  44. package/SVF-osx/svf/include/Graphs/SVFGEdge.h +1 -0
  45. package/SVF-osx/svf/include/Graphs/SVFGNode.h +7 -0
  46. package/SVF-osx/svf/include/Graphs/SVFGOPT.h +3 -0
  47. package/SVF-osx/svf/include/Graphs/SVFGStat.h +3 -1
  48. package/SVF-osx/svf/include/Graphs/ThreadCallGraph.h +3 -0
  49. package/SVF-osx/svf/include/Graphs/VFG.h +2 -0
  50. package/SVF-osx/svf/include/Graphs/VFGEdge.h +3 -0
  51. package/SVF-osx/svf/include/Graphs/VFGNode.h +8 -0
  52. package/SVF-osx/svf/include/Graphs/WTO.h +859 -0
  53. package/SVF-osx/svf/include/MSSA/MSSAMuChi.h +4 -0
  54. package/SVF-osx/svf/include/MSSA/MemPartition.h +1 -0
  55. package/SVF-osx/svf/include/MSSA/MemRegion.h +4 -3
  56. package/SVF-osx/svf/include/MSSA/MemSSA.h +1 -0
  57. package/SVF-osx/svf/include/MTA/FSMPTA.h +6 -0
  58. package/SVF-osx/svf/include/MTA/LockAnalysis.h +5 -0
  59. package/SVF-osx/svf/include/MTA/MHP.h +3 -0
  60. package/SVF-osx/svf/include/MTA/MTA.h +1 -0
  61. package/SVF-osx/svf/include/MTA/MTAResultValidator.h +2 -0
  62. package/SVF-osx/svf/include/MTA/TCT.h +3 -2
  63. package/SVF-osx/svf/include/MemoryModel/AbstractPointsToDS.h +2 -0
  64. package/SVF-osx/svf/include/MemoryModel/AccessPath.h +5 -0
  65. package/SVF-osx/svf/include/MemoryModel/ConditionalPT.h +5 -0
  66. package/SVF-osx/svf/include/MemoryModel/PersistentPointsToDS.h +1 -0
  67. package/SVF-osx/svf/include/MemoryModel/PointerAnalysis.h +6 -5
  68. package/SVF-osx/svf/include/MemoryModel/PointerAnalysisImpl.h +1 -0
  69. package/SVF-osx/svf/include/MemoryModel/PointsTo.h +1 -0
  70. package/SVF-osx/svf/include/SABER/DoubleFreeChecker.h +1 -0
  71. package/SVF-osx/svf/include/SABER/ProgSlice.h +1 -0
  72. package/SVF-osx/svf/include/SABER/SaberCondAllocator.h +4 -0
  73. package/SVF-osx/svf/include/SABER/SaberSVFGBuilder.h +1 -0
  74. package/SVF-osx/svf/include/SVFIR/SVFIR.h +2 -0
  75. package/SVF-osx/svf/include/SVFIR/SVFStatements.h +2 -0
  76. package/SVF-osx/svf/include/SVFIR/SVFType.h +2 -0
  77. package/SVF-osx/svf/include/SVFIR/SVFValue.h +3 -0
  78. package/SVF-osx/svf/include/SVFIR/SVFVariables.h +5 -0
  79. package/SVF-osx/svf/include/SVFIR/SymbolTableInfo.h +5 -0
  80. package/SVF-osx/svf/include/Util/CDGBuilder.h +8 -0
  81. package/SVF-osx/svf/include/Util/CallGraphBuilder.h +2 -0
  82. package/SVF-osx/svf/include/Util/Casting.h +2 -1
  83. package/SVF-osx/svf/include/Util/CommandLine.h +1 -0
  84. package/SVF-osx/svf/include/Util/CxtStmt.h +4 -0
  85. package/SVF-osx/svf/include/Util/DPItem.h +2 -0
  86. package/SVF-osx/svf/include/Util/NodeIDAllocator.h +2 -2
  87. package/SVF-osx/svf/include/Util/PTAStat.h +1 -0
  88. package/SVF-osx/svf/include/Util/SVFBugReport.h +1 -0
  89. package/SVF-osx/svf/include/Util/SVFStat.h +1 -0
  90. package/SVF-osx/svf/include/Util/SVFUtil.h +1 -0
  91. package/SVF-osx/svf/include/Util/ThreadAPI.h +1 -0
  92. package/SVF-osx/svf/include/Util/WorkList.h +1 -0
  93. package/SVF-osx/svf/include/Util/Z3Expr.h +4 -0
  94. package/SVF-osx/svf/include/Util/iterator.h +2 -2
  95. package/SVF-osx/svf/include/WPA/Andersen.h +6 -0
  96. package/SVF-osx/svf/include/WPA/AndersenPWC.h +3 -0
  97. package/SVF-osx/svf/include/WPA/CSC.h +3 -3
  98. package/SVF-osx/svf/include/WPA/WPAFSSolver.h +5 -0
  99. package/SVF-osx/svf/include/WPA/WPAPass.h +2 -0
  100. package/SVF-osx/svf/include/WPA/WPASolver.h +2 -0
  101. package/SVF-osx/svf/include/WPA/WPAStat.h +1 -0
  102. package/SVF-osx/svf-llvm/include/SVF-LLVM/BreakConstantExpr.h +1 -0
  103. package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +1 -0
  104. package/SVF-osx/svf-llvm/include/SVF-LLVM/GEPTypeBridgeIterator.h +3 -0
  105. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +1 -0
  106. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +1 -0
  107. package/SVF-osx/svf-llvm/include/SVF-LLVM/SVFIRBuilder.h +1 -0
  108. package/SVF-osx/svf-llvm/include/SVF-LLVM/SymbolTableBuilder.h +1 -0
  109. package/package.json +1 -1
@@ -84,6 +84,7 @@ public:
84
84
  }
85
85
  };
86
86
 
87
+
87
88
  /*!
88
89
  * Indirect Memory Read
89
90
  * 1) LoadMU at each store instruction
@@ -268,6 +269,7 @@ public:
268
269
  }
269
270
  };
270
271
 
272
+
271
273
  /*!
272
274
  * RetMU is annotated at function return, representing memory objects returns to callers
273
275
  */
@@ -312,6 +314,7 @@ public:
312
314
  }
313
315
  };
314
316
 
317
+
315
318
  /*!
316
319
  * Indirect Memory Definition
317
320
  * 1) MSSACHI indirect memory object is modified
@@ -509,6 +512,7 @@ public:
509
512
  }
510
513
  };
511
514
 
515
+
512
516
  /*!
513
517
  *
514
518
  * StoreCHI is annotated at each store instruction, representing a memory object is modified here
@@ -32,6 +32,7 @@
32
32
  *
33
33
  */
34
34
 
35
+
35
36
  #ifndef DISNCTMRGENERATOR_H_
36
37
  #define DISNCTMRGENERATOR_H_
37
38
 
@@ -34,11 +34,11 @@
34
34
  #ifndef MEMORYREGION_H_
35
35
  #define MEMORYREGION_H_
36
36
 
37
- #include "SVFIR/SVFIR.h"
37
+ #include "Graphs/ICFG.h"
38
38
  #include "Graphs/PTACallGraph.h"
39
- #include "Util/SCC.h"
39
+ #include "Graphs/SCC.h"
40
+ #include "SVFIR/SVFIR.h"
40
41
  #include "Util/WorkList.h"
41
- #include "Graphs/ICFG.h"
42
42
 
43
43
  #include <set>
44
44
 
@@ -335,6 +335,7 @@ protected:
335
335
  /// Get Mod-Ref of a callee function
336
336
  virtual bool handleCallsiteModRef(NodeBS& mod, NodeBS& ref, const CallICFGNode* cs, const SVFFunction* fun);
337
337
 
338
+
338
339
  /// Add cpts to store/load
339
340
  //@{
340
341
  inline void addCPtsToStore(NodeBS& cpts, const StoreStmt *st, const SVFFunction* fun)
@@ -32,6 +32,7 @@
32
32
  * Journal of Systems and Software (JSS'16), Algorithm 3 in the paper
33
33
  */
34
34
 
35
+
35
36
  #ifndef MEMORYSSAPASS_H_
36
37
  #define MEMORYSSAPASS_H_
37
38
 
@@ -34,6 +34,7 @@
34
34
  #ifndef FSPTANALYSIS_H_
35
35
  #define FSPTANALYSIS_H_
36
36
 
37
+
37
38
  #include "WPA/FlowSensitive.h"
38
39
  #include "MSSA/SVFGBuilder.h"
39
40
  #include "MTA/LockAnalysis.h"
@@ -46,6 +47,7 @@ namespace SVF
46
47
  class MHP;
47
48
  class LockAnalysis;
48
49
 
50
+
49
51
  class SVFGNodeLockSpan
50
52
  {
51
53
  public:
@@ -171,6 +173,7 @@ private:
171
173
  Set<NodeIDPair> recordedges;
172
174
  Map<NodeIDPair, PointsTo> edge2pts;
173
175
 
176
+
174
177
  Map<const StmtSVFGNode*, SVFGNodeIDSet> prevset;
175
178
  Map<const StmtSVFGNode*, SVFGNodeIDSet> succset;
176
179
 
@@ -180,6 +183,7 @@ private:
180
183
  PairToBoolMap pairheadmap;
181
184
  PairToBoolMap pairtailmap;
182
185
 
186
+
183
187
  static const u32_t ADDEDGE_NOEDGE= 0;
184
188
  static const u32_t ADDEDGE_NONSPARSE= 1;
185
189
  static const u32_t ADDEDGE_ALLOPT= 2;
@@ -191,12 +195,14 @@ private:
191
195
 
192
196
  };
193
197
 
198
+
194
199
  /*!
195
200
  * Flow-sensitive pointer analysis for multithreaded programs
196
201
  */
197
202
  class FSMPTA : public FlowSensitive
198
203
  {
199
204
 
205
+
200
206
  public:
201
207
 
202
208
  /// Constructor
@@ -266,6 +266,8 @@ public:
266
266
  }
267
267
  //@}
268
268
 
269
+
270
+
269
271
  /// Check if one instruction's context stmt is in a lock span
270
272
  inline bool hasOneCxtInLockSpan(const SVFInstruction *I, LockSpan lspan) const
271
273
  {
@@ -297,6 +299,7 @@ public:
297
299
  return true;
298
300
  }
299
301
 
302
+
300
303
  /// Check if two Instructions are protected by common locks
301
304
  /// echo inst may have multiple cxt stmt
302
305
  /// we check whether every cxt stmt of instructions is protected by a common lock.
@@ -466,6 +469,7 @@ private:
466
469
  /// Map a statement to all its context-sensitive statements
467
470
  InstToCxtStmtSet instToCxtStmtSet;
468
471
 
472
+
469
473
  /// Context-sensitive locks
470
474
  CxtLockSet cxtLockset;
471
475
 
@@ -500,6 +504,7 @@ private:
500
504
  InstToInstSetMap instTocondCILocksMap;
501
505
  //@}
502
506
 
507
+
503
508
  public:
504
509
  double lockTime;
505
510
  u32_t numOfTotalQueries;
@@ -272,6 +272,7 @@ private:
272
272
  InstToThreadStmtSetMap instToTSMap; ///< Map an instruction to its ThreadStmtSet
273
273
  FuncPairToBool nonCandidateFuncMHPRelMap;
274
274
 
275
+
275
276
  public:
276
277
  u32_t numOfTotalQueries; ///< Total number of queries
277
278
  u32_t numOfMHPQueries; ///< Number of queries are answered as may-happen-in-parallel
@@ -279,6 +280,8 @@ public:
279
280
  double interleavingQueriesTime;
280
281
  };
281
282
 
283
+
284
+
282
285
  /*!
283
286
  *
284
287
  */
@@ -66,6 +66,7 @@ public:
66
66
  /// Destructor
67
67
  virtual ~MTA();
68
68
 
69
+
69
70
  /// We start the pass here
70
71
  virtual bool runOnModule(SVFIR* module);
71
72
  /// Compute MHP
@@ -148,6 +148,8 @@ private:
148
148
  //@}
149
149
  };
150
150
 
151
+
152
+
151
153
  /*!
152
154
  * \brief Validate the result of concurrent analysis.
153
155
  *
@@ -30,10 +30,10 @@
30
30
  #ifndef TCTNodeDetector_H_
31
31
  #define TCTNodeDetector_H_
32
32
 
33
- #include "Util/SCC.h"
34
- #include "Util/SVFUtil.h"
33
+ #include "Graphs/SCC.h"
35
34
  #include "Graphs/ThreadCallGraph.h"
36
35
  #include "Util/CxtStmt.h"
36
+ #include "Util/SVFUtil.h"
37
37
  #include <set>
38
38
  #include <vector>
39
39
 
@@ -42,6 +42,7 @@ namespace SVF
42
42
 
43
43
  class TCTNode;
44
44
 
45
+
45
46
  /*
46
47
  * Thread creation edge represents a spawning relation between two context sensitive threads
47
48
  */
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /// Contains abstract classes for:
24
25
  /// PTData: basic points-to data structure derived by all others.
25
26
  /// DiffPTData: PTData which only propagates new changes, not entire points-to sets.
@@ -38,6 +39,7 @@
38
39
  /// |
39
40
  /// MutableIncDFPTData
40
41
 
42
+
41
43
  /*
42
44
  * AbstractPointsToDS.h
43
45
  *
@@ -29,16 +29,20 @@
29
29
  *
30
30
  */
31
31
 
32
+
32
33
  #ifndef AccessPath_H_
33
34
  #define AccessPath_H_
34
35
 
36
+
35
37
  #include "SVFIR/SVFValue.h"
36
38
 
39
+
37
40
  namespace SVF
38
41
  {
39
42
 
40
43
  class SVFVar;
41
44
 
45
+
42
46
  /*
43
47
  * Location set represents a set of locations in a memory block with following offsets:
44
48
  * { offset + \sum_{i=0}^N (stride_i * j_i) | 0 \leq j_i < M_i }
@@ -141,6 +145,7 @@ public:
141
145
  /// Return element number of a type.
142
146
  u32_t getElementNum(const SVFType* type) const;
143
147
 
148
+
144
149
  bool addOffsetVarAndGepTypePair(const SVFVar* var, const SVFType* gepIterType);
145
150
 
146
151
  /// Return TRUE if this is a constant location set.
@@ -74,6 +74,7 @@ public:
74
74
  }
75
75
  ///@}
76
76
 
77
+
77
78
  inline CondVar& operator= (const CondVar& rhs)
78
79
  {
79
80
  if(*this!=rhs)
@@ -84,6 +85,7 @@ public:
84
85
  return *this;
85
86
  }
86
87
 
88
+
87
89
  /**
88
90
  * Less than implementation.
89
91
  */
@@ -294,6 +296,7 @@ private:
294
296
  ElementSet elements;
295
297
  };
296
298
 
299
+
297
300
  /*!
298
301
  * Conditional Points-to set
299
302
  */
@@ -397,6 +400,7 @@ public:
397
400
  return numElement()==0;
398
401
  }
399
402
 
403
+
400
404
  /// Overloading operators
401
405
  //@{
402
406
  inline CondPointsToSet<Cond>& operator=(
@@ -600,6 +604,7 @@ public:
600
604
  }
601
605
  //@}
602
606
 
607
+
603
608
  /// Overloading operator |=
604
609
  /// Merge CondPointsToSet of RHS into this one.
605
610
  inline bool operator |= (const CondPointsToSet<Cond>& rhs)
@@ -791,6 +791,7 @@ private:
791
791
  }
792
792
  ///@}
793
793
 
794
+
794
795
  private:
795
796
  UpdatedVarMap outUpdatedVarMap;
796
797
  UpdatedVarMap inUpdatedVarMap;
@@ -33,15 +33,15 @@
33
33
  #include <unistd.h>
34
34
  #include <signal.h>
35
35
 
36
- #include "SVFIR/SVFIR.h"
37
- #include "MemoryModel/ConditionalPT.h"
36
+ #include "Graphs/CHG.h"
37
+ #include "Graphs/PTACallGraph.h"
38
+ #include "Graphs/SCC.h"
38
39
  #include "MemoryModel/AbstractPointsToDS.h"
40
+ #include "MemoryModel/ConditionalPT.h"
39
41
  #include "MemoryModel/MutablePointsToDS.h"
40
42
  #include "MemoryModel/PersistentPointsToDS.h"
41
- #include "Graphs/PTACallGraph.h"
42
- #include "Graphs/CHG.h"
43
- #include "Util/SCC.h"
44
43
  #include "MemoryModel/PointsTo.h"
44
+ #include "SVFIR/SVFIR.h"
45
45
 
46
46
  namespace SVF
47
47
  {
@@ -85,6 +85,7 @@ public:
85
85
  PathS_DDA, ///< Guarded value-flow DDA
86
86
  Cxt_DDA, ///< context sensitive DDA
87
87
 
88
+
88
89
  Default_PTA ///< default pta without any analysis
89
90
  };
90
91
 
@@ -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