diff options
Diffstat (limited to 'test/smt/exception_3.unsat.sail')
| -rw-r--r-- | test/smt/exception_3.unsat.sail | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/smt/exception_3.unsat.sail b/test/smt/exception_3.unsat.sail new file mode 100644 index 00000000..f0f71945 --- /dev/null +++ b/test/smt/exception_3.unsat.sail @@ -0,0 +1,24 @@ +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 { + return(false); + true + } + } catch { + E_bool(b) => b, + E_unit() => true + } +} |
