3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

handle cancelation from nra_solver gracefully

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-07-10 17:34:45 -07:00
parent 0170a9772a
commit 5e5f46f0f8
2 changed files with 14 additions and 1 deletions

View file

@ -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: