3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 09:58:59 +00:00

fixes to model generation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2026-03-24 13:27:13 -07:00
parent 5803c6f202
commit a5c0ecafda
2 changed files with 8 additions and 1 deletions

View file

@ -19,6 +19,7 @@ Notes:
#include "ast/rewriter/bool_rewriter.h"
#include "params/bool_rewriter_params.hpp"
#include "ast/rewriter/rewriter_def.h"
#include "ast/rewriter/expr_safe_replace.h"
#include "ast/ast_lt.h"
#include "ast/for_each_expr.h"
#include <algorithm>
@ -1195,9 +1196,15 @@ bool bool_rewriter::decompose_ite(expr *r, expr_ref &c, expr_ref &th, expr_ref &
}
for (expr *e : subterms::ground(expr_ref(r, m()))) {
if (m().is_ite(e, cond, r1, r2)) {
expr_safe_replace rep1(m());
expr_safe_replace rep2(m());
rep1.insert(cond, m().mk_true());
rep2.insert(cond, m().mk_false());
c = cond;
th = r1;
el = r2;
rep1(th);
rep2(el);
return true;
}
}

View file

@ -6130,7 +6130,7 @@ lbool seq_rewriter::some_string_in_re(expr_mark& visited, expr* r, unsigned_vect
}
if (has_bounds) {
if (any_of(subterms::all(th), [&](expr *t) { return m().is_ite(t); })) {
if (any_of(subterms::ground(th), [&](expr *t) { return m().is_ite(t); })) {
if (low > 0)
exclude.push_back({0, low - 1});
if (high < zstring::unicode_max_char())