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
@@ -75,18 +75,6 @@ public:
75
75
 
76
76
  void getNumOfOOBQuery();
77
77
 
78
- inline void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
79
- {
80
- _vmrssUsageBefore = vmrss;
81
- _vmsizeUsageBefore = vmsize;
82
- }
83
-
84
- inline void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
85
- {
86
- _vmrssUsageAfter = vmrss;
87
- _vmsizeUsageAfter = vmsize;
88
- }
89
-
90
78
  private:
91
79
  FlowDDA* flowDDA;
92
80
  ContextDDA* contextDDA;
@@ -110,11 +98,6 @@ private:
110
98
  u32_t _NumOfConstantPtr;
111
99
  u32_t _NumOfBlackholePtr;
112
100
 
113
- u32_t _vmrssUsageBefore;
114
- u32_t _vmrssUsageAfter;
115
- u32_t _vmsizeUsageBefore;
116
- u32_t _vmsizeUsageAfter;
117
-
118
101
  double _AvgNumOfDPMAtSVFGNode;
119
102
  u32_t _MaxNumOfDPMAtSVFGNode;
120
103
 
@@ -67,6 +67,8 @@ protected:
67
67
 
68
68
  void destroy();
69
69
 
70
+ void clearSolitaries(); // remove nodes that are neither pointers nor connected with any edge
71
+
70
72
  SVFStmt::SVFStmtSetTy& getPAGEdgeSet(SVFStmt::PEDGEK kind)
71
73
  {
72
74
  return pag->getPTASVFStmtSet(kind);
@@ -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
@@ -63,6 +63,7 @@ public:
63
63
 
64
64
  BoundedZ3Expr(BoundedZ3Expr &&z3Expr) : Z3Expr(z3Expr) {}
65
65
 
66
+
66
67
  inline BoundedZ3Expr &operator=(BoundedZ3Expr &&rhs)
67
68
  {
68
69
  Z3Expr::operator=(rhs);
@@ -387,3 +388,4 @@ struct std::hash<SVF::BoundedZ3Expr>
387
388
  }
388
389
  };
389
390
  #endif //SVF_BOUNDEDZ3EXPR_H
391
+
@@ -57,6 +57,7 @@ public:
57
57
  public:
58
58
  ConsExeState(): ExeState(ExeState::SingleValueK) {}
59
59
 
60
+
60
61
  /// Constructor
61
62
  ConsExeState(VarToValMap varToValMap, LocToValMap locToValMap) : ExeState(ExeState::SingleValueK), _varToVal(
62
63
  SVFUtil::move(varToValMap)), _locToVal(SVFUtil::move(locToValMap)) {}
@@ -360,6 +361,8 @@ public:
360
361
 
361
362
  public:
362
363
 
364
+
365
+
363
366
  s64_t getNumber(u32_t lhs);
364
367
 
365
368
  static inline SingleAbsValue getIntOneZ3Expr()
@@ -406,11 +409,14 @@ public:
406
409
  /// Whether two var to value map is equivalent
407
410
  static bool eqVarToValMap(const VarToValMap &pre, const VarToValMap &nxt);
408
411
 
412
+
409
413
  /// Whether lhs is less than rhs
410
414
  static bool lessThanVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs);
411
415
 
416
+
412
417
  private:
413
418
 
419
+
414
420
  static bool assign(SingleAbsValue &lhs, const SingleAbsValue &rhs);
415
421
 
416
422
  inline bool store(u32_t objId, const SingleAbsValue &z3Expr)
@@ -440,4 +446,6 @@ struct std::hash<SVF::ConsExeState>
440
446
  }
441
447
  };
442
448
 
449
+
450
+
443
451
  #endif // SVF_CONSEXESTATE_H
@@ -27,6 +27,7 @@
27
27
  *
28
28
  */
29
29
 
30
+
30
31
  #ifndef Z3_EXAMPLE_EXESTATE_H
31
32
  #define Z3_EXAMPLE_EXESTATE_H
32
33
 
@@ -89,6 +90,7 @@ public:
89
90
  return *this;
90
91
  }
91
92
 
93
+
92
94
  protected:
93
95
  VarToAddrs _varToAddrs{{0, getVirtualMemAddress(0)}}; ///< Map a variable (symbol) to its memory addresses
94
96
  VarToAddrs _locToAddrs; ///< Map a memory address to its stored memory addresses
