mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
Merge branch 'master' of https://github.com/Z3Prover/z3
This commit is contained in:
commit
2fceac04d4
50 changed files with 449 additions and 148 deletions
|
@ -4332,10 +4332,9 @@ namespace smt {
|
|||
);
|
||||
failure fl = get_last_search_failure();
|
||||
if (fl == MEMOUT || fl == CANCELED || fl == TIMEOUT || fl == NUM_CONFLICTS || fl == RESOURCE_LIMIT) {
|
||||
return;
|
||||
TRACE("get_model", tout << "last search failure: " << fl << "\n";);
|
||||
}
|
||||
|
||||
if (m_fparams.m_model || m_fparams.m_model_on_final_check || m_qmanager->model_based()) {
|
||||
else if (m_fparams.m_model || m_fparams.m_model_on_final_check || m_qmanager->model_based()) {
|
||||
m_model_generator->reset();
|
||||
m_proto_model = m_model_generator->mk_model();
|
||||
m_qmanager->adjust_model(m_proto_model.get());
|
||||
|
@ -4346,6 +4345,9 @@ namespace smt {
|
|||
if (m_fparams.m_model_compact)
|
||||
m_proto_model->compress();
|
||||
TRACE("mbqi_bug", tout << "after cleanup:\n"; model_pp(tout, *m_proto_model););
|
||||
}
|
||||
else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,4 +5,8 @@ z3_add_component(smt_tactic
|
|||
unit_subsumption_tactic.cpp
|
||||
COMPONENT_DEPENDENCIES
|
||||
smt
|
||||
TACTIC_HEADERS
|
||||
ctx_solver_simplify_tactic.h
|
||||
smt_tactic.h
|
||||
unit_subsumption_tactic.h
|
||||
)
|
||||
|
|
|
@ -253,7 +253,7 @@ public:
|
|||
if (m_ctx->canceled()) {
|
||||
throw tactic_exception(Z3_CANCELED_MSG);
|
||||
}
|
||||
if (m_fail_if_inconclusive) {
|
||||
if (m_fail_if_inconclusive && !m_candidate_models) {
|
||||
std::stringstream strm;
|
||||
strm << "smt tactic failed to show goal to be sat/unsat " << m_ctx->last_failure_as_string();
|
||||
throw tactic_exception(strm.str().c_str());
|
||||
|
|
|
@ -2386,16 +2386,16 @@ namespace smt {
|
|||
|
||||
app_ref mk_obj(theory_var v) {
|
||||
lean::var_index vi = m_theory_var2var_index[v];
|
||||
bool is_int = a.is_int(get_enode(v)->get_owner());
|
||||
if (m_solver->is_term(vi)) {
|
||||
expr_ref_vector args(m);
|
||||
const lean::lar_term& term = m_solver->get_term(vi);
|
||||
for (auto & ti : term.m_coeffs) {
|
||||
theory_var w = m_var_index2theory_var[ti.first];
|
||||
expr* o = get_enode(w)->get_owner();
|
||||
args.push_back(a.mk_mul(a.mk_numeral(ti.second, a.is_int(o)), o));
|
||||
args.push_back(a.mk_mul(a.mk_numeral(ti.second, is_int), o));
|
||||
}
|
||||
rational r = term.m_v;
|
||||
args.push_back(a.mk_numeral(r, r.is_int()));
|
||||
args.push_back(a.mk_numeral(term.m_v, is_int));
|
||||
return app_ref(a.mk_add(args.size(), args.c_ptr()), m);
|
||||
}
|
||||
else {
|
||||
|
@ -2408,11 +2408,12 @@ namespace smt {
|
|||
rational r = val.get_rational();
|
||||
bool is_strict = val.get_infinitesimal().is_pos();
|
||||
app_ref b(m);
|
||||
bool is_int = a.is_int(get_enode(v)->get_owner());
|
||||
if (is_strict) {
|
||||
b = a.mk_le(mk_obj(v), a.mk_numeral(r, r.is_int()));
|
||||
b = a.mk_le(mk_obj(v), a.mk_numeral(r, is_int));
|
||||
}
|
||||
else {
|
||||
b = a.mk_ge(mk_obj(v), a.mk_numeral(r, r.is_int()));
|
||||
b = a.mk_ge(mk_obj(v), a.mk_numeral(r, is_int));
|
||||
}
|
||||
if (!ctx().b_internalized(b)) {
|
||||
fm.insert(b->get_decl());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue