mirror of
https://github.com/Z3Prover/z3
synced 2025-08-05 02:40:24 +00:00
re-organize proof and model converters to be associated with goals instead of external
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
00f5308a0e
commit
4bbece6616
118 changed files with 617 additions and 1070 deletions
|
@ -103,9 +103,8 @@ public:
|
|||
|
||||
virtual void operator()(/* in */ goal_ref const & in,
|
||||
/* out */ goal_ref_buffer & result,
|
||||
/* out */ model_converter_ref & mc,
|
||||
/* out */ expr_dependency_ref & core) {
|
||||
mc = 0; core = 0;
|
||||
core = 0;
|
||||
expr_ref_vector clauses(m);
|
||||
expr2expr_map bool2dep;
|
||||
ptr_vector<expr> assumptions;
|
||||
|
@ -119,9 +118,11 @@ public:
|
|||
if (in->models_enabled()) {
|
||||
model_ref mdl;
|
||||
local_solver->get_model(mdl);
|
||||
model_converter_ref mc;
|
||||
mc = model2model_converter(mdl.get());
|
||||
mc = concat(fmc.get(), mc.get());
|
||||
mc = concat(local_solver->mc0(), mc.get());
|
||||
in->add(mc.get());
|
||||
}
|
||||
in->reset();
|
||||
result.push_back(in.get());
|
||||
|
@ -150,9 +151,11 @@ public:
|
|||
if (m.canceled()) {
|
||||
throw tactic_exception(Z3_CANCELED_MSG);
|
||||
}
|
||||
model_converter_ref mc;
|
||||
mc = local_solver->get_model_converter();
|
||||
mc = concat(fmc.get(), mc.get());
|
||||
in->reset();
|
||||
in->add(mc.get());
|
||||
unsigned sz = local_solver->get_num_assertions();
|
||||
for (unsigned i = 0; i < sz; ++i) {
|
||||
in->assert_expr(local_solver->get_assertion(i));
|
||||
|
|
|
@ -159,7 +159,7 @@ lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * ass
|
|||
std::string reason_unknown = "unknown";
|
||||
labels_vec labels;
|
||||
try {
|
||||
switch (::check_sat(*m_tactic, g, md, m_mc, labels, pr, core, reason_unknown)) {
|
||||
switch (::check_sat(*m_tactic, g, md, labels, pr, core, reason_unknown)) {
|
||||
case l_true:
|
||||
m_result->set_status(l_true);
|
||||
break;
|
||||
|
@ -176,6 +176,7 @@ lbool tactic2solver::check_sat_core(unsigned num_assumptions, expr * const * ass
|
|||
}
|
||||
break;
|
||||
}
|
||||
m_mc = g->mc();
|
||||
}
|
||||
catch (z3_error & ex) {
|
||||
TRACE("tactic2solver", tout << "exception: " << ex.msg() << "\n";);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue