Skip to content

Commit

Permalink
print skolem declarations only for lemma tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Aug 11, 2022
1 parent 791ca02 commit 786280c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/ast/ast_pp_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,17 @@ void ast_pp_util::display_decls(std::ostream& out) {
m_rec_decls = n;
}

void ast_pp_util::display_skolem_decls(std::ostream& out) {
ast_smt_pp pp(m);
unsigned n = coll.get_num_decls();
for (unsigned i = m_decls; i < n; ++i) {
func_decl* f = coll.get_func_decls()[i];
if (f->get_family_id() == null_family_id && !m_removed.contains(f) && f->is_skolem())
ast_smt2_pp(out, f, m_env) << "\n";
}
m_decls = n;
}

void ast_pp_util::remove_decl(func_decl* f) {
m_removed.insert(f);
}
Expand Down
2 changes: 2 additions & 0 deletions src/ast/ast_pp_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ class ast_pp_util {

void display_decls(std::ostream& out);

void display_skolem_decls(std::ostream& out);

void display_asserts(std::ostream& out, expr_ref_vector const& fmls, bool neat = true);

void display_assert(std::ostream& out, expr* f, bool neat = true);
Expand Down
4 changes: 2 additions & 2 deletions src/smt/smt_internalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1529,8 +1529,8 @@ namespace smt {
fmls.push_back(literal2expr(lits[i]));
fml = mk_or(fmls);
m_lemma_visitor.collect(fml);
m_lemma_visitor.display_decls(std::cout);
m_lemma_visitor.display_assert(std::cout, fml.get(), false);
m_lemma_visitor.display_skolem_decls(std::cout);
m_lemma_visitor.display_assert(std::cout, fml.get(), true);
}

}
Expand Down

0 comments on commit 786280c

Please sign in to comment.