svf-lib 1.0.1910 → 1.0.1911

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.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -53,6 +53,8 @@ public:
53
53
 
54
54
  BoundedZ3Expr(s64_t i) : Z3Expr(getContext().int_val((int64_t)i)) {}
55
55
 
56
+ BoundedZ3Expr(double i) : Z3Expr(getContext().real_val(std::to_string(i).c_str())) {}
57
+
56
58
  BoundedZ3Expr(const BoundedZ3Expr &z3Expr) : Z3Expr(z3Expr) {}
57
59
 
58
60
  inline BoundedZ3Expr &operator=(const BoundedZ3Expr &rhs)
@@ -101,7 +101,7 @@ public:
101
101
 
102
102
  explicit IntervalValue(u32_t n) : IntervalValue((s64_t) n) {}
103
103
 
104
- explicit IntervalValue(double n) : IntervalValue((s64_t) n) {}
104
+ explicit IntervalValue(double n) : AbstractValue(AbstractValue::IntervalK), _lb(n), _ub(n) {}
105
105
 
106
106
  explicit IntervalValue(NumericLiteral n) : IntervalValue(n, n) {}
107
107
 
@@ -134,6 +134,12 @@ public:
134
134
  return _n.getNumeral();
135
135
  }
136
136
 
137
+ /// Return Expr
138
+ inline Z3Expr getExpr() const
139
+ {
140
+ return _n.getExpr();
141
+ }
142
+
137
143
  inline double getRealNumeral() const
138
144
  {
139
145
  return _n.getRealNumeral();
@@ -54,7 +54,7 @@ public:
54
54
 
55
55
  IntervalESBase abstract_consequence(const IntervalESBase &lower, const IntervalESBase &upper, const IntervalESBase &domain) const;
56
56
 
57
- IntervalESBase beta(const Map<u32_t, double> &sigma, const IntervalESBase &exeState) const;
57
+ IntervalESBase beta(const Map<u32_t, s32_t> &sigma, const IntervalESBase &exeState) const;
58
58
 
59
59
 
60
60
  /// Return Z3 expression lazily based on SVFVar ID
@@ -274,6 +274,9 @@ public:
274
274
  static const Option<bool> RunUncallFuncs;
275
275
 
276
276
  static const Option<bool> ICFGMergeAdjacentNodes;
277
+
278
+ // float precision for symbolic abstraction
279
+ static const Option<u32_t> AEPrecision;
277
280
  };
278
281
  } // namespace SVF
279
282
 
@@ -44,8 +44,7 @@ public:
44
44
  private:
45
45
  z3::expr e;
46
46
 
47
- Z3Expr(float f); // placeholder don't support floating point expression
48
- Z3Expr(double f); // placeholder don't support floating point expression
47
+
49
48
 
50
49
  public:
51
50
 
@@ -65,6 +64,14 @@ public:
65
64
  {
66
65
  }
67
66
 
67
+ Z3Expr(float f) : Z3Expr((double) f)
68
+ {
69
+ }
70
+
71
+ Z3Expr(double f): e(getContext().real_val(std::to_string(f).c_str()))
72
+ {
73
+ }
74
+
68
75
  virtual ~Z3Expr() = default;
69
76
 
70
77
  inline Z3Expr &operator=(const Z3Expr &rhs)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.1910",
3
+ "version": "1.0.1911",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {