mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Fix UP registration in final callback (#6929)
* Fix registration in final * Don't make it too complicated...
This commit is contained in:
parent
ab8fe199c5
commit
4133a1cc5a
|
@ -62,8 +62,7 @@ void theory_user_propagator::add_expr(expr* term, bool ensure_enode) {
|
|||
enode* n = ensure_enode ? this->ensure_enode(e) : ctx.get_enode(e);
|
||||
if (is_attached_to_var(n))
|
||||
return;
|
||||
|
||||
|
||||
|
||||
theory_var v = mk_var(n);
|
||||
m_var2expr.reserve(v + 1);
|
||||
m_var2expr[v] = term;
|
||||
|
@ -146,7 +145,7 @@ final_check_status theory_user_propagator::final_check_eh() {
|
|||
return FC_DONE;
|
||||
force_push();
|
||||
unsigned sz1 = m_prop.size();
|
||||
unsigned sz2 = m_expr2var.size();
|
||||
unsigned sz2 = get_num_vars();
|
||||
try {
|
||||
m_final_eh(m_user_context, this);
|
||||
}
|
||||
|
@ -157,7 +156,7 @@ final_check_status theory_user_propagator::final_check_eh() {
|
|||
propagate();
|
||||
CTRACE("user_propagate", ctx.inconsistent(), tout << "inconsistent\n");
|
||||
// check if it became inconsistent or something new was propagated/registered
|
||||
bool done = (sz1 == m_prop.size()) && (sz2 == m_expr2var.size()) && !ctx.inconsistent();
|
||||
bool done = (sz1 == m_prop.size()) && (sz2 == get_num_vars()) && !ctx.inconsistent();
|
||||
return done ? FC_DONE : FC_CONTINUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue