From 7d585b5cfd60561e6097b9b42e13918600f032fd Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Sat, 18 Oct 2025 13:30:46 +0200 Subject: [PATCH] fix build Signed-off-by: Nikolaj Bjorner --- src/ast/ast.cpp | 4 ++-- src/ast/rewriter/arith_rewriter.cpp | 4 ++-- src/smt/smt_context.cpp | 10 +++++++--- src/smt/smt_context.h | 4 +++- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp index 6e2f2e6af..aff05258d 100644 --- a/src/ast/ast.cpp +++ b/src/ast/ast.cpp @@ -1674,7 +1674,7 @@ bool ast_manager::slow_not_contains(ast const * n) { } #endif -#if 0 +#if 1 static unsigned s_count = 0; static void track_id(ast_manager& m, ast* n, unsigned id) { @@ -1715,7 +1715,7 @@ ast * ast_manager::register_node_core(ast * n) { n->m_id = is_decl(n) ? m_decl_id_gen.mk() : m_expr_id_gen.mk(); - // track_id(*this, n, 9213); + track_id(*this, n, 715); // TRACE(ast, tout << (s_count++) << " Object " << n->m_id << " was created.\n";); TRACE(mk_var_bug, tout << "mk_ast: " << n->m_id << "\n";); diff --git a/src/ast/rewriter/arith_rewriter.cpp b/src/ast/rewriter/arith_rewriter.cpp index c6fe0b8ad..d5ad70a1f 100644 --- a/src/ast/rewriter/arith_rewriter.cpp +++ b/src/ast/rewriter/arith_rewriter.cpp @@ -720,7 +720,7 @@ br_status arith_rewriter::mk_le_ge_eq_core(expr * arg1, expr * arg2, op_kind kin } expr* c = nullptr, *t = nullptr, *e = nullptr; if (m.is_ite(arg1, c, t, e) && is_numeral(t, a1) && is_numeral(arg2, a2)) { - auto a = m.mk_not(c); + expr_ref a(m.mk_not(c), m); switch (kind) { case LE: result = a1 <= a2 ? m.mk_or(c, m_util.mk_le(e, arg2)) : m.mk_and(a, m_util.mk_le(e, arg2)); return BR_REWRITE2; case GE: result = a1 >= a2 ? m.mk_or(c, m_util.mk_ge(e, arg2)) : m.mk_and(a, m_util.mk_ge(e, arg2)); return BR_REWRITE2; @@ -728,7 +728,7 @@ br_status arith_rewriter::mk_le_ge_eq_core(expr * arg1, expr * arg2, op_kind kin } } if (m.is_ite(arg1, c, t, e) && is_numeral(e, a1) && is_numeral(arg2, a2)) { - auto a = m.mk_not(c); + expr_ref a(m.mk_not(c), m); switch (kind) { case LE: result = a1 <= a2 ? m.mk_or(a, m_util.mk_le(t, arg2)) : m.mk_and(c, m_util.mk_le(t, arg2)); return BR_REWRITE2; case GE: result = a1 >= a2 ? m.mk_or(a, m_util.mk_ge(t, arg2)) : m.mk_and(c, m_util.mk_ge(t, arg2)); return BR_REWRITE2; diff --git a/src/smt/smt_context.cpp b/src/smt/smt_context.cpp index d3fb5f093..bc7df2ca9 100644 --- a/src/smt/smt_context.cpp +++ b/src/smt/smt_context.cpp @@ -1939,7 +1939,8 @@ namespace smt { m.trace_stream() << "[push] " << m_scope_lvl << "\n"; m_scope_lvl++; - get_region().push_scope(); + m_region.push_scope(); + get_trail_stack().push_scope(); m_scopes.push_back(scope()); scope & s = m_scopes.back(); // TRACE(context, tout << "push " << m_scope_lvl << "\n";); @@ -2447,20 +2448,23 @@ namespace smt { m_relevancy_propagator->pop(num_scopes); m_fingerprints.pop_scope(num_scopes); + + + unassign_vars(s.m_assigned_literals_lim); m_trail_stack.pop_scope(num_scopes); for (theory* th : m_theory_set) th->pop_scope_eh(num_scopes); - del_justifications(m_justifications, s.m_justifications_lim); - m_asserted_formulas.pop_scope(num_scopes); CTRACE(propagate_atoms, !m_atom_propagation_queue.empty(), tout << m_atom_propagation_queue << "\n";); + m_eq_propagation_queue.reset(); m_th_eq_propagation_queue.reset(); + m_region.pop_scope(num_scopes); m_th_diseq_propagation_queue.reset(); m_atom_propagation_queue.reset(); m_scopes.shrink(new_lvl); diff --git a/src/smt/smt_context.h b/src/smt/smt_context.h index f5f622f44..53b0e8933 100644 --- a/src/smt/smt_context.h +++ b/src/smt/smt_context.h @@ -101,6 +101,7 @@ namespace smt { setup m_setup; unsigned m_relevancy_lvl; timer m_timer; + region m_region; asserted_formulas m_asserted_formulas; th_rewriter m_rewriter; scoped_ptr m_qmanager; @@ -152,6 +153,7 @@ namespace smt { vector m_decl2enodes; // decl -> enode (for decls with arity > 0) enode_vector m_empty_vector; cg_table m_cg_table; + struct new_eq { enode * m_lhs; enode * m_rhs; @@ -303,7 +305,7 @@ namespace smt { } region & get_region() { - return m_trail_stack.get_region(); + return m_region; } bool relevancy() const {