mirror of
https://github.com/Z3Prover/z3
synced 2026-04-26 05:43:33 +00:00
fixes to model generation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
5803c6f202
commit
a5c0ecafda
2 changed files with 8 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ Notes:
|
||||||
#include "ast/rewriter/bool_rewriter.h"
|
#include "ast/rewriter/bool_rewriter.h"
|
||||||
#include "params/bool_rewriter_params.hpp"
|
#include "params/bool_rewriter_params.hpp"
|
||||||
#include "ast/rewriter/rewriter_def.h"
|
#include "ast/rewriter/rewriter_def.h"
|
||||||
|
#include "ast/rewriter/expr_safe_replace.h"
|
||||||
#include "ast/ast_lt.h"
|
#include "ast/ast_lt.h"
|
||||||
#include "ast/for_each_expr.h"
|
#include "ast/for_each_expr.h"
|
||||||
#include <algorithm>
|
#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()))) {
|
for (expr *e : subterms::ground(expr_ref(r, m()))) {
|
||||||
if (m().is_ite(e, cond, r1, r2)) {
|
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;
|
c = cond;
|
||||||
th = r1;
|
th = r1;
|
||||||
el = r2;
|
el = r2;
|
||||||
|
rep1(th);
|
||||||
|
rep2(el);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6130,7 +6130,7 @@ lbool seq_rewriter::some_string_in_re(expr_mark& visited, expr* r, unsigned_vect
|
||||||
}
|
}
|
||||||
if (has_bounds) {
|
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)
|
if (low > 0)
|
||||||
exclude.push_back({0, low - 1});
|
exclude.push_back({0, low - 1});
|
||||||
if (high < zstring::unicode_max_char())
|
if (high < zstring::unicode_max_char())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue