svf-lib 1.0.992 → 1.0.993

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 (70) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/CFL/CFGNormalizer.h +6 -3
  3. package/SVF-linux/include/CFL/CFLAlias.h +26 -15
  4. package/SVF-linux/include/CFL/CFLGrammar.h +30 -16
  5. package/SVF-linux/include/CFL/CFLSolver.h +9 -5
  6. package/SVF-linux/include/CFL/GrammarBuilder.h +10 -7
  7. package/SVF-linux/include/CUDD/cudd.h +20 -11
  8. package/SVF-linux/include/CUDD/cuddInt.h +48 -31
  9. package/SVF-linux/include/CUDD/epd.h +35 -29
  10. package/SVF-linux/include/CUDD/mtr.h +4 -3
  11. package/SVF-linux/include/CUDD/st.h +7 -4
  12. package/SVF-linux/include/CUDD/util.h +6 -6
  13. package/SVF-linux/include/FastCluster/fastcluster.h +13 -12
  14. package/SVF-linux/include/Graphs/CFLGraph.h +16 -10
  15. package/SVF-linux/include/Graphs/CHG.h +2 -2
  16. package/SVF-linux/include/Graphs/ConsG.h +2 -1
  17. package/SVF-linux/include/Graphs/GenericGraph.h +3 -3
  18. package/SVF-linux/include/Graphs/ICFG.h +2 -2
  19. package/SVF-linux/include/Graphs/ICFGEdge.h +16 -9
  20. package/SVF-linux/include/Graphs/ICFGNode.h +2 -2
  21. package/SVF-linux/include/Graphs/IRGraph.h +10 -6
  22. package/SVF-linux/include/Graphs/PTACallGraph.h +1 -1
  23. package/SVF-linux/include/Graphs/SVFG.h +4 -3
  24. package/SVF-linux/include/Graphs/SVFGNode.h +14 -8
  25. package/SVF-linux/include/Graphs/ThreadCallGraph.h +4 -2
  26. package/SVF-linux/include/Graphs/VFG.h +45 -39
  27. package/SVF-linux/include/Graphs/VFGNode.h +8 -4
  28. package/SVF-linux/include/MSSA/MemSSA.h +1 -1
  29. package/SVF-linux/include/MTA/FSMPTA.h +55 -44
  30. package/SVF-linux/include/MTA/LockAnalysis.h +11 -9
  31. package/SVF-linux/include/MTA/LockResultValidator.h +64 -54
  32. package/SVF-linux/include/MTA/MHP.h +17 -13
  33. package/SVF-linux/include/MTA/MTAResultValidator.h +24 -20
  34. package/SVF-linux/include/MTA/PCG.h +9 -7
  35. package/SVF-linux/include/MTA/TCT.h +27 -22
  36. package/SVF-linux/include/MemoryModel/LocationSet.h +5 -3
  37. package/SVF-linux/include/MemoryModel/PersistentPointsToCache.h +28 -13
  38. package/SVF-linux/include/MemoryModel/PersistentPointsToDS.h +2 -2
  39. package/SVF-linux/include/MemoryModel/PointerAnalysis.h +5 -4
  40. package/SVF-linux/include/MemoryModel/PointsTo.h +8 -2
  41. package/SVF-linux/include/MemoryModel/SVFIR.h +6 -5
  42. package/SVF-linux/include/MemoryModel/SVFStatements.h +65 -45
  43. package/SVF-linux/include/MemoryModel/SVFVariables.h +6 -5
  44. package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +18 -15
  45. package/SVF-linux/include/SABER/PathCondAllocator.h +14 -7
  46. package/SVF-linux/include/SABER/ProgSlice.h +2 -1
  47. package/SVF-linux/include/SABER/SaberSVFGBuilder.h +1 -1
  48. package/SVF-linux/include/SABER/SrcSnkDDA.h +8 -4
  49. package/SVF-linux/include/SVF-FE/CHGBuilder.h +4 -2
  50. package/SVF-linux/include/SVF-FE/DataFlowUtil.h +10 -9
  51. package/SVF-linux/include/SVF-FE/IRAnnotator.h +8 -8
  52. package/SVF-linux/include/SVF-FE/LLVMModule.h +13 -12
  53. package/SVF-linux/include/SVF-FE/LLVMUtil.h +4 -4
  54. package/SVF-linux/include/SVF-FE/SVFIRBuilder.h +13 -9
  55. package/SVF-linux/include/SVF-FE/SymbolTableBuilder.h +3 -2
  56. package/SVF-linux/include/Util/BDDExpr.h +32 -16
  57. package/SVF-linux/include/Util/BasicTypes.h +77 -25
  58. package/SVF-linux/include/Util/CoreBitVector.h +2 -1
  59. package/SVF-linux/include/Util/CxtStmt.h +37 -27
  60. package/SVF-linux/include/Util/ExeState.h +42 -22
  61. package/SVF-linux/include/Util/ExtAPI.h +1 -1
  62. package/SVF-linux/include/Util/NodeIDAllocator.h +7 -4
  63. package/SVF-linux/include/Util/Options.h +3 -3
  64. package/SVF-linux/include/Util/SVFBasicTypes.h +49 -40
  65. package/SVF-linux/include/Util/SVFModule.h +5 -5
  66. package/SVF-linux/include/Util/SVFUtil.h +12 -9
  67. package/SVF-linux/include/Util/Z3Expr.h +191 -144
  68. package/SVF-linux/include/WPA/Andersen.h +11 -11
  69. package/SVF-linux/include/WPA/VersionedFlowSensitive.h +4 -1
  70. package/package.json +1 -1
