mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
debugging #3511
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f74079de01
commit
ba4765f16f
|
@ -3368,9 +3368,9 @@ namespace smt {
|
|||
}
|
||||
if (r == l_true && gparams::get_value("model_validate") == "true") {
|
||||
recfun::util u(m);
|
||||
model_ref mdl;
|
||||
get_model(mdl);
|
||||
if (u.get_rec_funs().empty()) {
|
||||
model_ref mdl;
|
||||
get_model(mdl);
|
||||
if (mdl.get()) {
|
||||
for (theory* t : m_theory_set) {
|
||||
t->validate_model(*mdl);
|
||||
|
@ -3384,7 +3384,7 @@ namespace smt {
|
|||
if (lit.sign() ? m_model->is_true(v) : m_model->is_false(v)) {
|
||||
IF_VERBOSE(10, verbose_stream()
|
||||
<< "invalid assignment " << (lit.sign() ? "true" : "false")
|
||||
<< " to #" << v->get_id() << " := " << mk_bounded_pp(v, m, 2) << "\n");
|
||||
<< " to #" << v->get_id() << " := " << mk_bounded_pp(v, m, 3) << "\n");
|
||||
}
|
||||
}
|
||||
for (clause* cls : m_aux_clauses) {
|
||||
|
|
|
@ -374,15 +374,17 @@ namespace smt {
|
|||
case l_undef:
|
||||
break;
|
||||
case l_true:
|
||||
if (!m_proto_model->eval(n, res, false)) return true;
|
||||
CTRACE("mbqi_bug", !m.is_true(res), tout << n << " evaluates to " << res << "\n";);
|
||||
if (!m_proto_model->eval(n, res, false))
|
||||
return true;
|
||||
CTRACE("model", !m.is_true(res), tout << n << " evaluates to " << res << "\n";);
|
||||
if (m.is_false(res)) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case l_false:
|
||||
if (!m_proto_model->eval(n, res, false)) return true;
|
||||
CTRACE("mbqi_bug", !m.is_false(res), tout << n << " evaluates to " << res << "\n";);
|
||||
if (!m_proto_model->eval(n, res, false))
|
||||
return true;
|
||||
CTRACE("model", !m.is_false(res), tout << n << " evaluates to " << res << "\n";);
|
||||
if (m.is_true(res)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -98,13 +98,14 @@ protected:
|
|||
return;
|
||||
SASSERT(m_solver.get_scope_level() == 0);
|
||||
TRACE("ctx_solver_simplify_tactic",
|
||||
for (unsigned i = 0; i < fmls.size(); ++i) {
|
||||
tout << mk_pp(fmls[i], m) << "\n";
|
||||
for (expr* f : fmls) {
|
||||
tout << mk_pp(f, m) << "\n";
|
||||
}
|
||||
tout << "=>\n";
|
||||
tout << mk_pp(fml, m) << "\n";);
|
||||
tout << fml << "\n";);
|
||||
DEBUG_CODE(
|
||||
{
|
||||
// enable_trace("after_search");
|
||||
m_solver.push();
|
||||
expr_ref fml1(m);
|
||||
fml1 = mk_and(m, fmls.size(), fmls.c_ptr());
|
||||
|
@ -114,9 +115,14 @@ protected:
|
|||
lbool is_sat = m_solver.check();
|
||||
TRACE("ctx_solver_simplify_tactic", tout << "is non-equivalence sat?: " << is_sat << "\n";);
|
||||
if (is_sat == l_true) {
|
||||
model_ref mdl;
|
||||
m_solver.get_model(mdl);
|
||||
TRACE("ctx_solver_simplify_tactic",
|
||||
tout << "result is not equivalent to input\n";
|
||||
tout << mk_pp(fml1, m) << "\n";);
|
||||
tout << mk_pp(fml1, m) << "\n";
|
||||
tout << "evaluates to: " << (*mdl)(fml1) << "\n";
|
||||
m_solver.display(tout) << "\n";
|
||||
);
|
||||
UNREACHABLE();
|
||||
}
|
||||
m_solver.pop(1);
|
||||
|
|
|
@ -1659,6 +1659,7 @@ public:
|
|||
}
|
||||
|
||||
final_check_status final_check_eh() {
|
||||
reset_variable_values();
|
||||
IF_VERBOSE(12, verbose_stream() << "final-check " << m_solver->get_status() << "\n");
|
||||
m_use_nra_model = false;
|
||||
lbool is_sat = l_true;
|
||||
|
|
Loading…
Reference in a new issue