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

fix unsoundness in quantifier propagation #6116 and add initial lemma logging

This commit is contained in:
Nikolaj Bjorner 2022-08-23 19:09:50 -07:00
parent 912b284602
commit ce1f3987d9
15 changed files with 78 additions and 13 deletions

View file

@ -16,6 +16,8 @@ Author:
--*/
#include "sat/smt/euf_solver.h"
#include "ast/ast_util.h"
#include <iostream>
namespace euf {
@ -192,4 +194,23 @@ namespace euf {
get_drat().bool_def(lit.var(), eq->get_id());
}
void solver::log_clause(unsigned n, literal const* lits, sat::status st) {
if (get_config().m_lemmas2console) {
std::function<symbol(int)> ppth = [&](int th) {
return m.get_family_name(th);
};
if (st.is_redundant() || st.is_asserted()) {
expr_ref_vector clause(m);
for (unsigned i = 0; i < n; ++i) {
expr_ref e = literal2expr(lits[i]);
if (!e)
return;
clause.push_back(e);
}
expr_ref cl = mk_or(clause);
std::cout << sat::status_pp(st, ppth) << " " << cl << "\n";
}
}
}
}