3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-27 16:38:45 +00:00

implementing model updates

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-10-30 16:11:51 -05:00
parent 92b5301b7f
commit 3de8c193ea
63 changed files with 482 additions and 294 deletions

View file

@ -36,6 +36,7 @@ class tactic2solver : public solver_na2as {
unsigned_vector m_scopes;
ref<simple_check_sat_result> m_result;
tactic_ref m_tactic;
ref<model_converter> m_mc;
symbol m_logic;
params_ref m_params;
bool m_produce_models;
@ -64,7 +65,7 @@ public:
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 set_reason_unknown(char const* msg);
@ -82,6 +83,8 @@ public:
return expr_ref(m.mk_true(), m);
}
virtual model_converter* get_model_converter() { return m_mc.get(); }
};
ast_manager& tactic2solver::get_manager() const { return m_assertions.get_manager(); }
@ -153,12 +156,12 @@ lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * ass
}
model_ref md;
proof_ref pr(m);
proof_ref pr(m);
expr_dependency_ref core(m);
std::string reason_unknown = "unknown";
labels_vec labels;
try {
switch (::check_sat(*m_tactic, g, md, labels, pr, core, reason_unknown)) {
switch (::check_sat(*m_tactic, g, md, m_mc, labels, pr, core, reason_unknown)) {
case l_true:
m_result->set_status(l_true);
break;
@ -226,9 +229,9 @@ void tactic2solver::get_unsat_core(ptr_vector<expr> & r) {
}
}
void tactic2solver::get_model(model_ref & m) {
void tactic2solver::get_model_core(model_ref & m) {
if (m_result.get())
m_result->get_model(m);
m_result->get_model_core(m);
}
proof * tactic2solver::get_proof() {