diff options
Diffstat (limited to 'test/smt/exception_2.unsat.sail')
| -rw-r--r-- | test/smt/exception_2.unsat.sail | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/smt/exception_2.unsat.sail b/test/smt/exception_2.unsat.sail new file mode 100644 index 00000000..0a540341 --- /dev/null +++ b/test/smt/exception_2.unsat.sail @@ -0,0 +1,23 @@ +default Order dec + +$include <vector_dec.sail> + +union exception = { + E_bool : bool, + E_unit : unit +} + +register R : bool + +function check_sat((): unit) -> bool = { + try { + if R then { + throw(E_bool(false)) + } else { + false + } + } catch { + E_bool(b) => b, + E_unit() => true + } +} |
