mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
handle cancelation from nra_solver gracefully
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0170a9772a
commit
5e5f46f0f8
2 changed files with 14 additions and 1 deletions
|
@ -419,6 +419,7 @@ namespace smt {
|
|||
visitor.collect(fmls);
|
||||
visitor.display_decls(out);
|
||||
visitor.display_asserts(out, fmls, true);
|
||||
out << "(check-sat)\n";
|
||||
}
|
||||
|
||||
static unsigned g_lemma_id = 0;
|
||||
|
@ -464,6 +465,7 @@ namespace smt {
|
|||
visitor.collect(fmls);
|
||||
visitor.display_decls(out);
|
||||
visitor.display_asserts(out, fmls, true);
|
||||
out << "(check-sat)\n";
|
||||
}
|
||||
|
||||
void context::display_lemma_as_smt_problem(unsigned num_antecedents, literal const * antecedents,
|
||||
|
|
|
@ -104,7 +104,18 @@ namespace nra {
|
|||
}
|
||||
// TBD: add variable bounds?
|
||||
|
||||
lbool r = m_nlsat->check();
|
||||
lbool r = l_undef;
|
||||
try {
|
||||
r = m_nlsat->check();
|
||||
}
|
||||
catch (z3_exception&) {
|
||||
if (m_limit.get_cancel_flag()) {
|
||||
r = l_undef;
|
||||
}
|
||||
else {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
TRACE("arith", display(tout); m_nlsat->display(tout << r << "\n"););
|
||||
switch (r) {
|
||||
case l_true:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue