svf-lib 1.0.1652 → 1.0.1653
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.
- package/SVF-linux/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-linux/svf/include/AbstractExecution/BoundedZ3Expr.h +4 -5
- package/SVF-linux/svf/include/AbstractExecution/IntervalValue.h +19 -19
- package/SVF-linux/svf/include/AbstractExecution/NumericLiteral.h +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -51,11 +51,10 @@ public:
|
|
|
51
51
|
|
|
52
52
|
BoundedZ3Expr(s32_t i) : Z3Expr(i) {}
|
|
53
53
|
|
|
54
|
-
BoundedZ3Expr(
|
|
54
|
+
BoundedZ3Expr(s64_t i) : Z3Expr(getContext().int_val((int64_t)i)) {}
|
|
55
55
|
|
|
56
56
|
BoundedZ3Expr(const BoundedZ3Expr &z3Expr) : Z3Expr(z3Expr) {}
|
|
57
57
|
|
|
58
|
-
|
|
59
58
|
inline BoundedZ3Expr &operator=(const BoundedZ3Expr &rhs)
|
|
60
59
|
{
|
|
61
60
|
Z3Expr::operator=(rhs);
|
|
@@ -347,13 +346,13 @@ public:
|
|
|
347
346
|
}
|
|
348
347
|
|
|
349
348
|
/// Return Numeral
|
|
350
|
-
inline
|
|
349
|
+
inline s64_t getNumeral() const
|
|
351
350
|
{
|
|
352
351
|
if (is_numeral())
|
|
353
352
|
{
|
|
354
353
|
int64_t i;
|
|
355
354
|
if (getExpr().is_numeral_i64(i))
|
|
356
|
-
return get_numeral_int64();
|
|
355
|
+
return (s64_t)get_numeral_int64();
|
|
357
356
|
else
|
|
358
357
|
{
|
|
359
358
|
return (getExpr() < 0).simplify().is_true() ? INT64_MIN : INT64_MAX;
|
|
@@ -374,7 +373,7 @@ public:
|
|
|
374
373
|
}
|
|
375
374
|
}
|
|
376
375
|
|
|
377
|
-
|
|
376
|
+
s64_t bvLen() const;
|
|
378
377
|
//%}
|
|
379
378
|
}; // end class ConZ3Expr
|
|
380
379
|
} // end namespace SVF
|
|
@@ -95,13 +95,13 @@ public:
|
|
|
95
95
|
explicit IntervalValue() : AbstractValue(AbstractValue::IntervalK), _lb(minus_infinity()), _ub(plus_infinity()) {}
|
|
96
96
|
|
|
97
97
|
/// Create the IntervalValue [n, n]
|
|
98
|
-
explicit IntervalValue(
|
|
98
|
+
explicit IntervalValue(s64_t n) : AbstractValue(AbstractValue::IntervalK), _lb(n), _ub(n) {}
|
|
99
99
|
|
|
100
|
-
explicit IntervalValue(s32_t n) : IntervalValue((
|
|
100
|
+
explicit IntervalValue(s32_t n) : IntervalValue((s64_t) n) {}
|
|
101
101
|
|
|
102
|
-
explicit IntervalValue(u32_t n) : IntervalValue((
|
|
102
|
+
explicit IntervalValue(u32_t n) : IntervalValue((s64_t) n) {}
|
|
103
103
|
|
|
104
|
-
explicit IntervalValue(double n) : IntervalValue((
|
|
104
|
+
explicit IntervalValue(double n) : IntervalValue((s64_t) n) {}
|
|
105
105
|
|
|
106
106
|
explicit IntervalValue(NumericLiteral n) : IntervalValue(n, n) {}
|
|
107
107
|
|
|
@@ -109,15 +109,15 @@ public:
|
|
|
109
109
|
explicit IntervalValue(NumericLiteral lb, NumericLiteral ub) : AbstractValue(AbstractValue::IntervalK),
|
|
110
110
|
_lb(std::move(lb)), _ub(std::move(ub)) {}
|
|
111
111
|
|
|
112
|
-
explicit IntervalValue(
|
|
112
|
+
explicit IntervalValue(s64_t lb, s64_t ub) : IntervalValue(NumericLiteral(lb), NumericLiteral(ub)) {}
|
|
113
113
|
|
|
114
|
-
explicit IntervalValue(double lb, double ub) : IntervalValue(NumericLiteral((
|
|
114
|
+
explicit IntervalValue(double lb, double ub) : IntervalValue(NumericLiteral((s64_t) lb), NumericLiteral((s64_t) ub)) {}
|
|
115
115
|
|
|
116
|
-
explicit IntervalValue(s32_t lb, s32_t ub) : IntervalValue((
|
|
116
|
+
explicit IntervalValue(s32_t lb, s32_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
117
117
|
|
|
118
|
-
explicit IntervalValue(u32_t lb, u32_t ub) : IntervalValue((
|
|
118
|
+
explicit IntervalValue(u32_t lb, u32_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
119
119
|
|
|
120
|
-
explicit IntervalValue(u64_t lb, u64_t ub) : IntervalValue((
|
|
120
|
+
explicit IntervalValue(u64_t lb, u64_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
121
121
|
|
|
122
122
|
/// Copy constructor
|
|
123
123
|
IntervalValue(const IntervalValue &) = default;
|
|
@@ -260,7 +260,7 @@ public:
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
/// Return
|
|
263
|
-
|
|
263
|
+
s64_t getNumeral() const
|
|
264
264
|
{
|
|
265
265
|
assert(is_numeral() && "this IntervalValue is not numeral");
|
|
266
266
|
return _lb.getNumeral();
|
|
@@ -800,15 +800,15 @@ inline IntervalValue operator&(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
800
800
|
}
|
|
801
801
|
else if (lhs.lb().getNumeral() >= 0 && rhs.lb().getNumeral() >= 0)
|
|
802
802
|
{
|
|
803
|
-
return IntervalValue((
|
|
803
|
+
return IntervalValue((s64_t) 0, min(lhs.ub(), rhs.ub()));
|
|
804
804
|
}
|
|
805
805
|
else if (lhs.lb().getNumeral() >= 0)
|
|
806
806
|
{
|
|
807
|
-
return IntervalValue((
|
|
807
|
+
return IntervalValue((s64_t) 0, lhs.ub());
|
|
808
808
|
}
|
|
809
809
|
else if (rhs.lb().getNumeral() >= 0)
|
|
810
810
|
{
|
|
811
|
-
return IntervalValue((
|
|
811
|
+
return IntervalValue((s64_t) 0, rhs.ub());
|
|
812
812
|
}
|
|
813
813
|
else
|
|
814
814
|
{
|
|
@@ -835,9 +835,9 @@ inline IntervalValue operator|(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
835
835
|
else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
|
|
836
836
|
rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
|
|
837
837
|
{
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
return IntervalValue((
|
|
838
|
+
s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
|
|
839
|
+
s64_t ub = next_power_of_2(s64_t(m+1));
|
|
840
|
+
return IntervalValue((s64_t) 0, (s64_t) ub);
|
|
841
841
|
}
|
|
842
842
|
else
|
|
843
843
|
{
|
|
@@ -864,9 +864,9 @@ inline IntervalValue operator^(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
864
864
|
else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
|
|
865
865
|
rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
|
|
866
866
|
{
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
return IntervalValue((
|
|
867
|
+
s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
|
|
868
|
+
s64_t ub = next_power_of_2(s64_t(m+1));
|
|
869
|
+
return IntervalValue((s64_t) 0, (s64_t) ub);
|
|
870
870
|
}
|
|
871
871
|
else
|
|
872
872
|
{
|
|
@@ -54,7 +54,7 @@ public:
|
|
|
54
54
|
|
|
55
55
|
NumericLiteral(s32_t i) : _n(i) {}
|
|
56
56
|
|
|
57
|
-
NumericLiteral(
|
|
57
|
+
NumericLiteral(s64_t i) : _n(i) {}
|
|
58
58
|
|
|
59
59
|
NumericLiteral(BoundedZ3Expr z3Expr) : _n(std::move(z3Expr)) {}
|
|
60
60
|
|
|
@@ -117,7 +117,7 @@ public:
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
/// Return Numeral
|
|
120
|
-
inline
|
|
120
|
+
inline s64_t getNumeral() const
|
|
121
121
|
{
|
|
122
122
|
return _n.getNumeral();
|
|
123
123
|
}
|