Add Easync to MiniLustre
This commit is contained in:
parent
a1390a5dae
commit
85d06d6d56
3 changed files with 11 additions and 0 deletions
|
@ -85,6 +85,7 @@ 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.Efield -> assert false
|
||||
| Heptagon.Efield_update -> Efield_update
|
||||
| Heptagon.Earray_fill -> Earray_fill
|
||||
|
|
|
@ -108,6 +108,7 @@ and op =
|
|||
| Eequal (** [arg1 = arg2] *)
|
||||
| Efun of fun_name (** "Stateless" [longname <<a_params>> (args) reset r] *)
|
||||
| Enode of fun_name (** "Stateful" [longname <<a_params>> (args) reset r] *)
|
||||
| Easync of fun_name * ack
|
||||
| Eifthenelse (** [if arg1 then arg2 else arg3] *)
|
||||
| Efield_update (** [{ arg1 with a_param1 = arg2 }] *)
|
||||
| Earray (** [[ args ]] *)
|
||||
|
@ -119,6 +120,8 @@ and op =
|
|||
| Eupdate (** [[ arg1 with arg3..arg_n = arg2 ]] *)
|
||||
| Econcat (** [arg1\@\@arg2] *)
|
||||
|
||||
and ack = { ack_name : ack_name; ack_params : static_exp list }
|
||||
|
||||
type pat =
|
||||
| Etuplepat of pat list
|
||||
| Evarpat of var_ident
|
||||
|
|
|
@ -163,6 +163,13 @@ and print_app ff (app, args) =
|
|||
| Efun f | Enode f ->
|
||||
fprintf ff "@[%a@,%a@,%a@]"
|
||||
print_qualname f print_params app.a_params print_w_tuple args
|
||||
| Easync (f, ack) ->
|
||||
fprintf ff "@[async@,%a@,%a@,%a@,on@,%s@,%a@]"
|
||||
print_qualname f
|
||||
print_params app.a_params
|
||||
print_w_tuple args
|
||||
ack.ack_name
|
||||
print_static_exp_tuple ack.ack_params
|
||||
| Eifthenelse ->
|
||||
let e1, e2, e3 = assert_3 args in
|
||||
fprintf ff "@[<hv>if %a@ then %a@ else %a@]"
|
||||
|
|
Loading…
Reference in a new issue