3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-23 11:37:54 +00:00
in-processing for "pure" PB constraints isn't model preserving and therefore removed.
This commit is contained in:
Nikolaj Bjorner 2021-06-05 12:02:33 -07:00
parent 85b672ee85
commit 1fd6b66ecc
2 changed files with 13 additions and 39 deletions

View file

@ -56,6 +56,12 @@ class sat_tactic : public tactic {
for (func_decl* f : funs)
tout << mk_ismt2_pp(f, m) << "\n";
);
expr_ref_vector fmls_to_validate(m);
if (gparams::get_ref().get_bool("model_validate", false))
for (unsigned i = 0; i < g->size(); ++i)
fmls_to_validate.push_back(g->form(i));
g->reset();
g->m().compact_memory();
@ -65,7 +71,8 @@ class sat_tactic : public tactic {
dep2assumptions(dep2asm, assumptions);
lbool r = m_solver->check(assumptions.size(), assumptions.data());
TRACE("sat", tout << "result of checking: " << r << " ";
if (r == l_undef) tout << m_solver->get_reason_unknown(); tout << "\n";);
if (r == l_undef) tout << m_solver->get_reason_unknown(); tout << "\n";
if (m_goal2sat.has_interpreted_funs()) tout << "has interpreted\n";);
if (r == l_false) {
expr_dependency * lcore = nullptr;
if (produce_core) {
@ -106,6 +113,10 @@ class sat_tactic : public tactic {
break;
}
}
for (auto* f : fmls_to_validate)
if (md->is_false(f))
IF_VERBOSE(0, verbose_stream() << "failed to validate: " << mk_pp(f, m) << "\n";);
m_goal2sat.update_model(md);
TRACE("sat_tactic", model_v2_pp(tout, *md););
g->add(model2model_converter(md.get()));