svf-lib 1.0.1756 → 1.0.1757
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-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/IntervalExeState.h +3 -2
- package/SVF-osx/svf/include/AbstractExecution/NumericLiteral.h +10 -0
- package/SVF-osx/svf/include/AbstractExecution/RelationSolver.h +20 -7
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
@@ -55,6 +55,7 @@ namespace SVF
|
|
|
55
55
|
class IntervalExeState : public ExeState
|
|
56
56
|
{
|
|
57
57
|
friend class SVFIR2ItvExeState;
|
|
58
|
+
friend class RelationSolver;
|
|
58
59
|
|
|
59
60
|
public:
|
|
60
61
|
typedef Map<u32_t, IntervalValue> VarToValMap;
|
|
@@ -112,7 +113,7 @@ public:
|
|
|
112
113
|
}
|
|
113
114
|
|
|
114
115
|
/// Set all value bottom
|
|
115
|
-
IntervalExeState bottom()
|
|
116
|
+
IntervalExeState bottom() const
|
|
116
117
|
{
|
|
117
118
|
IntervalExeState inv = *this;
|
|
118
119
|
for (auto &item: inv._varToItvVal)
|
|
@@ -123,7 +124,7 @@ public:
|
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
/// Set all value top
|
|
126
|
-
IntervalExeState top()
|
|
127
|
+
IntervalExeState top() const
|
|
127
128
|
{
|
|
128
129
|
IntervalExeState inv = *this;
|
|
129
130
|
for (auto &item: inv._varToItvVal)
|
|
@@ -435,4 +435,14 @@ public:
|
|
|
435
435
|
|
|
436
436
|
}; // end class NumericLiteral
|
|
437
437
|
} // end namespace SVF
|
|
438
|
+
|
|
439
|
+
/// Specialise hash for NumericLiteral
|
|
440
|
+
template<>
|
|
441
|
+
struct std::hash<SVF::NumericLiteral>
|
|
442
|
+
{
|
|
443
|
+
size_t operator()(const SVF::NumericLiteral &n) const
|
|
444
|
+
{
|
|
445
|
+
return n.getNumeral();
|
|
446
|
+
}
|
|
447
|
+
};
|
|
438
448
|
#endif //Z3_EXAMPLE_Number_H
|
|
@@ -44,24 +44,37 @@ public:
|
|
|
44
44
|
IntervalExeState (the last element of inputs) for RSY or bilateral solver */
|
|
45
45
|
|
|
46
46
|
/// Return Z3Expr according to valToValMap
|
|
47
|
-
Z3Expr gamma_hat(IntervalExeState &exeState);
|
|
47
|
+
Z3Expr gamma_hat(const IntervalExeState &exeState) const;
|
|
48
48
|
|
|
49
49
|
/// Return Z3Expr according to another valToValMap
|
|
50
|
-
Z3Expr gamma_hat(IntervalExeState &alpha, IntervalExeState &exeState);
|
|
50
|
+
Z3Expr gamma_hat(const IntervalExeState &alpha, const IntervalExeState &exeState) const;
|
|
51
51
|
|
|
52
52
|
/// Return Z3Expr from a NodeID
|
|
53
|
-
Z3Expr gamma_hat(u32_t id, IntervalExeState &exeState);
|
|
53
|
+
Z3Expr gamma_hat(u32_t id, const IntervalExeState &exeState) const;
|
|
54
54
|
|
|
55
|
-
IntervalExeState abstract_consequence(IntervalExeState &lower, IntervalExeState &upper, IntervalExeState &domain);
|
|
55
|
+
IntervalExeState abstract_consequence(const IntervalExeState &lower, const IntervalExeState &upper, const IntervalExeState &domain) const;
|
|
56
56
|
|
|
57
|
-
IntervalExeState beta(Map<u32_t, double> &sigma, IntervalExeState &exeState);
|
|
57
|
+
IntervalExeState beta(const Map<u32_t, double> &sigma, const IntervalExeState &exeState) const;
|
|
58
|
+
|
|
59
|
+
/// Return Z3 expression lazily based on SVFVar ID
|
|
60
|
+
virtual inline Z3Expr toZ3Expr(u32_t varId) const
|
|
61
|
+
{
|
|
62
|
+
return Z3Expr::getContext().int_const(std::to_string(varId).c_str());
|
|
63
|
+
}
|
|
58
64
|
|
|
59
65
|
/* two optional solvers: RSY and bilateral */
|
|
60
66
|
|
|
61
|
-
IntervalExeState bilateral(IntervalExeState domain, Z3Expr phi, u32_t descend_check = 0);
|
|
67
|
+
IntervalExeState bilateral(const IntervalExeState& domain, const Z3Expr &phi, u32_t descend_check = 0);
|
|
68
|
+
|
|
69
|
+
IntervalExeState RSY(const IntervalExeState& domain, const Z3Expr &phi);
|
|
70
|
+
|
|
71
|
+
Map<u32_t, NumericLiteral> BoxedOptSolver(const Z3Expr& phi, Map<u32_t, NumericLiteral>& ret, Map<u32_t, NumericLiteral>& low_values, Map<u32_t, NumericLiteral>& high_values);
|
|
72
|
+
|
|
73
|
+
IntervalExeState BS(const IntervalExeState& domain, const Z3Expr &phi);
|
|
62
74
|
|
|
63
|
-
|
|
75
|
+
void updateMap(Map<u32_t, NumericLiteral>& map, u32_t key, const NumericLiteral& value);
|
|
64
76
|
|
|
77
|
+
void decide_cpa_ext(const Z3Expr &phi, Map<u32_t, Z3Expr>&, Map<u32_t, NumericLiteral>&, Map<u32_t, NumericLiteral>&, Map<u32_t, NumericLiteral>&, Map<u32_t, NumericLiteral>&);
|
|
65
78
|
};
|
|
66
79
|
}
|
|
67
80
|
|