3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 15:25:26 +00:00

re-introduce option to dump arithmetic lemmas to std-out

This commit is contained in:
Nikolaj Bjorner 2025-01-14 13:54:56 -08:00
parent 8515cebd19
commit 31d4ba0009
5 changed files with 37 additions and 8 deletions

View file

@ -456,6 +456,7 @@ namespace smt {
literal2expr(~consequent, n);
fmls.push_back(std::move(n));
}
if (logic != symbol::null) out << "(set-logic " << logic << ")\n";
visitor.collect(fmls);
visitor.display_decls(out);
@ -475,7 +476,7 @@ namespace smt {
void context::display_lemma_as_smt_problem(std::ostream & out, unsigned num_antecedents, literal const * antecedents,
unsigned num_eq_antecedents, enode_pair const * eq_antecedents,
literal consequent, symbol const& logic) const {
literal consequent, symbol const& logic, enode* x, enode* y) const {
ast_pp_util visitor(m);
expr_ref_vector fmls(m);
visitor.collect(fmls);
@ -490,6 +491,10 @@ namespace smt {
n = m.mk_eq(p.first->get_expr(), p.second->get_expr());
fmls.push_back(n);
}
if (x && y) {
expr_ref eq(m.mk_eq(x->get_expr(), y->get_expr()), m);
fmls.push_back(m.mk_not(eq));
}
if (consequent != false_literal) {
literal2expr(~consequent, n);
fmls.push_back(n);