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

fix variable tracking bug in explanations with literals

This commit is contained in:
Nikolaj Bjorner 2022-09-01 23:26:31 -07:00
parent eb1ea9482e
commit e4ef1717e3
2 changed files with 4 additions and 3 deletions

View file

@ -167,7 +167,7 @@ namespace euf {
lit = lit2;
}
TRACE("euf", tout << "attach " << v << " " << mk_bounded_pp(e, m) << "\n";);
TRACE("euf", tout << "attach v" << v << " " << mk_bounded_pp(e, m) << "\n";);
m_bool_var2expr.reserve(v + 1, nullptr);
if (m_bool_var2expr[v] && m_egraph.find(e)) {
if (m_egraph.find(e)->bool_var() != v) {

View file

@ -83,10 +83,11 @@ namespace euf {
expr_ref_vector eqs(m);
unsigned nv = s().num_vars();
auto add_lit = [&](enode_pair const& eq) {
unsigned v = nv;
++nv;
eqs.push_back(m.mk_eq(eq.first->get_expr(), eq.second->get_expr()));
set_tmp_bool_var(nv, eqs.back());
return literal(nv, false);
set_tmp_bool_var(v, eqs.back());
return literal(v, false);
};
for (auto lit : euf::th_explain::lits(jst))