3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-27 22:33:35 +00:00

Merge branch 'Z3Prover:master' into param-tuning

This commit is contained in:
Ilana Shapiro 2025-10-21 12:32:00 -07:00 committed by GitHub
commit 61f48ab156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 3 deletions

View file

@ -1245,6 +1245,18 @@ def _coerce_expr_merge(s, a):
else:
return s
def _check_same_sort(a, b, ctx=None):
if not isinstance(a, ExprRef):
return False
if not isinstance(b, ExprRef):
return False
if ctx is None:
ctx = a.ctx
a_sort = Z3_get_sort(ctx.ctx, a.ast)
b_sort = Z3_get_sort(ctx.ctx, b.ast)
return Z3_is_eq_sort(ctx.ctx, a_sort, b_sort)
def _coerce_exprs(a, b, ctx=None):
if not is_expr(a) and not is_expr(b):
@ -1259,6 +1271,9 @@ def _coerce_exprs(a, b, ctx=None):
if isinstance(b, float) and isinstance(a, ArithRef):
b = RealVal(b, a.ctx)
if _check_same_sort(a, b, ctx):
return (a, b)
s = None
s = _coerce_expr_merge(s, a)
s = _coerce_expr_merge(s, b)

View file

@ -55,7 +55,7 @@ class sls_tracker {
touched = other.touched;
}
~value_score() { if (m) m->del(value); }
value_score& operator=(value_score&&) = default;
value_score& operator=(value_score&&) noexcept = default;
value_score &operator=(const value_score &other) {
if (this != &other) {
if (m)