3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 09:35:32 +00:00
#6319 - fix incompleteness in propagation of default to all array terms in the equivalence class.

Fix bug with q_mbi where domain restrictions are not using values because the current model does not evaluate certain bound variables to values. Set model completion when adding these bound variables to the model to ensure their values are not missed.

Add better propagation of diagnostics when tactics and the new solver return unknown. The reason for unknown can now be traced to what theory was culprit (currently no additional information)
This commit is contained in:
Nikolaj Bjorner 2022-09-23 22:22:34 -05:00
parent 6226875283
commit 1f150ecd52
16 changed files with 70 additions and 24 deletions

View file

@ -55,6 +55,7 @@ protected:
proof_converter_ref m_pc;
dependency_converter_ref m_dc;
unsigned m_ref_count;
std::string m_reason_unknown;
expr_array m_forms;
expr_array m_proofs;
expr_dependency_array m_dependencies;
@ -159,6 +160,8 @@ public:
void set(model_converter* m) { m_mc = m; }
void set(proof_converter* p) { m_pc = p; }
void set_reason_unknown(std::string const& reason_unknown) { m_reason_unknown = reason_unknown; }
std::string const& get_reason_unknown() { return m_reason_unknown; }
bool is_cnf() const;
goal * translate(ast_translation & translator) const;
@ -176,6 +179,8 @@ template<typename GoalCollection>
inline bool is_decided_sat(GoalCollection const & c) { return c.size() == 1 && c[0]->is_decided_sat(); }
template<typename GoalCollection>
inline bool is_decided_unsat(GoalCollection const & c) { return c.size() == 1 && c[0]->is_decided_unsat(); }
template<typename GoalCollection>
inline std::string get_reason_unknown(GoalCollection const & c) { return c.size() == 1 ? c[0]->get_reason_unknown() : std::string("unknown"); }
template<typename ForEachProc>
void for_each_expr_at(ForEachProc& proc, goal const & s) {

View file

@ -184,8 +184,7 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
if (r.size() > 0) {
pr = r[0]->pr(0);
CTRACE("tactic", pr, tout << pr << "\n";);
}
}
if (is_decided_sat(r)) {
model_converter_ref mc = r[0]->mc();
@ -217,7 +216,9 @@ lbool check_sat(tactic & t, goal_ref & g, model_ref & md, labels_vec & labels, p
if (mc)
(*mc)(labels);
}
reason_unknown = "incomplete";
reason_unknown = get_reason_unknown(r);
if (reason_unknown.empty())
reason_unknown = "unknown";
return l_undef;
}
}