3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 09:34:08 +00:00
attach original variable to pb expression.
This commit is contained in:
Nikolaj Bjorner 2023-08-01 08:41:26 -07:00
parent adad468cd7
commit 5b2519d7a3
2 changed files with 5 additions and 4 deletions

View file

@ -212,12 +212,13 @@ namespace euf {
auto [f, p, d] = m_fmls[i](); auto [f, p, d] = m_fmls[i]();
auto [new_f, new_dep] = rp->replace_with_dep(f); auto [new_f, new_dep] = rp->replace_with_dep(f);
proof_ref new_pr(m); proof_ref new_pr(m);
m_rewriter(new_f, new_f, new_pr); expr_ref tmp(m);
if (new_f == f) m_rewriter(new_f, tmp, new_pr);
if (tmp == f)
continue; continue;
new_dep = m.mk_join(d, new_dep); new_dep = m.mk_join(d, new_dep);
old_fmls.push_back(m_fmls[i]); old_fmls.push_back(m_fmls[i]);
m_fmls.update(i, dependent_expr(m, new_f, mp(p, new_pr), new_dep)); m_fmls.update(i, dependent_expr(m, tmp, mp(p, new_pr), new_dep));
} }
} }

View file

@ -30,7 +30,7 @@ namespace pb {
if (m_pb.is_pb(e)) { if (m_pb.is_pb(e)) {
sat::literal lit = internalize_pb(e, sign, root); sat::literal lit = internalize_pb(e, sign, root);
if (m_ctx && !root && lit != sat::null_literal) if (m_ctx && !root && lit != sat::null_literal)
m_ctx->attach_lit(lit, e); m_ctx->attach_lit(literal(lit.var(), false), e);
return lit; return lit;
} }
UNREACHABLE(); UNREACHABLE();