diff options
Diffstat (limited to 'src/lem_interp/interp_lib.lem')
| -rw-r--r-- | src/lem_interp/interp_lib.lem | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lem_interp/interp_lib.lem b/src/lem_interp/interp_lib.lem index e4de0d71..1e97e061 100644 --- a/src/lem_interp/interp_lib.lem +++ b/src/lem_interp/interp_lib.lem @@ -127,7 +127,9 @@ let lt_range (V_tuple[v1;v2]) = let bit_to_bool b = match detaint b with | V_lit (L_aux L_zero _) -> false + | V_lit (L_aux L_false _) -> false | V_lit (L_aux L_one _) -> true + | V_lit (L_aux L_true _) -> true end ;; let bool_to_bit b = match b with false -> V_lit (L_aux L_zero Unknown) @@ -137,7 +139,9 @@ let bool_to_bit b = match b with let bitwise_not_bit v = let lit_not (L_aux l loc) = match l with | L_zero -> (V_lit (L_aux L_one loc)) - | L_one -> (V_lit (L_aux L_zero loc)) end in + | L_false -> (V_lit (L_aux L_one loc)) + | L_one -> (V_lit (L_aux L_zero loc)) + | L_true -> (V_lit (L_aux L_zero loc)) end in retaint v (match detaint v with | V_lit lit -> lit_not lit | V_unknown -> V_unknown end) |
