mirror of
https://github.com/Z3Prover/z3
synced 2025-06-27 00:18:45 +00:00
tune consequence finding. Factor solver pretty-printing as SMT-LIB into top-level
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
cb2d8d2107
commit
491b3b34aa
15 changed files with 149 additions and 69 deletions
|
@ -55,6 +55,18 @@ namespace smt {
|
|||
void set_progress_callback(progress_callback * callback) {
|
||||
return m_kernel.set_progress_callback(callback);
|
||||
}
|
||||
|
||||
void display(std::ostream & out) const {
|
||||
// m_kernel.display(out); <<< for external users it is just junk
|
||||
// TODO: it will be replaced with assertion_stack.display
|
||||
unsigned num = m_kernel.get_num_asserted_formulas();
|
||||
expr * const * fms = m_kernel.get_asserted_formulas();
|
||||
out << "(kernel";
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
out << "\n " << mk_ismt2_pp(fms[i], m(), 2);
|
||||
}
|
||||
out << ")";
|
||||
}
|
||||
|
||||
void assert_expr(expr * e) {
|
||||
TRACE("smt_kernel", tout << "assert:\n" << mk_ismt2_pp(e, m()) << "\n";);
|
||||
|
@ -99,8 +111,8 @@ namespace smt {
|
|||
return m_kernel.check(num_assumptions, assumptions);
|
||||
}
|
||||
|
||||
lbool get_consequences(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq) {
|
||||
return m_kernel.get_consequences(assumptions, vars, conseq);
|
||||
lbool get_consequences(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq, expr_ref_vector& unfixed) {
|
||||
return m_kernel.get_consequences(assumptions, vars, conseq, unfixed);
|
||||
}
|
||||
|
||||
void get_model(model_ref & m) const {
|
||||
|
@ -150,18 +162,6 @@ namespace smt {
|
|||
void get_guessed_literals(expr_ref_vector & result) {
|
||||
m_kernel.get_guessed_literals(result);
|
||||
}
|
||||
|
||||
void display(std::ostream & out) const {
|
||||
// m_kernel.display(out); <<< for external users it is just junk
|
||||
// TODO: it will be replaced with assertion_stack.display
|
||||
unsigned num = m_kernel.get_num_asserted_formulas();
|
||||
expr * const * fms = m_kernel.get_asserted_formulas();
|
||||
out << "(kernel";
|
||||
for (unsigned i = 0; i < num; i++) {
|
||||
out << "\n " << mk_ismt2_pp(fms[i], m(), 2);
|
||||
}
|
||||
out << ")";
|
||||
}
|
||||
|
||||
void collect_statistics(::statistics & st) const {
|
||||
m_kernel.collect_statistics(st);
|
||||
|
@ -268,8 +268,8 @@ namespace smt {
|
|||
return r;
|
||||
}
|
||||
|
||||
lbool kernel::get_consequences(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq) {
|
||||
return m_imp->get_consequences(assumptions, vars, conseq);
|
||||
lbool kernel::get_consequences(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq, expr_ref_vector& unfixed) {
|
||||
return m_imp->get_consequences(assumptions, vars, conseq, unfixed);
|
||||
}
|
||||
|
||||
void kernel::get_model(model_ref & m) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue