3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-05 17:14:07 +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 [new_f, new_dep] = rp->replace_with_dep(f);
proof_ref new_pr(m);
m_rewriter(new_f, new_f, new_pr);
if (new_f == f)
expr_ref tmp(m);
m_rewriter(new_f, tmp, new_pr);
if (tmp == f)
continue;
new_dep = m.mk_join(d, new_dep);
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)) {
sat::literal lit = internalize_pb(e, sign, root);
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;
}
UNREACHABLE();