mirror of
https://github.com/Z3Prover/z3
synced 2026-07-02 05:16:08 +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
|
|
@ -23,6 +23,7 @@ Notes:
|
|||
#include"smt_params_helper.hpp"
|
||||
#include"mus.h"
|
||||
|
||||
|
||||
namespace smt {
|
||||
|
||||
class solver : public solver_na2as {
|
||||
|
|
@ -68,7 +69,8 @@ namespace smt {
|
|||
}
|
||||
|
||||
virtual lbool get_consequences_core(expr_ref_vector const& assumptions, expr_ref_vector const& vars, expr_ref_vector& conseq) {
|
||||
return m_context.get_consequences(assumptions, vars, conseq);
|
||||
expr_ref_vector unfixed(m_context.m());
|
||||
return m_context.get_consequences(assumptions, vars, conseq, unfixed);
|
||||
}
|
||||
|
||||
virtual void assert_expr(expr * t) {
|
||||
|
|
@ -143,8 +145,7 @@ namespace smt {
|
|||
r.append(tmp.size(), tmp.c_ptr());
|
||||
}
|
||||
|
||||
virtual ast_manager& get_manager() { return m_context.m(); }
|
||||
|
||||
virtual ast_manager& get_manager() const { return m_context.m(); }
|
||||
|
||||
virtual void set_progress_callback(progress_callback * callback) {
|
||||
m_callback = callback;
|
||||
|
|
@ -158,15 +159,8 @@ namespace smt {
|
|||
virtual expr * get_assertion(unsigned idx) const {
|
||||
SASSERT(idx < get_num_assertions());
|
||||
return m_context.get_formulas()[idx];
|
||||
}
|
||||
|
||||
virtual std::ostream& display(std::ostream & out) const {
|
||||
m_context.display(out);
|
||||
return out;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
solver * mk_smt_solver(ast_manager & m, params_ref const & p, symbol const & logic) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue