diff --git a/compiler/main/hept2mls.ml b/compiler/main/hept2mls.ml index 03b1b71..2361376 100644 --- a/compiler/main/hept2mls.ml +++ b/compiler/main/hept2mls.ml @@ -82,7 +82,7 @@ let rec translate_op = function | Heptagon.Eselect_trunc -> Eselect_trunc | Heptagon.Econcat -> Econcat | Heptagon.Earray -> Earray - | Heptagon.Etuple -> Etuple + | Heptagon.Etuple -> Misc.internal_error "hept2mls Etuple" 1 | Heptagon.Earrow -> assert false let translate_app app = diff --git a/compiler/main/mls2obc.ml b/compiler/main/mls2obc.ml index a6dafa2..e46051b 100644 --- a/compiler/main/mls2obc.ml +++ b/compiler/main/mls2obc.ml @@ -218,7 +218,7 @@ let rec translate map e = |Minils.Eupdate|Minils.Eselect_dyn |Minils.Eselect_trunc|Minils.Eselect_slice |Minils.Earray_fill|Minils.Efield_update - |Minils.Eifthenelse|Minils.Etuple)}, _, _) -> + |Minils.Eifthenelse)}, _, _) -> internal_error "mls2obc" 5 in mk_exp e.Minils.e_ty desc diff --git a/compiler/minils/analysis/clocking.ml b/compiler/minils/analysis/clocking.ml index 2b25832..cf84242 100644 --- a/compiler/minils/analysis/clocking.ml +++ b/compiler/minils/analysis/clocking.ml @@ -84,8 +84,6 @@ and typing_op op e_list h e ck = match op with | (Eequal | Efun _ | Enode _) -> (*LA*) List.iter (fun e -> expect h (skeleton ck e.w_ty) e) e_list; skeleton ck e.e_ty - | Etuple -> - Cprod (List.map (typing_extvalue h) e_list) | Eifthenelse -> let e1, e2, e3 = assert_3 e_list in let ct = skeleton ck e.e_ty diff --git a/compiler/minils/minils.ml b/compiler/minils/minils.ml index e24fe85..a831c3a 100644 --- a/compiler/minils/minils.ml +++ b/compiler/minils/minils.ml @@ -19,7 +19,7 @@ open Clocks (** Warning: Whenever Minils ast is modified, minils_format_version should be incremented. *) -let minils_format_version = "1" +let minils_format_version = "2" type iterator_type = | Imap @@ -78,7 +78,6 @@ and app = { a_op: op; a_params: static_exp list; a_unsafe: bool } and op = | Eequal (** arg1 = arg2 *) - | Etuple (** (args) *) | Efun of fun_name (** "Stateless" longname <> (args) reset r *) | Enode of fun_name (** "Stateful" longname <> (args) reset r *) | Eifthenelse (** if arg1 then arg2 else arg3 *) @@ -183,9 +182,3 @@ let mk_const_dec id ty e loc = let mk_app ?(params=[]) ?(unsafe=false) op = { a_op = op; a_params = params; a_unsafe = unsafe } -(** The modname field has to be set when known, TODO LG : format_version *) -let mk_program o n t c = - { p_modname = Module ""; p_format_version = ""; - p_opened = o; p_nodes = n; p_types = t; p_consts = c } - -let void = mk_exp (Types.Tprod []) (Eapp (mk_app Etuple, [], None)) diff --git a/compiler/minils/mls_printer.ml b/compiler/minils/mls_printer.ml index 7b610c5..0a92b9a 100644 --- a/compiler/minils/mls_printer.ml +++ b/compiler/minils/mls_printer.ml @@ -130,7 +130,6 @@ and print_app ff (app, args) = | Eequal -> let e1, e2 = assert_2 args in fprintf ff "@[<2>%a@ = %a@]" print_extvalue e1 print_extvalue e2 - | Etuple -> print_w_tuple ff args | Efun f | Enode f -> fprintf ff "@[%a@,%a@,%a@]" print_qualname f print_params app.a_params print_w_tuple args diff --git a/compiler/minils/mls_utils.ml b/compiler/minils/mls_utils.ml index e5b4711..dde7852 100644 --- a/compiler/minils/mls_utils.ml +++ b/compiler/minils/mls_utils.ml @@ -13,7 +13,7 @@ open Misc (** Error Kind *) type err_kind = | Enot_static_exp -let err_message ?(exp=void) ?(loc=exp.e_loc) = function +let err_message exp ?(loc=exp.e_loc) = function | Enot_static_exp -> Format.eprintf "%aThe expression %a should be a static_exp.@." print_location loc @@ -24,8 +24,8 @@ let rec static_exp_of_exp e = match e.e_desc with | Eextvalue w -> (match w.w_desc with | Wconst se -> se - | _ -> err_message ~exp:e Enot_static_exp) - | _ -> err_message ~exp:e Enot_static_exp + | _ -> err_message e Enot_static_exp) + | _ -> err_message e Enot_static_exp (** @return the list of bounds of an array type*) let rec bounds_list ty =