@@ -113,6 +115,7 @@ public:
113
115
  return _locToAddrs.find(id) != _locToAddrs.end();
114
116
  }
115
117
 
118
+
116
119
  inline virtual const VarToAddrs &getVarToAddrs() const
117
120
  {
118
121
  return _varToAddrs;
@@ -145,6 +148,8 @@ public:
145
148
  return _kind;
146
149
  }
147
150
 
151
+
152
+
148
153
  public:
149
154
  inline virtual void storeAddrs(u32_t addr, const Addrs &vaddrs)
150
155
  {
@@ -280,8 +285,11 @@ public:
280
285
  return AddressValue::getInternalID(idx);
281
286
  }
282
287
 
288
+
283
289
  }; // end class ExeState
284
290
 
291
+
292
+
285
293
  } // end namespace SVF
286
294
 
287
295
  template<>
@@ -77,6 +77,7 @@ public:
77
77
 
78
78
  virtual ~IntervalESBase() = default;
79
79
 
80
+
80
81
  IntervalESBase &operator=(const IntervalESBase &rhs)
81
82
  {
82
83
  if (rhs != *this)
@@ -216,6 +217,7 @@ public:
216
217
  /// domain meet with other, important! other widen this.
217
218
  void meetWith(const IntervalESBase &other);
218
219
 
220
+
219
221
  /// Return int value from an expression if it is a numeral, otherwise return an approximate value
220
222
  inline s32_t Interval2NumValue(const IntervalValue &e) const
221
223
  {
@@ -335,6 +337,7 @@ public:
335
337
  return true;
336
338
  }
337
339
 
340
+
338
341
  static bool lessThanVarToValMap(const VarToValMap &lhs, const VarToValMap &rhs)
339
342
  {
340
343
  if (lhs.empty()) return !rhs.empty();
@@ -380,6 +383,7 @@ public:
380
383
  return !(*this >= rhs);
381
384
  }
382
385
 
386
+
383
387
  bool operator>=(const IntervalESBase &rhs) const
384
388
  {
385
389
  return geqVarToValMap(_varToItvVal, rhs.getVarToVal()) && geqVarToValMap(_locToItvVal, rhs.getLocToVal());
@@ -393,6 +397,7 @@ public:
393
397
  _varToAddrs.clear();
394
398
  }
395
399
 
400
+
396
401
  protected:
397
402
  void printTable(const VarToValMap &table, std::ostream &oss) const;
398
403
 
@@ -421,6 +426,7 @@ public:
421
426
 
422
427
  virtual ~IntervalExeState() = default;
423
428
 
429
+
424
430
  IntervalExeState &operator=(const IntervalExeState &rhs)
425
431
  {
426
432
  IntervalESBase::operator=(rhs);
@@ -622,6 +628,7 @@ public:
622
628
  return !(*this >= rhs);
623
629
  }
624
630
 
631
+
625
632
  bool operator>=(const IntervalExeState &rhs) const
626
633
  {
627
634
  return geqVarToValMap(_varToItvVal, rhs.getVarToVal()) && geqVarToValMap(_locToItvVal, rhs._locToItvVal);
@@ -27,6 +27,7 @@
27
27
  *
28
28
  */
29
29
 
30
+
30
31
  #ifndef Z3_EXAMPLE_IntervalValue_H
31
32
  #define Z3_EXAMPLE_IntervalValue_H
32
33
 
@@ -320,6 +321,7 @@ public:
320
321
  }
321
322
  }
322
323
 
324
+
323
325
  /// Equality comparison
324
326
  bool equals(const IntervalValue &other) const
325
327
  {
@@ -677,6 +679,7 @@ inline IntervalValue operator<(const IntervalValue &lhs, const IntervalValue &rh
677
679
  }
678
680
  }
679
681
 
682
+
680
683
  // Compare two IntervalValues for greater than or equal to
681
684
  inline IntervalValue operator>=(const IntervalValue &lhs, const IntervalValue &rhs)
682
685
  {
@@ -174,6 +174,7 @@ public:
174
174
  return _n.geq(rhs._n).simplify().is_true();
175
175
  }
176
176
 
177
+
177
178
  /// Reload operator
178
179
  //{%
179
180
  friend NumericLiteral operator==(const NumericLiteral &lhs, const NumericLiteral &rhs)
@@ -433,6 +434,7 @@ public:
433
434
 
434
435
  //%}
435
436
 
437
+
436
438
  }; // end class NumericLiteral
437
439
  } // end namespace SVF
438
440
 
@@ -91,6 +91,7 @@ public:
91
91
  /// Overloading Operator==
92
92
  bool operator<(const RelExeState &rhs) const;
93
93
 
94
+
94
95
  static z3::context &getContext()
95
96
  {
96
97
  return Z3Expr::getContext();
@@ -56,6 +56,7 @@ public:
56
56
 
57
57
  IntervalESBase beta(const Map<u32_t, double> &sigma, const IntervalESBase &exeState) const;
58
58
 
59
+
59
60
  /// Return Z3 expression lazily based on SVFVar ID
60
61
  virtual inline Z3Expr toZ3Expr(u32_t varId) const
61
62
  {
@@ -97,6 +97,7 @@ public:
97
97
  /// Init ConZ3Expr for ObjVar
98
98
  void initObjVar(const ObjVar *objVar, u32_t varId);
99
99
 
100
+
100
101
  void initSVFVar(u32_t varId);
101
102
 
102
103
  void moveToGlobal();
@@ -86,6 +86,7 @@ public:
86
86
  /// Return the offset expression of a GepStmt
87
87
  IntervalValue getItvOfFlattenedElemIndex(const GepStmt *gep);
88
88
 
89
+
89
90
  static z3::context &getContext()
90
91
  {
91
92
  return Z3Expr::getContext();
@@ -93,6 +94,7 @@ public:
93
94
 
94
95
  void applySummary(IntervalExeState &es);
95
96
 
97
+
96
98
  /// Init ObjVar
97
99
  void initObjVar(const ObjVar *objVar, u32_t varId);
98
100
 
@@ -107,6 +109,7 @@ public:
107
109
  return globalNulladdrs;
108
110
  }
109
111
 
112
+
110
113
  /// whether the variable is in varToVal table
111
114
  inline bool inVarToValTable(u32_t id) const
112
115
  {
@@ -119,6 +122,7 @@ public:
119
122
  return _es.inVarToAddrsTable(id);
120
123
  }
121
124
 
125
+
122
126
  /// whether the memory address stores a interval value
123
127
  inline bool inLocToValTable(u32_t id) const
124
128
  {
@@ -135,6 +135,7 @@ public:
135
135
  return (getExpr() >= rhs.getExpr()).simplify().is_true();
136
136
  }
137
137
 
138
+
138
139
  /// Reload operator
139
140
  //{%
140
141
  friend SingleAbsValue operator==(const SingleAbsValue &lhs, const SingleAbsValue &rhs)
@@ -472,4 +473,5 @@ struct std::hash<SVF::SingleAbsValue>
472
473
  }
473
474
  };
474
475
 
476
+
475
477
  #endif //SVF_SINGLEABSVALUE_H
@@ -83,6 +83,7 @@ public:
83
83
  return *this;
84
84
  }
85
85
 
86
+
86
87
  /// Move Constructor
87
88
  SymState(SymState &&rhs) noexcept: _exeState(SVFUtil::move(rhs._exeState)),
88
89
  _typeState(SVFUtil::move(rhs._typeState)),
@@ -110,6 +111,7 @@ public:
110
111
  return _keyNodesSet;
111
112
  }
112
113
 
114
+
113
115
  void insertKeyNode(NodeID id)
114
116
  {
115
117
  if (_keyNodesSet.empty())
@@ -201,6 +203,8 @@ public:
201
203
 
202
204
  } // end namespace SVF
203
205
 
206
+
207
+
204
208
  /// Specialise hash for SymState
205
209
  template<>
206
210
  struct std::hash<SVF::SymState>
@@ -39,6 +39,7 @@
39
39
  #include "SVFIR/SVFValue.h"
40
40
  #include "Graphs/CFBasicBlockG.h"
41
41
 
42
+
42
43
  namespace SVF
43
44
  {
44
45
 
@@ -332,6 +333,7 @@ private:
332
333
 
333
334
  }; // end class CFBasicBlockGWTOComp
334
335
 
336
+
335
337
  /*!
336
338
  * WTO node for CFBasicBlockG
337
339
  */
@@ -377,6 +379,7 @@ public:
377
379
 
378
380
  }; // end class CFBasicBlockGWTONode
379
381
 
382
+
380
383
  /*!
381
384
  * WTO cycle for CFBasicBlockG
382
385
  */
@@ -454,6 +457,7 @@ public:
454
457
 
455
458
  }; // end class CFBasicBlockGWTOCycle
456
459
 
460
+
457
461
  /*!
458
462
  * Weak topological order for CFBasicBlockG
459
463
  */
@@ -546,6 +550,7 @@ public:
546
550
  return it->second;
547
551
  }
548
552
 
553
+
549
554
  /// Get the wto-cycle-depth of the given node
550
555
  const CFBasicBlockGWTOCycleDepth &getWTOCycleDepth(const CFBasicBlockNode *n) const
551
556
  {
@@ -127,6 +127,7 @@ public:
127
127
  }
128
128
  };
129
129
 
130
+
130
131
  struct SymbolVectorHash
131
132
  {
132
133
  size_t operator()(const std::vector<Symbol> &v) const
@@ -155,6 +156,7 @@ public:
155
156
  typedef std::vector<Symbol> Production;
156
157
  typedef SymbolSet<Production> Productions;
157
158
 
159
+
158
160
  inline Map<std::string, Kind>& getNonterminals()
159
161
  {
160
162
  return this->nonterminals;
@@ -362,6 +364,7 @@ public:
362
364
  return it->second;
363
365
  }
364
366
 
367
+
365
368
  const Symbol& getLHSSymbol(const Production& prod) const
366
369
  {
367
370
  return prod.at(0);
@@ -381,6 +384,7 @@ public:
381
384
 
382
385
  void dump(std::string fileName) const;
383
386
 
387
+
384
388
  const inline u32_t num_generator()
385
389
  {
386
390
  return newTerminalSubscript++;
@@ -54,6 +54,7 @@ public:
54
54
  /// Initialize Solver
55
55
  virtual void initializeSolver();
56
56
 
57
+
57
58
  /// Print grammar and graph
58
59
  virtual void finalize();
59
60
 
@@ -160,6 +160,7 @@ private:
160
160
  void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFGrammar::Attribute attri);
161
161
  };
162
162
 
163
+
163
164
  }// SVF
164
165
 
165
166
  #endif /* INCLUDE_CFL_CFLGRAPHBUILDER_H_*/
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * CFLStat.h
25
26
  *
@@ -30,6 +30,7 @@
30
30
  #ifndef INCLUDE_CFL_CFLVF_H_
31
31
  #define INCLUDE_CFL_CFLVF_H_
32
32
 
33
+
33
34
  #include "CFL/CFLBase.h"
34
35
  #include "CFL/CFLStat.h"
35
36
  #include "CFL/CFLSVFGBuilder.h"
@@ -118,6 +118,7 @@ public:
118
118
  /// get callsite id from return, return 0 if it is a spurious return edge
119
119
  CallSiteID getCSIDAtRet(CxtLocDPItem& dpm, const SVFGEdge* edge);
120
120
 
121
+
121
122
  /// Pop recursive callsites
122
123
  inline virtual void popRecursiveCallSites(CxtLocDPItem& dpm)
123
124
  {
@@ -20,6 +20,7 @@
20
20
  //
21
21
  //===----------------------------------------------------------------------===//
22
22
 
23
+
23
24
  /*
24
25
  * @file: DDAClient.h
25
26
  * @author: yesen
@@ -29,6 +30,7 @@
29
30
  *
30
31
  */
31
32
 
33
+
32
34
  #ifndef DDACLIENT_H_
33
35
  #define DDACLIENT_H_
34
36
 
@@ -116,6 +118,7 @@ private:
116
118
  bool solveAll; ///< TRUE if all top level pointers are being queried
117
119
  };
118
120
 
121
+
119
122
  /**
120
123
  * DDA client with function pointers as query candidates.
121
124
  */
@@ -133,6 +136,8 @@ public:
133
136
  virtual void performStat(PointerAnalysis* pta);
134
137
  };
135
138
 
139
+
140
+
136
141
  /**
137
142
  * DDA client with function pointers as query candidates.
138
143
  */
@@ -28,6 +28,7 @@
28
28
  *
29
29
  */
30
30
 
31
+
31
32
  #ifndef DDAPASS_H_
32
33
  #define DDAPASS_H_
33
34
 
@@ -75,18 +75,6 @@ public:
75
75
 
76
76
  void getNumOfOOBQuery();
77
77
 
78
- inline void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
79
- {
80
- _vmrssUsageBefore = vmrss;
81
- _vmsizeUsageBefore = vmsize;
82
- }
83
-
84
- inline void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
85
- {
86
- _vmrssUsageAfter = vmrss;
87
- _vmsizeUsageAfter = vmsize;
88
- }
89
-
90
78
  private:
91
79
  FlowDDA* flowDDA;
92
80
  ContextDDA* contextDDA;
@@ -110,11 +98,6 @@ private:
110
98
  u32_t _NumOfConstantPtr;
111
99
  u32_t _NumOfBlackholePtr;
112
100
 
113
- u32_t _vmrssUsageBefore;
114
- u32_t _vmrssUsageAfter;
115
- u32_t _vmsizeUsageBefore;
116
- u32_t _vmsizeUsageAfter;
117
-
118
101
  double _AvgNumOfDPMAtSVFGNode;
119
102
  u32_t _MaxNumOfDPMAtSVFGNode;
120
103
 
@@ -76,4 +76,5 @@ enum hclust_fast_methods
76
76
  HCLUST_METHOD_SVF_BEST = 4
77
77
  };
78
78
 
79
+
79
80
  #endif
@@ -79,6 +79,7 @@ public:
79
79
  }
80
80
  //@}
81
81
 
82
+
82
83
  private:
83
84
  Set<BranchCondition> brConditions;
84
85
  };
@@ -113,6 +114,7 @@ public:
113
114
  return _icfgNode;
114
115
  }
115
116
 
117
+
116
118
  private:
117
119
  const ICFGNode *_icfgNode;
118
120
  };
@@ -140,6 +142,7 @@ private:
140
142
 
141
143
  }
142
144
 
145
+
143
146
  public:
144
147
  /// Singleton design here to make sure we only have one instance during any analysis
145
148
  //@{
@@ -376,6 +376,7 @@ public:
376
376
  return hasGNode(id);
377
377
  }
378
378
 
379
+
379
380
  bool hasCFBasicBlockEdge(CFBasicBlockNode *src, CFBasicBlockNode *dst, ICFGEdge *icfgEdge)
380
381
  {
381
382
  CFBasicBlockEdge edge(src, dst, icfgEdge);
@@ -435,6 +436,7 @@ public:
435
436
  _totalCFBasicBlockNode--;
436
437
  }
437
438
 
439
+
438
440
  /// Remove node from nodeID
439
441
  inline bool removeCFBBNode(NodeID id)
440
442
  {
@@ -466,6 +468,7 @@ public:
466
468
 
467
469
  }
468
470
 
471
+
469
472
  namespace SVF
470
473
  {
471
474
  /* !
@@ -71,6 +71,7 @@ public:
71
71
  }
72
72
  };
73
73
 
74
+
74
75
  typedef GenericNode<CFLNode,CFLEdge> GenericCFLNodeTy;
75
76
  class CFLNode: public GenericCFLNodeTy
76
77
  {
@@ -73,6 +73,7 @@ protected:
73
73
  CHGKind kind;
74
74
  };
75
75
 
76
+
76
77
  typedef GenericEdge<CHNode> GenericCHEdgeTy;
77
78
  class CHEdge: public GenericCHEdgeTy
78
79
  {
@@ -313,6 +314,7 @@ public:
313
314
  return chg->getKind() == Standard;
314
315
  }
315
316
 
317
+
316
318
  private:
317
319
  SVFModule* svfMod;
318
320
  u32_t classNum;
@@ -348,8 +350,8 @@ struct GenericGraphTraits<SVF::CHNode*>
348
350
  /// for inverse traversal.
349
351
  template <>
350
352
  struct GenericGraphTraits<Inverse<SVF::CHNode*>>
351
- : public GenericGraphTraits<
352
- Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
353
+ : public GenericGraphTraits<
354
+ Inverse<SVF::GenericNode<SVF::CHNode, SVF::CHEdge>*>>
353
355
  {
354
356
  };
355
357
 
@@ -67,6 +67,8 @@ protected:
67
67
 
68
68
  void destroy();
69
69
 
70
+ void clearSolitaries(); // remove nodes that are neither pointers nor connected with any edge
71
+
70
72
  SVFStmt::SVFStmtSetTy& getPAGEdgeSet(SVFStmt::PEDGEK kind)
71
73
  {
72
74
  return pag->getPTASVFStmtSet(kind);