svf-lib 1.0.1650 → 1.0.1652
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/SVFIR2ItvExeState.h +5 -5
- package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
- package/SVF-osx/svf/include/AbstractExecution/BoundedZ3Expr.h +4 -4
- package/SVF-osx/svf/include/AbstractExecution/IntervalValue.h +19 -19
- package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -71,23 +71,23 @@ public:
|
|
|
71
71
|
void narrowVAddrs(IntervalExeState &lhs, const IntervalExeState &rhs);
|
|
72
72
|
|
|
73
73
|
/// Return the field address given a pointer points to a struct object and an offset
|
|
74
|
-
VAddrs getGepObjAddress(u32_t pointer,
|
|
74
|
+
VAddrs getGepObjAddress(u32_t pointer, APOffset offset);
|
|
75
75
|
|
|
76
76
|
/// Return the byte offset from one gep param offset
|
|
77
|
-
std::pair<
|
|
77
|
+
std::pair<APOffset, APOffset> getBytefromGepTypePair(const AccessPath::VarAndGepTypePair& gep_pair, const GepStmt *gep, APOffset elem_bytesize);
|
|
78
78
|
|
|
79
79
|
/// Return the Index offset from one gep param offset
|
|
80
|
-
std::pair<
|
|
80
|
+
std::pair<APOffset, APOffset> getIndexfromGepTypePair(const AccessPath::VarAndGepTypePair& gep_pair, const GepStmt *gep);
|
|
81
81
|
|
|
82
82
|
/// Return the byte offset expression of a GepStmt
|
|
83
83
|
/// elemBytesize is the element byte size of an static alloc or heap alloc array
|
|
84
84
|
/// e.g. GepStmt* gep = **,
|
|
85
85
|
/// s32_t elemBytesize = LLVMUtil::SVFType2ByteSize(gep->getRHSVar()->getValue()->getType());
|
|
86
86
|
/// std::pair<s32_t, s32_t> byteOffset = getGepByteOffset(gep, elemBytesize);
|
|
87
|
-
std::pair<
|
|
87
|
+
std::pair<APOffset, APOffset> getGepByteOffset(const GepStmt *gep, APOffset elemBytesize);
|
|
88
88
|
|
|
89
89
|
/// Return the offset expression of a GepStmt
|
|
90
|
-
std::pair<
|
|
90
|
+
std::pair<APOffset, APOffset> getGepOffset(const GepStmt *gep);
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
static z3::context &getContext()
|
|
Binary file
|
|
Binary file
|
|
@@ -51,7 +51,7 @@ 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
|
|
|
@@ -345,13 +345,13 @@ public:
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
/// Return Numeral
|
|
348
|
-
inline
|
|
348
|
+
inline s64_t getNumeral() const
|
|
349
349
|
{
|
|
350
350
|
if (is_numeral())
|
|
351
351
|
{
|
|
352
352
|
int64_t i;
|
|
353
353
|
if (getExpr().is_numeral_i64(i))
|
|
354
|
-
return get_numeral_int64();
|
|
354
|
+
return (s64_t)get_numeral_int64();
|
|
355
355
|
else
|
|
356
356
|
{
|
|
357
357
|
return (getExpr() < 0).simplify().is_true() ? INT64_MIN : INT64_MAX;
|
|
@@ -372,7 +372,7 @@ public:
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
|
|
375
|
+
s64_t bvLen() const;
|
|
376
376
|
//%}
|
|
377
377
|
}; // end class ConZ3Expr
|
|
378
378
|
} // end namespace SVF
|
|
@@ -94,13 +94,13 @@ public:
|
|
|
94
94
|
explicit IntervalValue() : AbstractValue(AbstractValue::IntervalK), _lb(minus_infinity()), _ub(plus_infinity()) {}
|
|
95
95
|
|
|
96
96
|
/// Create the IntervalValue [n, n]
|
|
97
|
-
explicit IntervalValue(
|
|
97
|
+
explicit IntervalValue(s64_t n) : AbstractValue(AbstractValue::IntervalK), _lb(n), _ub(n) {}
|
|
98
98
|
|
|
99
|
-
explicit IntervalValue(s32_t n) : IntervalValue((
|
|
99
|
+
explicit IntervalValue(s32_t n) : IntervalValue((s64_t) n) {}
|
|
100
100
|
|
|
101
|
-
explicit IntervalValue(u32_t n) : IntervalValue((
|
|
101
|
+
explicit IntervalValue(u32_t n) : IntervalValue((s64_t) n) {}
|
|
102
102
|
|
|
103
|
-
explicit IntervalValue(double n) : IntervalValue((
|
|
103
|
+
explicit IntervalValue(double n) : IntervalValue((s64_t) n) {}
|
|
104
104
|
|
|
105
105
|
explicit IntervalValue(NumericLiteral n) : IntervalValue(n, n) {}
|
|
106
106
|
|
|
@@ -108,15 +108,15 @@ public:
|
|
|
108
108
|
explicit IntervalValue(NumericLiteral lb, NumericLiteral ub) : AbstractValue(AbstractValue::IntervalK),
|
|
109
109
|
_lb(std::move(lb)), _ub(std::move(ub)) {}
|
|
110
110
|
|
|
111
|
-
explicit IntervalValue(
|
|
111
|
+
explicit IntervalValue(s64_t lb, s64_t ub) : IntervalValue(NumericLiteral(lb), NumericLiteral(ub)) {}
|
|
112
112
|
|
|
113
|
-
explicit IntervalValue(double lb, double ub) : IntervalValue(NumericLiteral((
|
|
113
|
+
explicit IntervalValue(double lb, double ub) : IntervalValue(NumericLiteral((s64_t) lb), NumericLiteral((s64_t) ub)) {}
|
|
114
114
|
|
|
115
|
-
explicit IntervalValue(s32_t lb, s32_t ub) : IntervalValue((
|
|
115
|
+
explicit IntervalValue(s32_t lb, s32_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
116
116
|
|
|
117
|
-
explicit IntervalValue(u32_t lb, u32_t ub) : IntervalValue((
|
|
117
|
+
explicit IntervalValue(u32_t lb, u32_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
118
118
|
|
|
119
|
-
explicit IntervalValue(u64_t lb, u64_t ub) : IntervalValue((
|
|
119
|
+
explicit IntervalValue(u64_t lb, u64_t ub) : IntervalValue((s64_t) lb, (s64_t) ub) {}
|
|
120
120
|
|
|
121
121
|
/// Copy constructor
|
|
122
122
|
IntervalValue(const IntervalValue &) = default;
|
|
@@ -259,7 +259,7 @@ public:
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
/// Return
|
|
262
|
-
|
|
262
|
+
s64_t getNumeral() const
|
|
263
263
|
{
|
|
264
264
|
assert(is_numeral() && "this IntervalValue is not numeral");
|
|
265
265
|
return _lb.getNumeral();
|
|
@@ -797,15 +797,15 @@ inline IntervalValue operator&(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
797
797
|
}
|
|
798
798
|
else if (lhs.lb().getNumeral() >= 0 && rhs.lb().getNumeral() >= 0)
|
|
799
799
|
{
|
|
800
|
-
return IntervalValue((
|
|
800
|
+
return IntervalValue((s64_t) 0, min(lhs.ub(), rhs.ub()));
|
|
801
801
|
}
|
|
802
802
|
else if (lhs.lb().getNumeral() >= 0)
|
|
803
803
|
{
|
|
804
|
-
return IntervalValue((
|
|
804
|
+
return IntervalValue((s64_t) 0, lhs.ub());
|
|
805
805
|
}
|
|
806
806
|
else if (rhs.lb().getNumeral() >= 0)
|
|
807
807
|
{
|
|
808
|
-
return IntervalValue((
|
|
808
|
+
return IntervalValue((s64_t) 0, rhs.ub());
|
|
809
809
|
}
|
|
810
810
|
else
|
|
811
811
|
{
|
|
@@ -832,9 +832,9 @@ inline IntervalValue operator|(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
832
832
|
else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
|
|
833
833
|
rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
|
|
834
834
|
{
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
return IntervalValue((
|
|
835
|
+
s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
|
|
836
|
+
s64_t ub = next_power_of_2(s64_t(m+1));
|
|
837
|
+
return IntervalValue((s64_t) 0, (s64_t) ub);
|
|
838
838
|
}
|
|
839
839
|
else
|
|
840
840
|
{
|
|
@@ -861,9 +861,9 @@ inline IntervalValue operator^(const IntervalValue &lhs, const IntervalValue &rh
|
|
|
861
861
|
else if (lhs.lb().getNumeral() >= 0 && !lhs.ub().is_infinity() &&
|
|
862
862
|
rhs.lb().getNumeral() >= 0 && !rhs.ub().is_infinity())
|
|
863
863
|
{
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
return IntervalValue((
|
|
864
|
+
s64_t m = std::max(lhs.ub().getNumeral(), rhs.ub().getNumeral());
|
|
865
|
+
s64_t ub = next_power_of_2(s64_t(m+1));
|
|
866
|
+
return IntervalValue((s64_t) 0, (s64_t) ub);
|
|
867
867
|
}
|
|
868
868
|
else
|
|
869
869
|
{
|
|
@@ -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
|
}
|