3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

provide additional diagnostics for #5009

This commit is contained in:
Nikolaj Bjorner 2021-02-09 10:14:38 -08:00
parent 8ca2de41db
commit 8b5094fe73
2 changed files with 9 additions and 3 deletions

View file

@ -215,9 +215,11 @@ public:
r = m_solver.check(m_asms.size(), m_asms.c_ptr()); r = m_solver.check(m_asms.size(), m_asms.c_ptr());
} }
catch (z3_exception& ex) { catch (z3_exception& ex) {
IF_VERBOSE(10, verbose_stream() << "exception: " << ex.msg() << "\n";); IF_VERBOSE(1, verbose_stream() << "exception: " << ex.msg() << "\n";);
reason_set = true; if (m.inc()) {
set_reason_unknown(std::string("(sat.giveup ") + ex.msg() + ')'); reason_set = true;
set_reason_unknown(std::string("(sat.giveup ") + ex.msg() + ')');
}
r = l_undef; r = l_undef;
} }
switch (r) { switch (r) {

View file

@ -288,11 +288,15 @@ class parallel_tactic : public tactic {
} }
bool giveup() { bool giveup() {
if (m_giveup)
return m_giveup;
std::string r = get_solver().reason_unknown(); std::string r = get_solver().reason_unknown();
std::string inc("(incomplete"); std::string inc("(incomplete");
m_giveup |= r.compare(0, inc.size(), inc) == 0; m_giveup |= r.compare(0, inc.size(), inc) == 0;
inc = "(sat.giveup"; inc = "(sat.giveup";
m_giveup |= r.compare(0, inc.size(), inc) == 0; m_giveup |= r.compare(0, inc.size(), inc) == 0;
if (m_giveup)
IF_VERBOSE(0, verbose_stream() << r << "\n");
return m_giveup; return m_giveup;
} }