@@ -32,202 +32,249 @@
32
32
  #include "z3++.h"
33
33
  #include "Util/SVFBasicTypes.h"
34
34
 
35
- namespace SVF {
35
+ namespace SVF
36
+ {
36
37
 
37
- class Z3Expr {
38
- public:
39
- static z3::context *ctx;
38
+ class Z3Expr
39
+ {
40
+ public:
41
+ static z3::context *ctx;
40
42
 
41
- private:
42
- z3::expr e;
43
+ private:
44
+ z3::expr e;
43
45
 
44
- Z3Expr(float f); // placeholder don't support floating point expression
45
- Z3Expr(double f); // placeholder don't support floating point expression
46
+ Z3Expr(float f); // placeholder don't support floating point expression
47
+ Z3Expr(double f); // placeholder don't support floating point expression
46
48
 
47
- public:
49
+ public:
48
50
 
49
- Z3Expr() : e(nullExpr()) {
50
- }
51
+ Z3Expr() : e(nullExpr())
52
+ {
53
+ }
51
54
 
52
- Z3Expr(const z3::expr &_e) : e(_e) {
53
- }
55
+ Z3Expr(const z3::expr &_e) : e(_e)
56
+ {
57
+ }
54
58
 
55
- Z3Expr(int i) : e(getContext().int_val(i)) {
56
- }
59
+ Z3Expr(int i) : e(getContext().int_val(i))
60
+ {
61
+ }
57
62
 
58
- Z3Expr(const Z3Expr &z3Expr) : e(z3Expr.getExpr()) {
59
- }
63
+ Z3Expr(const Z3Expr &z3Expr) : e(z3Expr.getExpr())
64
+ {
65
+ }
60
66
 
61
- virtual ~Z3Expr() = default;
67
+ virtual ~Z3Expr() = default;
62
68
 
63
- inline Z3Expr &operator=(const Z3Expr &rhs) {
64
- if (this->id() != rhs.id()) {
65
- e = rhs.getExpr();
66
- }
67
- return *this;
69
+ inline Z3Expr &operator=(const Z3Expr &rhs)
70
+ {
71
+ if (this->id() != rhs.id())
72
+ {
73
+ e = rhs.getExpr();
68
74
  }
75
+ return *this;
76
+ }
69
77
 
70
- const z3::expr &getExpr() const {
71
- return e;
72
- }
78
+ const z3::expr &getExpr() const
79
+ {
80
+ return e;
81
+ }
73
82
 
74
- /// Get z3 context, singleton design here to make sure we only have one context
75
- static z3::context &getContext() {
76
- if (ctx == nullptr) {
77
- ctx = new z3::context();
78
- }
79
- return *ctx;
83
+ /// Get z3 context, singleton design here to make sure we only have one context
84
+ static z3::context &getContext()
85
+ {
86
+ if (ctx == nullptr)
87
+ {
88
+ ctx = new z3::context();
80
89
  }
90
+ return *ctx;
91
+ }
81
92
 
82
- /// release z3 context
83
- static void releaseContext() {
84
- delete ctx;
85
- ctx = nullptr;
86
- }
93
+ /// release z3 context
94
+ static void releaseContext()
95
+ {
96
+ delete ctx;
97
+ ctx = nullptr;
98
+ }
87
99
 
88
- /// null expression
89
- static z3::expr nullExpr() {
90
- return getContext().int_const("null");
91
- }
100
+ /// null expression
101
+ static z3::expr nullExpr()
102
+ {
103
+ return getContext().int_const("null");
104
+ }
92
105
 
93
- /// get id
94
- inline u32_t id() const {
95
- return e.id();
96
- }
106
+ /// get id
107
+ inline u32_t id() const
108
+ {
109
+ return e.id();
110
+ }
97
111
 
98
- inline const std::string to_string() const {
99
- return e.to_string();
100
- }
112
+ inline const std::string to_string() const
113
+ {
114
+ return e.to_string();
115
+ }
101
116
 
102
- inline bool is_numeral() const {
103
- return e.is_numeral();
104
- }
117
+ inline bool is_numeral() const
118
+ {
119
+ return e.is_numeral();
120
+ }
105
121
 
106
- inline bool is_bool() const {
107
- return e.is_bool();
108
- }
122
+ inline bool is_bool() const
123
+ {
124
+ return e.is_bool();
125
+ }
109
126
 
110
- inline Z3Expr simplify() const {
111
- return e.simplify();
112
- }
127
+ inline Z3Expr simplify() const
128
+ {
129
+ return e.simplify();
130
+ }
113
131
 
114
- inline int64_t get_numeral_int64() const {
115
- return e.get_numeral_int64();
116
- }
132
+ inline int64_t get_numeral_int64() const
133
+ {
134
+ return e.get_numeral_int64();
135
+ }
117
136
 
118
- inline int get_numeral_int() const {
119
- return e.get_numeral_int();
120
- }
137
+ inline int get_numeral_int() const
138
+ {
139
+ return e.get_numeral_int();
140
+ }
121
141
 
122
- //{% reload operator
123
- friend Z3Expr operator==(const Z3Expr &lhs, const Z3Expr &rhs) {
124
- return lhs.getExpr() == rhs.getExpr();
125
- }
142
+ //{% reload operator
143
+ friend Z3Expr operator==(const Z3Expr &lhs, const Z3Expr &rhs)
144
+ {
145
+ return lhs.getExpr() == rhs.getExpr();
146
+ }
126
147
 
127
- friend Z3Expr operator!=(const Z3Expr &lhs, const Z3Expr &rhs) {
128
- return lhs.getExpr() != rhs.getExpr();
129
- }
148
+ friend Z3Expr operator!=(const Z3Expr &lhs, const Z3Expr &rhs)
149
+ {
150
+ return lhs.getExpr() != rhs.getExpr();
151
+ }
130
152
 
131
- friend Z3Expr operator>(const Z3Expr &lhs, const Z3Expr &rhs) {
132
- return lhs.getExpr() > rhs.getExpr();
133
- }
153
+ friend Z3Expr operator>(const Z3Expr &lhs, const Z3Expr &rhs)
154
+ {
155
+ return lhs.getExpr() > rhs.getExpr();
156
+ }
134
157
 
135
- friend Z3Expr operator<(const Z3Expr &lhs, const Z3Expr &rhs) {
136
- return lhs.getExpr() < rhs.getExpr();
137
- }
158
+ friend Z3Expr operator<(const Z3Expr &lhs, const Z3Expr &rhs)
159
+ {
160
+ return lhs.getExpr() < rhs.getExpr();
161
+ }
138
162
 
139
- friend Z3Expr operator<=(const Z3Expr &lhs, const Z3Expr &rhs) {
140
- return lhs.getExpr() <= rhs.getExpr();
141
- }
163
+ friend Z3Expr operator<=(const Z3Expr &lhs, const Z3Expr &rhs)
164
+ {
165
+ return lhs.getExpr() <= rhs.getExpr();
166
+ }
142
167
 
143
- friend Z3Expr operator>=(const Z3Expr &lhs, const Z3Expr &rhs) {
144
- return lhs.getExpr() >= rhs.getExpr();
145
- }
168
+ friend Z3Expr operator>=(const Z3Expr &lhs, const Z3Expr &rhs)
169
+ {
170
+ return lhs.getExpr() >= rhs.getExpr();
171
+ }
146
172
 
147
- friend Z3Expr operator+(const Z3Expr &lhs, const Z3Expr &rhs) {
148
- return lhs.getExpr() + rhs.getExpr();
149
- }
173
+ friend Z3Expr operator+(const Z3Expr &lhs, const Z3Expr &rhs)
174
+ {
175
+ return lhs.getExpr() + rhs.getExpr();
176
+ }
150
177
 
151
- friend Z3Expr operator-(const Z3Expr &lhs, const Z3Expr &rhs) {
152
- return lhs.getExpr() - rhs.getExpr();
153
- }
178
+ friend Z3Expr operator-(const Z3Expr &lhs, const Z3Expr &rhs)
179
+ {
180
+ return lhs.getExpr() - rhs.getExpr();
181
+ }
154
182
 
155
- friend Z3Expr operator*(const Z3Expr &lhs, const Z3Expr &rhs) {
156
- return lhs.getExpr() * rhs.getExpr();
157
- }
183
+ friend Z3Expr operator*(const Z3Expr &lhs, const Z3Expr &rhs)
184
+ {
185
+ return lhs.getExpr() * rhs.getExpr();
186
+ }
158
187
 
159
- friend Z3Expr operator/(const Z3Expr &lhs, const Z3Expr &rhs) {
160
- return lhs.getExpr() / rhs.getExpr();
161
- }
188
+ friend Z3Expr operator/(const Z3Expr &lhs, const Z3Expr &rhs)
189
+ {
190
+ return lhs.getExpr() / rhs.getExpr();
191
+ }
162
192
 
163
- friend Z3Expr operator%(const Z3Expr &lhs, const Z3Expr &rhs) {
164
- return lhs.getExpr() % rhs.getExpr();
165
- }
193
+ friend Z3Expr operator%(const Z3Expr &lhs, const Z3Expr &rhs)
194
+ {
195
+ return lhs.getExpr() % rhs.getExpr();
196
+ }
166
197
 
167
- friend Z3Expr operator^(const Z3Expr &lhs, const Z3Expr &rhs) {
168
- return lhs.getExpr() ^ rhs.getExpr();
169
- }
198
+ friend Z3Expr operator^(const Z3Expr &lhs, const Z3Expr &rhs)
199
+ {
200
+ return lhs.getExpr() ^ rhs.getExpr();
201
+ }
170
202
 
171
- friend Z3Expr operator&(const Z3Expr &lhs, const Z3Expr &rhs) {
172
- return lhs.getExpr() & rhs.getExpr();
173
- }
203
+ friend Z3Expr operator&(const Z3Expr &lhs, const Z3Expr &rhs)
204
+ {
205
+ return lhs.getExpr() & rhs.getExpr();
206
+ }
174
207
 
175
- friend Z3Expr operator|(const Z3Expr &lhs, const Z3Expr &rhs) {
176
- return lhs.getExpr() | rhs.getExpr();
177
- }
208
+ friend Z3Expr operator|(const Z3Expr &lhs, const Z3Expr &rhs)
209
+ {
210
+ return lhs.getExpr() | rhs.getExpr();
211
+ }
178
212
 
179
- friend Z3Expr ashr(const Z3Expr &lhs, const Z3Expr &rhs) {
180
- return ashr(lhs.getExpr(), rhs.getExpr());
181
- }
213
+ friend Z3Expr ashr(const Z3Expr &lhs, const Z3Expr &rhs)
214
+ {
215
+ return ashr(lhs.getExpr(), rhs.getExpr());
216
+ }
182
217
 
183
- friend Z3Expr shl(const Z3Expr &lhs, const Z3Expr &rhs) {
184
- return shl(lhs.getExpr(), rhs.getExpr());
185
- }
218
+ friend Z3Expr shl(const Z3Expr &lhs, const Z3Expr &rhs)
219
+ {
220
+ return shl(lhs.getExpr(), rhs.getExpr());
221
+ }
186
222
 
187
- friend Z3Expr int2bv(u32_t n, const Z3Expr &e) {
188
- return int2bv(n, e.getExpr());
189
- }
223
+ friend Z3Expr int2bv(u32_t n, const Z3Expr &e)
224
+ {
225
+ return int2bv(n, e.getExpr());
226
+ }
190
227
 
191
- friend Z3Expr bv2int(const Z3Expr &e, bool isSigned) {
192
- return z3::bv2int(e.getExpr(), isSigned);
193
- }
228
+ friend Z3Expr bv2int(const Z3Expr &e, bool isSigned)
229
+ {
230
+ return z3::bv2int(e.getExpr(), isSigned);
231
+ }
194
232
 
195
- friend Z3Expr operator&&(const Z3Expr &lhs, const Z3Expr &rhs) {
196
- return lhs.getExpr() && rhs.getExpr();
197
- }
233
+ friend Z3Expr operator&&(const Z3Expr &lhs, const Z3Expr &rhs)
234
+ {
235
+ return lhs.getExpr() && rhs.getExpr();
236
+ }
198
237
 
199
- friend Z3Expr operator||(const Z3Expr &lhs, const Z3Expr &rhs) {
200
- return lhs.getExpr() || rhs.getExpr();
201
- }
238
+ friend Z3Expr operator||(const Z3Expr &lhs, const Z3Expr &rhs)
239
+ {
240
+ return lhs.getExpr() || rhs.getExpr();
241
+ }
202
242
 
203
- friend Z3Expr operator!(const Z3Expr &lhs) {
204
- return !lhs.getExpr();
205
- }
243
+ friend Z3Expr operator!(const Z3Expr &lhs)
244
+ {
245
+ return !lhs.getExpr();
246
+ }
206
247
 
207
- friend Z3Expr ite(const Z3Expr& cond, const Z3Expr& lhs, const Z3Expr& rhs) {
208
- return ite(cond.getExpr(), lhs.getExpr(), rhs.getExpr());
209
- }
248
+ friend Z3Expr ite(const Z3Expr& cond, const Z3Expr& lhs, const Z3Expr& rhs)
249
+ {
250
+ return ite(cond.getExpr(), lhs.getExpr(), rhs.getExpr());
251
+ }
210
252
 
211
- friend std::ostream &operator<<(std::ostream &out, const Z3Expr &expr) {
212
- out << expr.getExpr();
213
- return out;
214
- }
253
+ friend std::ostream &operator<<(std::ostream &out, const Z3Expr &expr)
254
+ {
255
+ out << expr.getExpr();
256
+ return out;
257
+ }
215
258
 
216
- friend bool eq(const Z3Expr &lhs, const Z3Expr &rhs) {
217
- return eq(lhs.getExpr(), rhs.getExpr());
218
- }
259
+ friend bool eq(const Z3Expr &lhs, const Z3Expr &rhs)
260
+ {
261
+ return eq(lhs.getExpr(), rhs.getExpr());
262
+ }
219
263
 
220
- z3::sort get_sort() const {
221
- return getExpr().get_sort();
222
- }
223
- //%}
224
- };
264
+ z3::sort get_sort() const
265
+ {
266
+ return getExpr().get_sort();
267
+ }
268
+ //%}
269
+ };
225
270
  }
226
271
 
227
272
  /// Specialise hash for AbsCxtDPItem.
228
273
  template<>
229
- struct std::hash<SVF::Z3Expr> {
230
- size_t operator()(const SVF::Z3Expr &z3Expr) const {
274
+ struct std::hash<SVF::Z3Expr>
275
+ {
276
+ size_t operator()(const SVF::Z3Expr &z3Expr) const
277
+ {
231
278
  return z3Expr.id();
232
279
  }
233
280
  };
@@ -85,16 +85,16 @@ public:
85
85
  static inline bool classof(const PointerAnalysis *pta)
86
86
  {
87
87
  return ( pta->getAnalysisTy() == Andersen_BASE
88
- || pta->getAnalysisTy() == Andersen_WPA
89
- || pta->getAnalysisTy() == AndersenLCD_WPA
90
- || pta->getAnalysisTy() == AndersenHCD_WPA
91
- || pta->getAnalysisTy() == AndersenHLCD_WPA
92
- || pta->getAnalysisTy() == AndersenWaveDiff_WPA
93
- || pta->getAnalysisTy() == AndersenWaveDiffWithType_WPA
94
- || pta->getAnalysisTy() == AndersenSCD_WPA
95
- || pta->getAnalysisTy() == AndersenSFR_WPA
96
- || pta->getAnalysisTy() == TypeCPP_WPA
97
- || pta->getAnalysisTy() == Steensgaard_WPA);
88
+ || pta->getAnalysisTy() == Andersen_WPA
89
+ || pta->getAnalysisTy() == AndersenLCD_WPA
90
+ || pta->getAnalysisTy() == AndersenHCD_WPA
91
+ || pta->getAnalysisTy() == AndersenHLCD_WPA
92
+ || pta->getAnalysisTy() == AndersenWaveDiff_WPA
93
+ || pta->getAnalysisTy() == AndersenWaveDiffWithType_WPA
94
+ || pta->getAnalysisTy() == AndersenSCD_WPA
95
+ || pta->getAnalysisTy() == AndersenSFR_WPA
96
+ || pta->getAnalysisTy() == TypeCPP_WPA
97
+ || pta->getAnalysisTy() == Steensgaard_WPA);
98
98
  }
99
99
  //@}
100
100
 
@@ -190,7 +190,7 @@ public:
190
190
  static inline bool classof(const PointerAnalysis *pta)
191
191
  {
192
192
  return (pta->getAnalysisTy() == Andersen_WPA
193
- || pta->getAnalysisTy() == AndersenLCD_WPA
193
+ || pta->getAnalysisTy() == AndersenLCD_WPA
194
194
  || pta->getAnalysisTy() == AndersenHCD_WPA
195
195
  || pta->getAnalysisTy() == AndersenHLCD_WPA
196
196
  || pta->getAnalysisTy() == AndersenWaveDiff_WPA
@@ -99,7 +99,10 @@ protected:
99
99
  virtual void updateConnectedNodes(const SVFGEdgeSetTy& newEdges) override;
100
100
 
101
101
  /// Override to do nothing. Instead, we will use propagateVersion when necessary.
102
- virtual bool propAlongIndirectEdge(const IndirectSVFGEdge*) override { return false; }
102
+ virtual bool propAlongIndirectEdge(const IndirectSVFGEdge*) override
103
+ {
104
+ return false;
105
+ }
103
106
 
104
107
  /// Override since we want to assign different weights based on versioning.
105
108
  virtual void cluster(void) override;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.992",
3
+ "version": "1.0.993",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {