diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2018-10-22 09:12:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-22 09:12:47 -0700 |
commit | 8e58fec53e1bc9f1b9349a235e2ad76bda4d9dd9 (patch) | |
tree | cad404d821e33fdaf7218584adc67b62b368380f /test/regress/regress0 | |
parent | 0b515de430771d9bdc15fc29d41b391f1cc7c1fd (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 'test/regress/regress0')
-rw-r--r-- | test/regress/regress0/smtlib/reason-unknown.smt2 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/regress/regress0/smtlib/reason-unknown.smt2 b/test/regress/regress0/smtlib/reason-unknown.smt2 new file mode 100644 index 000000000..a4eecf220 --- /dev/null +++ b/test/regress/regress0/smtlib/reason-unknown.smt2 @@ -0,0 +1,5 @@ +; EXPECT: (error "Can't get-info :reason-unknown when the last result wasn't unknown!") +; EXPECT: sat +(set-logic QF_SAT) +(get-info :reason-unknown) +(check-sat) |