summaryrefslogtreecommitdiff
path: root/src/smt/command.cpp
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2018-10-22 09:12:47 -0700
committerGitHub <noreply@github.com>2018-10-22 09:12:47 -0700
commit8e58fec53e1bc9f1b9349a235e2ad76bda4d9dd9 (patch)
treecad404d821e33fdaf7218584adc67b62b368380f /src/smt/command.cpp
parent0b515de430771d9bdc15fc29d41b391f1cc7c1fd (diff)
Recover from wrong use of get-info :reason-unknown (#2667)
Fixes #2584. Currently, we are immediately terminating CVC4 if the user issues a `(get-info :reason-unknown)` command if it didn't succeed a `(check-sat)` call returning `unknown`. This commit changes the behavior to return an `(error ...)` but continue executing afterwards. It turns the `ModalException` thrown in this case into a `RecoverableModalException` and adds a check in `GetInfoCommand::invoke()` to turn it into a `CommandRecoverableFailure`, which solves the issue.
Diffstat (limited to 'src/smt/command.cpp')
-rw-r--r--src/smt/command.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/smt/command.cpp b/src/smt/command.cpp
index 51cb6663f..5198ea2d1 100644
--- a/src/smt/command.cpp
+++ b/src/smt/command.cpp
@@ -2438,6 +2438,10 @@ void GetInfoCommand::invoke(SmtEngine* smtEngine)
{
d_commandStatus = new CommandUnsupported();
}
+ catch (RecoverableModalException& e)
+ {
+ d_commandStatus = new CommandRecoverableFailure(e.what());
+ }
catch (exception& e)
{
d_commandStatus = new CommandFailure(e.what());
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback