3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

fix bug in euf-completion relating to missed normalization

This commit is contained in:
Nikolaj Bjorner 2022-11-13 18:01:17 -08:00
parent 3fa81d6527
commit ce6cfeaa68
2 changed files with 5 additions and 6 deletions

View file

@ -75,14 +75,14 @@ void elim_unconstrained::eliminate() {
return; return;
if (n.m_parents.empty()) { if (n.m_parents.empty()) {
--n.m_refcount; n.m_refcount = 0;
continue; continue;
} }
expr* e = get_parent(v); expr* e = get_parent(v);
for (expr* p : n.m_parents) for (expr* p : n.m_parents)
IF_VERBOSE(11, verbose_stream() << "parent " << mk_bounded_pp(p, m) << "\n"); IF_VERBOSE(11, verbose_stream() << "parent " << mk_bounded_pp(p, m) << "\n");
if (!e || !is_app(e) || !is_ground(e)) { if (!e || !is_app(e) || !is_ground(e)) {
--n.m_refcount; n.m_refcount = 0;
continue; continue;
} }
app* t = to_app(e); app* t = to_app(e);
@ -90,10 +90,9 @@ void elim_unconstrained::eliminate() {
for (expr* arg : *to_app(t)) for (expr* arg : *to_app(t))
m_args.push_back(get_node(arg).m_term); m_args.push_back(get_node(arg).m_term);
if (!m_inverter(t->get_decl(), m_args.size(), m_args.data(), r, side_cond)) { if (!m_inverter(t->get_decl(), m_args.size(), m_args.data(), r, side_cond)) {
--n.m_refcount; n.m_refcount = 0;
continue; continue;
} }
--n.m_refcount;
SASSERT(r->get_sort() == t->get_sort()); SASSERT(r->get_sort() == t->get_sort());
m_stats.m_num_eliminated++; m_stats.m_num_eliminated++;
n.m_refcount = 0; n.m_refcount = 0;

View file

@ -98,7 +98,7 @@ namespace euf {
if (g != f) { if (g != f) {
m_fmls.update(i, dependent_expr(m, g, dep)); m_fmls.update(i, dependent_expr(m, g, dep));
m_stats.m_num_rewrites++; m_stats.m_num_rewrites++;
IF_VERBOSE(10, verbose_stream() << mk_bounded_pp(f, m, 3) << " -> " << mk_bounded_pp(g, m, 3) << "\n"); IF_VERBOSE(11, verbose_stream() << mk_bounded_pp(f, m, 3) << " -> " << mk_bounded_pp(g, m, 3) << "\n");
} }
CTRACE("euf_completion", g != f, tout << mk_bounded_pp(f, m) << " -> " << mk_bounded_pp(g, m) << "\n"); CTRACE("euf_completion", g != f, tout << mk_bounded_pp(f, m) << " -> " << mk_bounded_pp(g, m) << "\n");
} }
@ -174,7 +174,7 @@ namespace euf {
bool change = false; bool change = false;
for (expr* arg : *to_app(f)) { for (expr* arg : *to_app(f)) {
m_eargs.push_back(get_canonical(arg, d)); m_eargs.push_back(get_canonical(arg, d));
change = arg != m_eargs.back(); change |= arg != m_eargs.back();
} }
if (!change) if (!change)