mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 20:05:51 +00:00
replace restore_size_trail by more generic restore_vector
other updates: - change signature of advance_qhead to simplify call sites - have model reconstruction replay work on a tail of dependent_expr state, while adding formulas to the tail.
This commit is contained in:
parent
6454014119
commit
85f9c7eefa
25 changed files with 80 additions and 59 deletions
|
@ -893,11 +893,11 @@ namespace arith {
|
|||
theory_var other = m_model_eqs.insert_if_not_there(v);
|
||||
TRACE("arith", tout << "insert: v" << v << " := " << get_value(v) << " found: v" << other << "\n";);
|
||||
if (!is_equal(other, v))
|
||||
m_assume_eq_candidates.push_back(std::make_pair(v, other));
|
||||
m_assume_eq_candidates.push_back({ v, other });
|
||||
}
|
||||
|
||||
if (m_assume_eq_candidates.size() > old_sz)
|
||||
ctx.push(restore_size_trail<std::pair<theory_var, theory_var>, false>(m_assume_eq_candidates, old_sz));
|
||||
ctx.push(restore_vector(m_assume_eq_candidates, old_sz));
|
||||
|
||||
return delayed_assume_eqs();
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ namespace bv {
|
|||
}
|
||||
|
||||
ctx.push(value_trail(m_lit_tail));
|
||||
ctx.push(restore_size_trail(m_proof_literals));
|
||||
ctx.push(restore_vector(m_proof_literals));
|
||||
|
||||
sat::literal_vector lits;
|
||||
switch (c.m_kind) {
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace euf {
|
|||
return nullptr;
|
||||
push(value_trail(m_lit_tail));
|
||||
push(value_trail(m_cc_tail));
|
||||
push(restore_size_trail(m_proof_literals));
|
||||
push(restore_vector(m_proof_literals));
|
||||
if (conseq != sat::null_literal)
|
||||
m_proof_literals.push_back(~conseq);
|
||||
m_proof_literals.append(r);
|
||||
|
@ -101,8 +101,8 @@ namespace euf {
|
|||
SASSERT(a->get_decl() == b->get_decl());
|
||||
push(value_trail(m_lit_tail));
|
||||
push(value_trail(m_cc_tail));
|
||||
push(restore_size_trail(m_proof_literals));
|
||||
push(restore_size_trail(m_explain_cc, m_explain_cc.size()));
|
||||
push(restore_vector(m_proof_literals));
|
||||
push(restore_vector(m_explain_cc));
|
||||
|
||||
for (auto lit : ante)
|
||||
m_proof_literals.push_back(~lit);
|
||||
|
@ -121,7 +121,7 @@ namespace euf {
|
|||
return nullptr;
|
||||
push(value_trail(m_lit_tail));
|
||||
push(value_trail(m_cc_tail));
|
||||
push(restore_size_trail(m_proof_literals));
|
||||
push(restore_vector(m_proof_literals));
|
||||
|
||||
for (unsigned i = 0; i < 3; ++i)
|
||||
m_proof_literals.push_back(~clause[i]);
|
||||
|
@ -171,7 +171,7 @@ namespace euf {
|
|||
if (!use_drat())
|
||||
return nullptr;
|
||||
push(value_trail(m_lit_tail));
|
||||
push(restore_size_trail(m_proof_literals));
|
||||
push(restore_vector(m_proof_literals));
|
||||
|
||||
for (unsigned i = 0; i < nl; ++i)
|
||||
m_proof_literals.push_back(~lits[i]);
|
||||
|
@ -190,7 +190,7 @@ namespace euf {
|
|||
if (!use_drat())
|
||||
return nullptr;
|
||||
push(value_trail(m_lit_tail));
|
||||
push(restore_size_trail(m_proof_literals));
|
||||
push(restore_vector(m_proof_literals));
|
||||
|
||||
for (unsigned i = 0; i < nl; ++i)
|
||||
if (sat::null_literal != lits[i]) {
|
||||
|
@ -203,11 +203,11 @@ namespace euf {
|
|||
}
|
||||
|
||||
push(value_trail(m_eq_tail));
|
||||
push(restore_size_trail(m_proof_eqs));
|
||||
push(restore_vector(m_proof_eqs));
|
||||
m_proof_eqs.append(ne, eqs);
|
||||
|
||||
push(value_trail(m_deq_tail));
|
||||
push(restore_size_trail(m_proof_deqs));
|
||||
push(restore_vector(m_proof_deqs));
|
||||
m_proof_deqs.append(nd, deqs);
|
||||
|
||||
m_lit_head = m_lit_tail;
|
||||
|
|
|
@ -225,7 +225,7 @@ namespace euf {
|
|||
m_egraph.begin_explain();
|
||||
m_explain.reset();
|
||||
if (use_drat() && !probing) {
|
||||
push(restore_size_trail(m_explain_cc, m_explain_cc.size()));
|
||||
push(restore_vector(m_explain_cc));
|
||||
}
|
||||
auto* ext = sat::constraint_base::to_extension(idx);
|
||||
th_proof_hint* hint = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue