summaryrefslogtreecommitdiff
path: root/test/smt/exception_2.unsat.sail
blob: 795aa867892930e64bffb3057fe426d9be0ce988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
default Order dec

$include <vector_dec.sail>

union exception = {
  E_bool : bool,
  E_unit : unit
}

register R : bool

$property
function prop((): unit) -> bool = {
  try {
    if R then {
       throw(E_bool(true))
    } else {
       true
    }
  } catch {
    E_bool(b) => b,
    E_unit() => false
  }
}