Skip to content
Snippets Groups Projects
split.mli 969 B
Newer Older
(** Time-stamp: <modified the 07/01/2009 (at 17:29) by Erwan Jahier> *)


(** Split the equations of a node into several ones, in such a way
    that there is only one operator per equation. The rationale for
    doing that is to make the clock checking trivial in the lic code
    (indeed, nested node call makes it tricky).

    We also split tuples. For example, the equation:

        (a, b, c) =  (1, 2, 3)  -> titi(x); 

    is splitted into 4 equations:

       a = 1 -> _v1;
       b = 2 -> _v2;
       c = 3 -> _v3;
       (_v1, _v2, _v3) = titi(x);

    The node local_env is provided so that we can update its table, as
    we add some fresh local variables during the code transmation.
val node : Eff.local_env -> Eff.node_exp -> Eff.node_exp


(** Split an equation in to several ones ; also returns the new
    variables to be declared *)
val eq : Eff.local_env -> Eff.eq_info Lxm.srcflagged -> 
  (Eff.eq_info Lxm.srcflagged) list * Eff.var_info list