mirror of
https://github.com/Z3Prover/z3
synced 2025-08-23 03:27:52 +00:00
implementing model updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
92b5301b7f
commit
3de8c193ea
63 changed files with 482 additions and 294 deletions
|
@ -23,6 +23,7 @@ Notes:
|
|||
#include "util/lbool.h"
|
||||
#include "util/statistics.h"
|
||||
#include "util/event_handler.h"
|
||||
#include "tactic/model_converter.h"
|
||||
|
||||
/**
|
||||
\brief Abstract interface for the result of a (check-sat) like command.
|
||||
|
@ -40,6 +41,7 @@ class check_sat_result {
|
|||
protected:
|
||||
unsigned m_ref_count;
|
||||
lbool m_status;
|
||||
model_converter_ref m_mc0;
|
||||
public:
|
||||
check_sat_result():m_ref_count(0), m_status(l_undef) {}
|
||||
virtual ~check_sat_result() {}
|
||||
|
@ -54,7 +56,13 @@ public:
|
|||
get_unsat_core(core);
|
||||
r.append(core.size(), core.c_ptr());
|
||||
}
|
||||
virtual void get_model(model_ref & m) = 0;
|
||||
void set_model_converter(model_converter* mc) { m_mc0 = mc; }
|
||||
model_converter* mc0() { return m_mc0.get(); }
|
||||
virtual void get_model_core(model_ref & m) = 0;
|
||||
void get_model(model_ref & m) {
|
||||
get_model_core(m);
|
||||
if (m && mc0()) (*mc0())(m);
|
||||
}
|
||||
virtual proof * get_proof() = 0;
|
||||
virtual std::string reason_unknown() const = 0;
|
||||
virtual void set_reason_unknown(char const* msg) = 0;
|
||||
|
@ -80,7 +88,7 @@ struct simple_check_sat_result : public check_sat_result {
|
|||
virtual ast_manager& get_manager() const { return m_proof.get_manager(); }
|
||||
virtual void collect_statistics(statistics & st) const;
|
||||
virtual void get_unsat_core(ptr_vector<expr> & r);
|
||||
virtual void get_model(model_ref & m);
|
||||
virtual void get_model_core(model_ref & m);
|
||||
virtual proof * get_proof();
|
||||
virtual std::string reason_unknown() const;
|
||||
virtual void get_labels(svector<symbol> & r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue