summaryrefslogtreecommitdiff
path: root/abstract/transform.ml
diff options
context:
space:
mode:
Diffstat (limited to 'abstract/transform.ml')
-rw-r--r--abstract/transform.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/abstract/transform.ml b/abstract/transform.ml
index 17fd064..480705f 100644
--- a/abstract/transform.ml
+++ b/abstract/transform.ml
@@ -143,6 +143,7 @@ let rec f_of_neexpr td (node, prefix, clock_scope) where expr =
and f_of_bexpr td (node, prefix, clock_scope) where expr =
let sub = f_of_bexpr td (node, prefix, clock_scope) in
let sub_id = sub (fun x -> x) in
+ let le = loc_error (snd expr) in
match fst expr with
| AST_bool_const b -> where (BConst b)
| AST_binary_bool(AST_AND, a, b) -> where (f_and (sub_id a) (sub_id b))
@@ -159,7 +160,8 @@ and f_of_bexpr td (node, prefix, clock_scope) where expr =
| AST_NE -> E_NE
| _ -> type_error "Invalid operator on enumerated values."
in f_e_op eop x y
- | _ -> invalid_arity "Binary operator")
+ | [NE _; EE _] | [EE _; NE _] -> le type_error "Invalid arguments for binary operator."
+ | _ -> le invalid_arity "Binary operator")
(AST_tuple [a; b], snd expr))
(* Temporal *)
| AST_arrow(a, b) ->
@@ -187,7 +189,7 @@ and f_of_bexpr td (node, prefix, clock_scope) where expr =
| _ -> assert false
in
f_of_neexpr td (node, prefix, clock_scope) ff expr
- | _ -> type_error "Expected boolean value."
+ | _ -> le type_error "Expected boolean value."
and f_of_expr td (node, prefix, clock_scope) expr =
f_of_bexpr td (node, prefix, clock_scope) (fun x -> x) expr