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

align translation cache with scopes and variable elimination

This commit is contained in:
Nikolaj Bjorner 2021-03-03 11:22:17 -08:00
parent 11efe33aa0
commit 69070a7486
7 changed files with 65 additions and 19 deletions

View file

@ -328,14 +328,19 @@ namespace sat {
}
void solver::set_eliminated(bool_var v, bool f) {
if (m_eliminated[v] && !f)
if (m_eliminated[v] == f)
return;
if (!f)
reset_var(v, m_external[v], m_decision[v]);
else if (f && m_ext)
m_ext->set_eliminated(v);
m_eliminated[v] = f;
}
clause* solver::mk_clause(unsigned num_lits, literal * lits, sat::status st) {
m_model_is_current = false;
for (unsigned i = 0; i < num_lits; i++)
VERIFY(!was_eliminated(lits[i]));