Add Easync to MiniLustre (cont.)
This commit is contained in:
parent
85d06d6d56
commit
df3238cd52
4 changed files with 9 additions and 4 deletions
|
@ -81,11 +81,14 @@ let translate_iterator_type = function
|
|||
| Heptagon.Ifoldi -> Ifoldi
|
||||
| Heptagon.Imapfold -> Imapfold
|
||||
|
||||
let translate_ack { Heptagon.ack_name = name; Heptagon.ack_params = params } =
|
||||
{ ack_name = name; ack_params = params }
|
||||
|
||||
let translate_op = function
|
||||
| Heptagon.Eifthenelse -> Eifthenelse
|
||||
| Heptagon.Efun f -> Efun f
|
||||
| Heptagon.Enode f -> Enode f
|
||||
| Heptagon.Easync (f, ack) -> Easync (f, ack)
|
||||
| Heptagon.Easync (f, ack) -> Easync (f, translate_ack ack)
|
||||
| Heptagon.Efield -> assert false
|
||||
| Heptagon.Efield_update -> Efield_update
|
||||
| Heptagon.Earray_fill -> Earray_fill
|
||||
|
|
|
@ -280,7 +280,8 @@ let rec translate map e =
|
|||
e.e_desc
|
||||
(* Already treated cases when translating the [eq] *)
|
||||
| Minils.Eiterator _ | Minils.Emerge _ | Minils.Efby _
|
||||
| Minils.Eapp ({Minils.a_op=(Minils.Enode _|Minils.Efun _|Minils.Econcat
|
||||
| Minils.Eapp ({Minils.a_op=(Minils.Enode _|Minils.Efun _|Minils.Easync _
|
||||
|Minils.Econcat
|
||||
|Minils.Eupdate|Minils.Eselect_dyn
|
||||
|Minils.Eselect_trunc|Minils.Eselect_slice
|
||||
|Minils.Earray_fill|Minils.Efield_update
|
||||
|
|
|
@ -129,7 +129,8 @@ let typing_app h base pat op w_list = match op with
|
|||
| Efun { qual = Module "Iostream"; name = "fprintf" } ->
|
||||
List.iter (expect_extvalue h base) w_list;
|
||||
Cprod []
|
||||
| ( Efun f | Enode f) ->
|
||||
(* FIXME(Arduino): voir si c'est correct *)
|
||||
| (Efun f | Enode f | Easync (f, _)) ->
|
||||
let node = Modules.find_value f in
|
||||
let pat_id_list = Mls_utils.ident_list_of_pat pat in
|
||||
let rec build_env a_l v_l env = match a_l, v_l with
|
||||
|
|
|
@ -149,7 +149,7 @@ struct
|
|||
let cr = match app1.a_op, app2.a_op with
|
||||
| Efun ln1, Efun ln2 -> compare ln1 ln2
|
||||
| x, y when x = y -> 0 (* all constructors can be compared with P.compare *)
|
||||
| (Eequal | Efun _ | Enode _ | Eifthenelse
|
||||
| (Eequal | Efun _ | Enode _ | Easync _ | Eifthenelse
|
||||
| Efield_update), _ -> -1
|
||||
| (Earray | Earray_fill | Eselect | Eselect_slice | Eselect_dyn
|
||||
| Eselect_trunc | Eupdate | Econcat ), _ -> 1
|
||||
|
|
Loading…
Reference in a new issue