etuple removed

master
Leonard Gerard 13 years ago
parent 5c831db40b
commit c0602c6df6

@ -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 =

@ -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

@ -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

@ -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 <<a_params>> (args) reset r *)
| Enode of fun_name (** "Stateful" longname <<a_params>> (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))

@ -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

@ -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 =

Loading…
Cancel
Save