3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 11:55:51 +00:00

#5641 - projection that skips interpreted functions can violate model evaluation.

This commit is contained in:
Nikolaj Bjorner 2022-01-02 17:45:43 -08:00
parent 0ca5e7207e
commit d0fb3cba15
10 changed files with 46 additions and 36 deletions

View file

@ -67,7 +67,7 @@ namespace q {
}
}
m_max_cex += ctx.get_config().m_mbqi_max_cexs;
for (auto [qlit, fml, generation] : m_instantiations) {
for (auto const& [qlit, fml, generation] : m_instantiations) {
euf::solver::scoped_generation sg(ctx, generation + 1);
sat::literal lit = ctx.mk_literal(fml);
m_qs.add_clause(~qlit, ~lit);
@ -308,8 +308,10 @@ namespace q {
proj.extract_literals(*m_model, vars, fmls);
fmls_extracted = true;
}
if (p)
(*p)(*m_model, vars, fmls);
if (!p)
continue;
if (!(*p)(*m_model, vars, fmls))
return expr_ref(nullptr, m);
}
for (app* v : vars) {
expr_ref term(m);