From 65695130641571be37490092adafb739f43a6b74 Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Wed, 1 Jun 2011 13:58:15 +0200
Subject: [PATCH] Fix several bugs in static argument handling, in particular
 when parametric nodes (or predef iterators) are nested.

Before, nested iterators were handles as follows : a source-level
(i.e., not compiled) alias node was created on-the-fly, and then
compiled. But this way to proceed was buggy for static args coming
from nested iterators or nested parametric nodes.

Now, I rely on Inline.iterators to get rid of iterators (the iterator
inlining is now recursive).
---
 src/Makefile                          |   4 +-
 src/eff.ml                            |  27 +-
 src/evalClock.ml                      |   5 +-
 src/getEff.ml                         | 114 ++--
 src/getEff.mli                        |   2 +-
 src/ident.ml                          |   2 +-
 src/inline.ml                         | 164 +++---
 src/inline.mli                        |   7 +-
 src/lazyCompiler.ml                   | 719 +++++++++++++++-----------
 src/licDump.ml                        |  21 +-
 src/licDump.mli                       |   3 +-
 src/main.ml                           |   4 +-
 src/name.ml                           |  14 +-
 src/name.mli                          |   4 +-
 src/polymorphism.ml                   |  24 +-
 src/polymorphism.mli                  |  13 +-
 src/predefEvalType.ml                 |  12 +-
 src/split.ml                          |  85 +--
 src/split.mli                         |  14 +-
 src/structArrayExpand.ml              |   2 +-
 src/test/should_work/demo/alias.lus   |   2 +-
 src/test/should_work/lionel/minus.lus |   1 +
 src/test/test.res.exp                 | 599 +++++++--------------
 src/test/test_ec.res.exp              |   2 +-
 src/test/test_lv4.res.exp             | 156 ++----
 25 files changed, 924 insertions(+), 1076 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 7108acd8..dc6ec7d5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -78,12 +78,12 @@ SOURCES =  \
 	./uniqueOutput.ml \
 	./split.mli \
 	./split.ml \
-	./nodesExpand.mli \
-	./nodesExpand.ml \
 	./inline.mli \
 	./inline.ml \
 	./getEff.mli \
 	./getEff.ml \
+	./nodesExpand.mli \
+	./nodesExpand.ml \
 	./lazyCompiler.ml \
 	./lazyCompiler.mli \
 	./compile.ml \
diff --git a/src/eff.ml b/src/eff.ml
index d6288ec9..1f5ae570 100644
--- a/src/eff.ml
+++ b/src/eff.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 22/01/2010 (at 14:32) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:21) by Erwan Jahier> *)
 
 (** 
 
@@ -289,7 +289,7 @@ and clock =
     N.B. une horloge formelle est soit None (base) soit l'index d'une
     entrée (0..nb entrées-1). Les formal-clocks sont créées au cours du
     type-checking (et pas du clock-checking)
-*)
+*) 
 and node_exp = {
   node_key_eff : node_key;
   inlist_eff   : var_info list;
@@ -317,10 +317,10 @@ and node_key = item_key * static_arg list
 and static_arg =
   | ConstStaticArgEff of (Ident.t * const)
   | TypeStaticArgEff  of (Ident.t * type_)
-  | NodeStaticArgEff  of (Ident.t * sarg_node_eff)
+  | NodeStaticArgEff  of (Ident.t * sarg_node_eff * node_exp)
+
+and sarg_node_eff = node_key * var_info list * var_info list
 
-and sarg_node_eff = item_key * var_info list * var_info list
-        
 (****************************************************************************)
 (** Type check_flag
 
@@ -387,6 +387,13 @@ type local_env = {
   lenv_vars  : (Ident.t, var_info) Hashtbl.t ; 
 }
 
+(* Just to group those 3 ones *)
+type node_env = {
+  local : local_env;
+  global: id_solver;
+}
+
+
 let (lookup_type: local_env -> Ident.idref -> Lxm.t -> type_) = 
   fun env id lxm -> 
     Hashtbl.find env.lenv_types (Ident.name_of_idref id)
@@ -421,7 +428,7 @@ let (make_local_env : node_key -> local_env) =
         (function
            | ConstStaticArgEff(id,ce) -> Hashtbl.add res.lenv_const id ce
            | TypeStaticArgEff(id,te)  -> Hashtbl.add res.lenv_types id te
-           | NodeStaticArgEff(id, ne) -> Hashtbl.add res.lenv_nodes id ne
+           | NodeStaticArgEff(id, ne, _) -> Hashtbl.add res.lenv_nodes id ne
         )
         (snd nk);
       
@@ -532,8 +539,16 @@ let (clock_of_left: left -> clock) =
     snd (var_info_of_left left).var_clock_eff
 
 
+
+let find_var_info lxm vars id =
+  try Hashtbl.find vars.SyntaxTreeCore.vartable id
+  with Not_found -> 
+    raise (Errors.Compile_error (lxm,"\n*** Unknown ident: " ^ (Ident.to_string id)))
+
+
 (*---------------------------------------------------------------------
 Une erreur associée à un noeud + 1 lexeme dans le fichier source
 ----------------------------------------------------------------------*)
 exception Compile_node_error of node_key * Lxm.t * string
 exception Global_node_error of node_key * string
+
diff --git a/src/evalClock.ml b/src/evalClock.ml
index f1219134..2df562fc 100644
--- a/src/evalClock.ml
+++ b/src/evalClock.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 13/04/2010 (at 18:03) by Erwan Jahier> *)
+(** Time-stamp: <modified the 20/05/2011 (at 16:13) by Erwan Jahier> *)
  
   
 open Predef
@@ -6,7 +6,6 @@ open PredefEvalConst
 open SyntaxTree
 open SyntaxTreeCore
 open Eff
-open LicDump
 open Printf
 open Lxm
 open Errors
@@ -120,7 +119,7 @@ let rec (var_info_eff_of_left_eff: Eff.left -> Eff.var_info) =
 
   | LeftSliceEff (l,si,_) -> 
       let v = var_info_eff_of_left_eff l in
-      let new_name = (Ident.to_string v.var_name_eff) ^ (string_of_slice_info_eff si)
+      let new_name = (Ident.to_string v.var_name_eff) ^ (LicDump.string_of_slice_info_eff si)
       in
         { v with  var_name_eff = Ident.of_string new_name }
 
diff --git a/src/getEff.ml b/src/getEff.ml
index 673e1b28..e69bcec3 100644
--- a/src/getEff.ml
+++ b/src/getEff.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 22/04/2010 (at 10:54) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:38) by Erwan Jahier> *)
 
 
 open Lxm
@@ -101,24 +101,21 @@ and (clock_check_equation:Eff.id_solver -> Lxm.t -> UnifyClock.subst ->
 
 
 (******************************************************************************)
-(* exported *)
 let (dump_polymorphic_nodes : Eff.type_ -> unit) =
   fun t -> 
-    let nodes =
-      Polymorphism.unstack_polymorphic_nodes StructArrayExpand.node t 
-    in
+    let node_stack = Polymorphism.unstack_polymorphic_nodes t in
       List.iter
-        (fun (id_solver,nenv,node) -> 
-	   let node = 
-	     if !Global.inline_iterator 
-	     then Inline.iterators nenv id_solver node
-	     else node
-	   in
-	   let str = LicDump.node_of_node_exp_eff node in
-	     output_string !Global.oc str
+        (fun (nenv, node) -> 
+           let nnodes = [node] in
+             List.iter
+               (fun (node) -> 
+	          let str = LicDump.node_of_node_exp_eff node in
+	            output_string !Global.oc str
+               )
+               nnodes;
         )
-        nodes;
-      Polymorphism.reset_type ()        
+        node_stack
+
 
 (******************************************************************************)
 let (get_static_params_from_idref : SymbolTab.t -> Lxm.t -> Ident.idref ->
@@ -249,14 +246,12 @@ and (check_static_arg : Eff.id_solver ->
             let sargs = [] in
             let neff = node_id_solver.id2node idref sargs sa.src in
             let (inlist, outlist) = check_node_arg neff vii vio in
-            let neff = fst neff.node_key_eff in
-              NodeStaticArgEff (id, (neff, inlist, outlist))
+              NodeStaticArgEff (id, (neff.node_key_eff, inlist, outlist), neff)
 
         | StaticArgNode(CALL_n ne), StaticParamNode(id,vii,vio,_) ->
             let neff = node node_id_solver ne in
             let (inlist, outlist) = check_node_arg neff vii vio in
-            let neff = fst neff.node_key_eff in
-              NodeStaticArgEff (id, (neff, inlist, outlist))
+              NodeStaticArgEff (id, (neff.node_key_eff, inlist, outlist), neff)
 
         | StaticArgNode(Predef_n (op,sargs)), StaticParamNode(id,vii,vio,_) ->
             let sargs_eff = 
@@ -264,8 +259,7 @@ and (check_static_arg : Eff.id_solver ->
             in
             let opeff = PredefEvalType.make_node_exp_eff None op sa.src sargs_eff in
             let (inlist, outlist) = check_node_arg opeff vii vio in
-            let opeff = fst opeff.node_key_eff in
-              NodeStaticArgEff (id, (opeff, inlist, outlist))
+              NodeStaticArgEff (id, (opeff.node_key_eff, inlist, outlist), opeff)
 
         | StaticArgNode(      
             (MERGE_n _|ARRAY_SLICE_n _|ARRAY_ACCES_n _|STRUCT_ACCESS_n _|IDENT_n _
@@ -285,8 +279,8 @@ and (check_static_arg : Eff.id_solver ->
     in
       sa_eff
 
-(******************************************************************************)
 
+(******************************************************************************)
 
 (* exported *)
 and (eq:Eff.id_solver -> SyntaxTreeCore.eq_info srcflagged -> Eff.eq_info srcflagged) =
@@ -410,12 +404,17 @@ and (translate_val_exp : Eff.id_solver -> UnifyClock.subst ->
                     let type_l_exp = snd (List.split (fst iter_profile)) in
                     let sargs_eff = 
                       if List.length type_l <> List.length type_l_exp then
-                        raise (Compile_error(lxm, "the iterator has a wrong arity."))
+                        let str = Printf.sprintf 
+                          "the iterator has a wrong arity: %s instead of %s"
+                          (string_of_int (List.length type_l))
+                          (string_of_int (List.length type_l_exp))
+                        in
+                        raise (Compile_error(lxm, str))
                       else
                       match UnifyType.f type_l type_l_exp with
                         | UnifyType.Equal -> sargs_eff
                         | UnifyType.Unif typ ->
-                            (* the iterated nodes was polymorphic, but we know here
+                            (* The iterated nodes was polymorphic, but we know here
                                that the type variable was [typ]. 
                             *)
                             dump_polymorphic_nodes typ;
@@ -570,7 +569,7 @@ and (instanciate_type: Eff.type_ -> Eff.static_arg -> Eff.static_arg) =
       match sarg with
 	| ConstStaticArgEff _ -> sarg
 	| TypeStaticArgEff _ -> sarg (* we cannot denote polymorphic type... *)
-	| NodeStaticArgEff(id,(node,il,ol)) ->
+	| NodeStaticArgEff(id,((node, sargs),il,ol),neff) ->
 	    let node = match Ident.idref_of_long node with
 	      |  { id_pack = Some "Lustre" ; id_id = "times" } -> 
 		   let op = if t = Int_type_eff then "itimes" else "rtimes" in
@@ -629,7 +628,14 @@ and (instanciate_type: Eff.type_ -> Eff.static_arg -> Eff.static_arg) =
 	    let il = List.map instanciate_var_info il 
 	    and ol = List.map instanciate_var_info ol 
 	    in
-	      NodeStaticArgEff(id,(node,il,ol))
+            let neff = { 
+              neff with 
+                node_key_eff = (node,sargs);
+                inlist_eff = il;
+                outlist_eff = ol;
+            }
+            in
+	      NodeStaticArgEff(id,((node,sargs),il,ol),neff)
 
 (* exported *)
 and (translate_predef_static_args: Eff.id_solver -> 
@@ -647,61 +653,10 @@ and (translate_predef_static_args: Eff.id_solver ->
 
       | [{src=lxm_n;it=node}; {src=lxm_c;it=const}] -> 
           let node_eff = get_node id_solver node lxm_n in
-            (* There is two cases:
-               
-               - node_eff is a simple node (no static arg). Then there
-               is nothing special todo. We use it to build the static arg.
-
-               - node_eff is a node with static arguments. We need to
-               unnest this. Therefore, we create on-the-fly an alias
-               pointing to this node_eff, compile it, and use the
-               result (which is then a simple node) as the current
-               node_eff.  *)
-
-          let node_eff =
-            if snd node_eff.node_key_eff = [] then
-              node_eff
-            else
-              (* 
-                 - create a fresh node alias name (node_alias)
-                 - build a fake node_info containing the alias definition
-                 - add this entry in the SymbolTab (via id_solver.symbols)
-                 - call id_solver.id2node on node_alias to compile this new node
-              *)
-              let node_alias_str =  Name.node_key node_eff.node_key_eff "node_alias" in
-              let node_alias_idref = Ident.idref_of_string node_alias_str in
-              let node_alias_ident = Ident.of_string node_alias_str in
-              let by_pos_op  =
-                match node with
-                  | StaticArgNode(by_pos_op) -> by_pos_op
-                  | StaticArgIdent(id) -> assert false
-                  | StaticArgType _ 
-                  | StaticArgConst _ -> 
-                      raise (Compile_error(lxm_n, "a node was expected"))
-              in 
-              let node_alias_info = 
-                { src = lxm_n ;
-                  it =  {
-                    name = node_alias_ident;
-                    static_params = [] ;
-                    vars = None;
-                    loc_consts = [];
-                    def  = Alias { src = lxm_n ; it = by_pos_op };
-                    has_mem = node_eff.has_mem_eff;
-                    is_safe = node_eff.is_safe_eff;
-                  }
-                }
-              in
-              let _ = 
-                SymbolTab.add_node id_solver.symbols node_alias_ident node_alias_info
-              in
-                id_solver.id2node node_alias_idref [] lxm_n
-          in            
           let node_arg = 
-            fst node_eff.node_key_eff, node_eff.inlist_eff, node_eff.outlist_eff 
+             node_eff.node_key_eff, node_eff.inlist_eff, node_eff.outlist_eff 
           in
-
-            [NodeStaticArgEff(Ident.of_string "node", node_arg);
+            [NodeStaticArgEff(Ident.of_string "node", node_arg, node_eff);
              ConstStaticArgEff(Ident.of_string "size",get_const id_solver const lxm_c)]
       | _ ->  
           raise (Compile_error(lxm, "bad arguments number for array iterator"))
@@ -751,3 +706,4 @@ let (assertion : Eff.id_solver -> SyntaxTreeCore.val_exp Lxm.srcflagged ->
       
 
 (******************************************************************************)
+(******************************************************************************)
diff --git a/src/getEff.mli b/src/getEff.mli
index 01832639..4df77c6e 100644
--- a/src/getEff.mli
+++ b/src/getEff.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 12/03/2009 (at 11:14) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:24) by Erwan Jahier> *)
 
 
 (** This module defines functions that translate SyntaxTreeCore datatypes into
diff --git a/src/ident.ml b/src/ident.ml
index 907a2cff..38f54c5e 100644
--- a/src/ident.ml
+++ b/src/ident.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 03/11/2010 (at 15:00) by Erwan Jahier> *)
+(** Time-stamp: <modified the 20/05/2011 (at 16:30) by Erwan Jahier> *)
 
 (* J'ai appele ca symbol (mais ca remplace le ident) :
 c'est juste une couche qui garantit l'unicite en memoire
diff --git a/src/inline.ml b/src/inline.ml
index 5cc0e4b3..9a8d68f0 100644
--- a/src/inline.ml
+++ b/src/inline.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 13/05/2009 (at 16:35) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 10:48) by Erwan Jahier> *)
 
 
 open Lxm
@@ -18,7 +18,7 @@ let new_var str node_env type_eff clock_eff =
       var_clock_eff  = id, clock_eff;
     }
   in
-    Hashtbl.add node_env.lenv_vars id var;
+    Hashtbl.add node_env.local.lenv_vars id var;
     var
 
 (********************************************************************************)
@@ -61,13 +61,16 @@ let (check_clock_and_type :
 (* The functions below accumulate 
    (1) the new equations 
    (2) the fresh variables. 
+
 *)
-type inline_acc = (Eff.eq_info srcflagged) list * Eff.var_info list
+type inline_acc = (Eff.eq_info srcflagged) list * Eff.var_info list 
+(* * Eff.node_exp list *)
 
-let rec (inline_eq: Eff.local_env -> 
-          Eff.id_solver -> inline_acc -> Eff.eq_info srcflagged -> inline_acc) =
-  fun node_env id_solver (eqs, locs) eq -> 
+let rec (inline_eq:  Eff.node_env -> inline_acc -> Eff.eq_info srcflagged -> inline_acc) =
+  fun node_env (eqs_acc, locs_acc) eq ->
     let { src = lxm_eq ; it = (lhs, rhs) } = eq in
+    let (eqs, locs) = [],[] in
+    let neqs, nlocs =
       match rhs.core with
         | CallByPosEff(
             {src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "map"),sargs)}})}, 
@@ -86,48 +89,47 @@ let rec (inline_eq: Eff.local_env ->
                <=>
 	       for all i = 0, ..., c-1; (Y1[i], ... ,Yl[i]) = N(X_1[i], ... ,X_k[i])
             *)
-            let ((node,inlist,outlist),c) = match sargs with
-              | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(_,node)]
-              | [NodeStaticArgEff(_,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
+            let (node,c) = match sargs with
+              | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(_,_node_key, node)]
+              | [NodeStaticArgEff(_,_node_key,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
                   node, c
               | _  -> assert false (* todo: issue an error *)
             in
-            let node = id_solver.id2node (Ident.idref_of_long node) [] lxm_ve in
             let node = flagit node lxm_ve in
             let index_list = fill 0 c in
-              List.fold_left
-                (fun (eqs,locs) i -> 
-                   let lhs = List.map
-                     (fun lp -> 
-                        let t_elt = elt_type_of_array [type_of_left lp] in
-                          LeftArrayEff(lp, i, t_elt)) 
-                     lhs  
-                   in
-                   let args = 
-                     List.map
-                       (fun arg -> 
-                          let targ = arg.typ in
-                          let t_elt = elt_type_of_array targ in
-                          let op_flg = { src = lxm_ve ; it = ARRAY_ACCES(i) } in
-                          let narg = {
-                            core = CallByPosEff(op_flg, OperEff [arg]);
-                            typ = [t_elt];
-                            clk = arg.clk
-                          }
-                          in
-			    narg
-		       ) 
-                       args
-                   in
-                   let nrhs = { rhs with core =
-                       CallByPosEff({ src = lxm_ve ; it = (CALL node)}, OperEff args) }
-                   in
-                   let eq = { src = lxm_eq ; it = (lhs, nrhs) } in
-                     (eq::eqs,locs) 
-                )
-                (eqs,locs)
-                index_list
-
+              (List.fold_left
+                 (fun (eqs,locs) i -> 
+                    let lhs = List.map
+                      (fun lp -> 
+                         let t_elt = elt_type_of_array [type_of_left lp] in
+                           LeftArrayEff(lp, i, t_elt)) 
+                      lhs  
+                    in
+                    let args = 
+                      List.map
+                        (fun arg -> 
+                           let targ = arg.typ in
+                           let t_elt = elt_type_of_array targ in
+                           let op_flg = { src = lxm_ve ; it = ARRAY_ACCES(i) } in
+                           let narg = {
+                             core = CallByPosEff(op_flg, OperEff [arg]);
+                             typ = [t_elt];
+                             clk = arg.clk
+                           }
+                           in
+			     narg
+		        )
+                        args
+                    in
+                    let nrhs = { rhs with core =
+                        CallByPosEff({ src = lxm_ve ; it = (CALL node)}, OperEff args) }
+                    in
+                    let eq = { src = lxm_eq ; it = (lhs, nrhs) } in
+                        (eq::eqs,locs) 
+                 )
+                 (eqs,locs)
+                 index_list)
+                
 
         | CallByPosEff(
             {src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "red"),sargs)}})}, 
@@ -157,13 +159,12 @@ let rec (inline_eq: Eff.local_env ->
 	       such that, for all i = 0, ..., c-1; 
                (acc_i+1, Y1[i], ... ,Yl[i]) = N(acc_i,X_1[i], ... ,X_k[i])
             *)
-            let ((node,_,_),c) = match sargs with
-              | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(_,node)]
-              | [NodeStaticArgEff(_,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
-                  node, c
+            let (id,node,c) = match sargs with
+              | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(id,_,node)]
+              | [NodeStaticArgEff(id,_,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
+                  id, node, c
               | _  -> assert false (* todo: issue an error *)
             in
-            let node = id_solver.id2node (Ident.idref_of_long node) [] lxm_ve in
             let node = flagit node lxm_ve in
             let index_list = fill 0 c in
               (* Retreive acc_in and acc_out *)
@@ -272,7 +273,7 @@ let rec (inline_eq: Eff.local_env ->
               core = CallByPosEff({src=lxm_ve;it=boolred_op}, OperEff [arg]) } 
             in
             let eq = { src = lxm_eq ; it = (lhs, rhs) } in
-	      inline_eq node_env id_solver (eqs, locs) eq
+	      inline_eq node_env (eqs, locs) eq
 
         | CallByPosEff(
             {src=lxm_ve;it=CALL ({it = {node_key_eff = (("Lustre", "nor"),_)}})}, 
@@ -300,12 +301,13 @@ let rec (inline_eq: Eff.local_env ->
               core = CallByPosEff({src=lxm_ve;it=boolred_op}, OperEff [arg]) }
             in
             let eq = { src = lxm_eq ; it = (lhs, rhs) } in	      
-	      inline_eq node_env id_solver (eqs, locs) eq
+	      inline_eq node_env (eqs, locs) eq
 
         | CallByPosEff({src=lxm_ve;it=CALL (
                           {it = {node_key_eff = (("Lustre", "boolred"),sargs)}})}, 
                        OperEff args)
-        | CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.BoolRed,sargs)}, OperEff args) ->
+        | CallByPosEff({src=lxm_ve;it=Eff.Predef(Predef.BoolRed,sargs)},
+                       OperEff args) ->
             (* Given 
                - 3 integers i, j, k
                boolref<<i,j,k>> has the profile:  bool^n -> bool
@@ -350,7 +352,7 @@ let rec (inline_eq: Eff.local_env ->
                   core = CallByPosEff(and_op, OperEff [i_inf_cpt; cpt_if_j]) }
             in 
             let eq = 
-              check_clock_and_type id_solver lxm_eq rhs Bool_type_eff res_clock;
+              check_clock_and_type node_env.global lxm_eq rhs Bool_type_eff res_clock;
               { src = lxm_eq ; it = (lhs, rhs) } 
             in
             let eq_cpt = 
@@ -394,40 +396,60 @@ let rec (inline_eq: Eff.local_env ->
                   (make_ite (List.hd index_list))
                   (List.tl index_list)
               in
-                check_clock_and_type id_solver lxm_eq rhs Int_type_eff res_clock;
+                check_clock_and_type node_env.global lxm_eq rhs Int_type_eff res_clock;
                 { src = lxm_eq ; it = (lhs, rhs) }
             in
-              if !Global.one_op_per_equation then
-                let eqs_res, vars_res =  Split.eq node_env eq in
-                let eqs_cpt, vars_cpt = Split.eq node_env eq_cpt in
-                let eqs = List.rev_append (eqs_res@eqs_cpt) eqs 
-                and locs = cpt::(List.append vars_res (List.append vars_cpt locs))
-                in
-                  (eqs, locs)
-              else
-                (eq::eq_cpt::eqs, cpt::locs)
-                  (* All the other operators *) 
+              (eq::eq_cpt::eqs, cpt::locs)
 
-        | _ -> 
+        (* All the other operators (trying to avoid a too brutal catch-all...) *)
+        | CallByPosEff
+            ({it=(
+              CALL _| Predef _ |MERGE _|ARRAY_SLICE _|ARRAY_ACCES _|STRUCT_ACCESS _|ARRAY _
+              |HAT (_, _)|WITH _|WHEN _|IDENT _|CONCAT|TUPLE
+              |CURRENT|FBY|ARROW|PRE)},  OperEff args) 
+          -> 
+            let _ =
+              Verbose.printf ~level:3 "*** Inlining iterators: nothing to do in %s\n"
+                (LicDump.string_of_val_exp_eff rhs);
+              flush stdout
+            in
+              (eq::eqs, locs)
+        | CallByNameEff _ -> 
             (eq::eqs, locs)
-
-              
-
+    in
+      (* nb: we could recursively inline iterators contained in [OperEff args] ;
+         but when compiled with !Global.one_op_per_equation, it is not necessary 
+      *)
+      (* fixpoint *)
+    let neq = List.hd neqs in
+      if neq = eq then 
+        (neqs@eqs_acc, nlocs@locs_acc)
+      else
+        let locs_acc = nlocs@locs_acc in
+        let neqs, nlocs = List.split (List.map (inline_eq node_env ([], [])) neqs) in
+          (List.flatten neqs)@eqs_acc,
+          (List.flatten nlocs)@locs_acc
 
 (* exported *)
-and (iterators : Eff.local_env -> Eff.id_solver -> Eff.node_exp -> Eff.node_exp) =
-  fun node_env id_solver n ->
+and (iterators : Eff.node_env -> Eff.node_exp -> Eff.node_exp) =
+  fun node_env n ->
+    let _ =
+      Verbose.printf ~level:3 "*** Inlining iterators of node %s\n"
+        (LicDump.string_of_node_key_iter n.node_key_eff);
+      flush stdout
+    in
     match n.def_eff with
       | ExternEff 
       | AbstractEff None -> n
       | AbstractEff (Some pn) -> 
-          { n with def_eff = AbstractEff (Some (iterators node_env id_solver pn)) }
+          let node_exp = iterators node_env pn in
+            { n with def_eff = AbstractEff (Some node_exp) }
       | BodyEff b -> 
           Name.reset_local_var_prefix "acc";
           Name.reset_local_var_prefix "cpt";
           let nv = match n.loclist_eff with None -> [] | Some l -> l in
           let (neqs, nv) = 
-            List.fold_left (inline_eq node_env id_solver) ([], nv) b.eqs_eff 
+            List.fold_left (inline_eq node_env) ([], nv) b.eqs_eff 
           in
           let nb = { b with eqs_eff = List.rev neqs } in
           let res =
diff --git a/src/inline.mli b/src/inline.mli
index 0f2e46a6..83986dda 100644
--- a/src/inline.mli
+++ b/src/inline.mli
@@ -1,10 +1,11 @@
-(** Time-stamp: <modified the 20/11/2008 (at 13:44) by Erwan Jahier> *)
+(** Time-stamp: <modified the 30/05/2011 (at 17:12) by Erwan Jahier> *)
 
 
-(** Inline iterators
+(** Inline (expand) iterators.
 
     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 iterators : Eff.local_env -> Eff.id_solver -> Eff.node_exp -> Eff.node_exp
+val iterators : Eff.node_env -> Eff.node_exp -> Eff.node_exp 
+(* * Eff.node_exp list *)
diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml
index a2a36b14..2c88c838 100644
--- a/src/lazyCompiler.ml
+++ b/src/lazyCompiler.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 29/09/2010 (at 16:20) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:40) by Erwan Jahier> *)
 
 
 open Lxm
@@ -214,18 +214,37 @@ let (lookup_node_exp_eff:
        (Eff.node_key, Eff.node_exp Eff.check_flag) Hashtbl.t -> 
       Eff.node_key -> Lxm.t -> Eff.node_exp) = 
   fun tbl key lxm -> 
-    try lookup_x_eff "node ref "  (fun k -> fst k) tbl key lxm
+    try 
+      let node_exp = lookup_x_eff "node ref "  (fun k -> fst k) tbl key lxm in
+        Verbose.exe ~level:3
+          (fun () -> 
+             Printf.printf "\n*** %s Founded! \n" (LicDump.string_of_node_key_iter key);
+             flush stdout
+          );
+        node_exp
     with 
 	Not_found -> 
 	  if fst (fst key) = "Lustre" then (
-	    let msg = "*** " ^ (snd (fst key)) ^ ": unknown Lustre operator. "^
-	      "Available operators are:\n" ^
-	    (Hashtbl.fold (fun (long,_) _ acc -> acc ^  ("\t - "^ (Ident.string_of_long long ) ^ "\n")) tbl "")
+	    let msg = (LicDump.string_of_node_key_iter key) ^ ": unknown Lustre operator. "^
+	      "\n*** Available operators in the current scope are:\n" ^
+	      (Hashtbl.fold (fun nk _ acc -> acc ^ 
+                               ("\t - "^ (LicDump.string_of_node_key_iter nk) ^ "\n")) tbl "")
 	    in
               raise (Compile_error(lxm, msg))
 	  )
 	  else 
-	    raise Not_found
+            (
+              Verbose.exe ~level:3
+                ( fun () -> 
+                    Printf.printf "\n*** Don't find %s in " 
+                      (LicDump.string_of_node_key_iter key);
+                    Hashtbl.iter (fun nk _ -> 
+                                    Printf.printf "%s, " (LicDump.string_of_node_key_iter nk);
+                                 ) tbl;
+                    flush stdout
+                );
+              raise Not_found
+            )                       
 (*   lookup_x_eff "node ref "  (fun k -> fst k) *)
 
 
@@ -264,6 +283,18 @@ let solve_x_idref
             (raise (Compile_error(lxm,"unbounded " ^ x_label ^ " ident")))
 
 
+
+
+(******************************************************************************)
+
+let find_var_info lxm vars id =
+  try Hashtbl.find vars.vartable id
+  with Not_found -> 
+    raise (Compile_error (lxm,"\n*** Unknown ident: " ^ (Ident.to_string id)))
+
+
+
+
 (* And now we can start the big mutually recursive definition... *)
 
 (** Tabulated version of [type_check_do]. *)
@@ -381,8 +412,6 @@ and (const_check_interface_do: t -> Ident.long -> Lxm.t -> SymbolTab.t ->
                 else
                   Eff.Abstract_const_eff (id, teff, body_const_eff, is_exported)
                     
-                    
-
         | Eff.Enum_const_eff (_, _), _
         | Eff.Bool_const_eff _, _
         | Eff.Int_const_eff _, _
@@ -581,6 +610,9 @@ and (const_check_do : t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool ->
 
 
 (******************************************************************************)
+
+
+
 and (node_check_interface_do: t -> Eff.node_key -> Lxm.t ->
       SymbolTab.t -> Ident.pack_name -> SyntaxTreeCore.node_info srcflagged ->
       Eff.node_exp) =
@@ -669,6 +701,15 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
        local bindinds will be added later (side effect)
     *)
     let local_env = make_local_env nk in
+    let _ =
+      Verbose.exe ~level:3
+        ( fun () -> 
+            Printf.printf "*** local_env while entering (node_check_do %s):\n" 
+              (LicDump.string_of_node_key_rec nk);
+            LicDump.dump_local_env local_env;
+            flush stdout
+        )
+    in
     let node_id_solver = {
       (* a [node_id_solver] is a [id_solver] where we begin to look
          into the local environement before looking at the global
@@ -688,13 +729,23 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
         (fun id lxm ->
            try lookup_type local_env id lxm
            with Not_found ->
+             Verbose.exe ~level:3 (
+               fun () ->
+                 Printf.printf "*** Dont find type %s in local_env\n" (Ident.string_of_idref id);
+                 Printf.printf "*** local_env.lenv_types contain def for: ";
+                 Hashtbl.iter 
+                   (fun id t -> 
+                      Printf.printf "%s, " (Ident.to_string id) )
+                   local_env.lenv_types;
+                 Printf.printf "\n";
+                 flush stdout);
              solve_type_idref  this symbols provide_flag pack_name id lxm);
       id2node  =
         (fun id sargs lxm ->
            (try
-              let node_id, inlist, outlist = lookup_node local_env  id sargs lxm in
+              let (node_id,sargs), inlist, outlist = lookup_node local_env  id sargs lxm in
 	      let node_id = Ident.idref_of_long node_id in
-	        solve_node_idref this symbols provide_flag pack_name node_id  [] lxm
+	        solve_node_idref this symbols provide_flag pack_name node_id sargs lxm
                   (*                node_check this (node_id,[]) lxm   *)
 
             with 
@@ -706,126 +757,125 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
       symbols  = symbols;
     }
     in
-    let find_var_info lxm vars id =
-      try Hashtbl.find vars.vartable id
-      with Not_found -> 
-        raise (Compile_error 
-                 (lxm,"\n*** Unknown ident: " ^ (Ident.to_string id)))
-    in
-    let make_node_eff node_def_eff = (
+    let make_node_eff id node_def_eff = (
       (* building not aliased nodes *)
-Verbose.exe ~level:3 ( fun () ->
-Printf.printf "* local_env while entering make_node_eff:\n";
-LicDump.dump_local_env local_env
-);
-		(********************************************************)
+      Verbose.exe ~level:3 
+        ( fun () -> 
+            Printf.printf "*** local_env while entering (make_node_eff %s):\n" (Ident.to_string id);
+            LicDump.dump_local_env local_env
+        );
+      (********************************************************)
       (* LOCAL CONSTANTS are evaluated and added to local_env *)
-		(********************************************************)
-		(* init intermediate table *)
-		let sz = List.length node_def.it.loc_consts in
-		let temp_const_eff_tab : (Ident.long, Eff.const Eff.check_flag) Hashtbl.t =
-			Hashtbl.create sz
-		in
-		let temp_const_def_tab : (Ident.t,(Lxm.t * SyntaxTreeCore.type_exp option * SyntaxTreeCore.val_exp)) Hashtbl.t =
-			Hashtbl.create sz
+      (********************************************************)
+      (* init intermediate table *)
+      let sz = List.length node_def.it.loc_consts in
+      let temp_const_eff_tab : (Ident.long, Eff.const Eff.check_flag) Hashtbl.t =
+	Hashtbl.create sz
+      in
+      let temp_const_def_tab :
+          (Ident.t,(Lxm.t * SyntaxTreeCore.type_exp option * SyntaxTreeCore.val_exp)) Hashtbl.t =
+	Hashtbl.create sz
+      in
+      let init_local_const (lxm, cinfo) = (
+	match cinfo with
+	  | DefinedConst (i,topt,ve) -> (
+	      Verbose.printf ~level:3 " * local const %s will be treated\n" i;
+	      Hashtbl.add temp_const_def_tab i (lxm,topt,ve)
+	    )
+	  | ExternalConst _ 
+	  | EnumConst _ -> (
+	      let msg = "*** abstract constant bot allowed within node "
+	      in
+		raise (Compile_error(lxm, msg))
+	    )
+      ) in
+	List.iter init_local_const node_def.it.loc_consts ;
+	(* differs from node_id_solver only on id2const *)
+	let rec local_id_solver = {
+          id2var   = node_id_solver.id2var;
+          id2const = local_id2const;
+          id2type  = node_id_solver.id2type;
+          id2node  = node_id_solver.id2node;
+          symbols  = node_id_solver.symbols;
+	}
+	and treat_local_const id = (
+  	  Verbose.printf ~level:3 " * call treat_local_const %s\n" id;
+	  let id_key = ("", id) in
+	    try (
+	      let ce = lookup_const_eff temp_const_eff_tab id_key lxm in
+		Verbose.printf ~level:3 " * const %s already treated = %s\n" 
+                  id (LicDump.string_of_const_eff ce);
+		ce
+	    ) with Not_found -> (
+	      let (lxmdef, toptdef, vedef) = Hashtbl.find temp_const_def_tab id in
+		Verbose.printf ~level:3 " * const %s not yet treated ...\n" id ;
+		(* yes, not yet checked *) 
+		Hashtbl.add temp_const_eff_tab id_key Checking ;
+		(* computes the value with EvalConst.f id_solver ve ... *)
+		let ce = match (EvalConst.f local_id_solver vedef) with
+		  | [ceff] -> (
+		      match toptdef with
+			| None -> ceff
+			| Some texp -> (
+			    let tdecl = GetEff.typ local_id_solver texp in
+			    let teff =  Eff.type_of_const ceff in
+			      if (tdecl = teff ) then ceff else 
+				raise (Compile_error (
+                                         lxmdef, Printf.sprintf
+					   " this constant is declared as '%s' but evaluated as '%s'"
+					   (LicDump.string_of_type_eff4msg tdecl)
+					   (LicDump.string_of_type_eff4msg teff)
+				       )))
+		    )
+		  | [] -> assert false (* should not occur *)
+		  | _::_ -> raise (Compile_error(lxmdef, "bad constant value: tuple not allowed"))
 		in
-		let init_local_const (lxm, cinfo) = (
-			match cinfo with
-			|	DefinedConst (i,topt,ve) -> (
-				Verbose.printf ~level:3 " * local const %s will be treated\n" i;
-				Hashtbl.add temp_const_def_tab i (lxm,topt,ve)
-			)
-			|	ExternalConst _ 
-			|	EnumConst _ -> (
-	    		let msg = "*** abstract constant bot allowed within node "
-	    		in
-				raise (Compile_error(lxm, msg))
-			)
-		) in
-		List.iter init_local_const node_def.it.loc_consts ;
-		(* differs from node_id_solver only on id2const *)
-		let rec local_id_solver = {
-        id2var   = node_id_solver.id2var;
-        id2const = local_id2const;
-        id2type  = node_id_solver.id2type;
-        id2node  = node_id_solver.id2node;
-        symbols  = node_id_solver.symbols;
-		}
-		and treat_local_const id = (
-  			Verbose.printf ~level:3 " * call treat_local_const %s\n" id;
-			let id_key = ("", id) in
-			try (
-				let ce = lookup_const_eff temp_const_eff_tab id_key lxm in
-				Verbose.printf ~level:3 " * const %s already treated = %s\n" id (LicDump.string_of_const_eff ce);
-				ce
-			) with Not_found -> (
-				let (lxmdef, toptdef, vedef) = Hashtbl.find temp_const_def_tab id in
-				Verbose.printf ~level:3 " * const %s not yet treated ...\n" id ;
-				(* yes, not yet checked *) 
-				Hashtbl.add temp_const_eff_tab id_key Checking ;
-				(* computes the value with EvalConst.f id_solver ve ... *)
-				let ce = match (EvalConst.f local_id_solver vedef) with
-				| [ceff] -> (
-					match toptdef with
-					| None -> ceff
-					| Some texp -> (
-						let tdecl = GetEff.typ local_id_solver texp in
-						let teff =  Eff.type_of_const ceff in
-						if (tdecl = teff ) then ceff else 
-							raise (Compile_error (lxmdef, Printf.sprintf
-									" this constant is declared as '%s' but evaluated as '%s'"
-									(LicDump.string_of_type_eff4msg tdecl)
-									(LicDump.string_of_type_eff4msg teff)
-							)))
-				)
-				| [] -> assert false (* should not occur *)
-				| _::_ -> raise (Compile_error(lxmdef, "bad constant value: tuple not allowed"))
-				in
-				Verbose.printf ~level:3 " * const %s evaluated to %s\n"id (LicDump.string_of_const_eff ce);
-				Hashtbl.replace temp_const_eff_tab id_key (Checked ce) ;
-				ce
-			)
-		)
-		and local_id2const idrf lxm = (
-			(* is id a local const ? *)
-			try (
-				(* certainly NOT if id has a pack *)
-				let id = if (Ident.pack_of_idref idrf = None)
-				         then Ident.name_of_idref idrf
-					      else raise Not_found
-				in
-				let ce = treat_local_const id in
-				ce
-			) with Not_found -> (
-				(* not a local constant -> search in global env *)
-    			Verbose.printf ~level:3 " * %s not a local const, should be global ?" (Ident.string_of_idref idrf);
-				let ce = node_id_solver.id2const idrf lxm in
-    			Verbose.printf ~level:3 " YES -> %s\n" (LicDump.string_of_const_eff ce);
-				ce
-			)
-		) in
-		(* iters local_id2const n eeach declared constant *)
-		Hashtbl.iter (fun id _ -> let _ = treat_local_const id in ()) temp_const_def_tab ;
-		(* Finally, adds each local const to ICI *)
-		let add_local_const idref ceck = (
-			Verbose.printf ~level:3 " * add_local_const %s = %s\n"
-				(snd idref)
-				(match ceck with
-					| Checking -> "Checking"
-					| Checked ce -> (LicDump.string_of_const_eff ce)
-					| Incorrect -> "Incorrect"
-				);
-			match ceck with
-			| Checked ce -> Hashtbl.add local_env.lenv_const (snd idref) ce
-			| _ -> assert false
-		) in
-		Hashtbl.iter add_local_const temp_const_eff_tab ;
-
-		(********************************************************)
-      (* LOCAL FLOWS are added to local_env                   *)
-		(********************************************************)
-      (* (i.e. ins,outs,locs) *)
-      match node_def.it.vars with
+		  Verbose.printf ~level:3 " * const %s evaluated to %s\n"
+                    id (LicDump.string_of_const_eff ce);
+		  Hashtbl.replace temp_const_eff_tab id_key (Checked ce) ;
+		  ce
+	    )
+	)
+	and local_id2const idrf lxm = (
+	  (* is id a local const ? *)
+	  try (
+	    (* certainly NOT if id has a pack *)
+	    let id = if (Ident.pack_of_idref idrf = None)
+	    then Ident.name_of_idref idrf
+	    else raise Not_found
+	    in
+	    let ce = treat_local_const id in
+	      ce
+	  ) with Not_found -> (
+	    (* not a local constant -> search in global env *)
+    	    Verbose.printf ~level:3 " * %s not a local const, should be global ?" (Ident.string_of_idref idrf);
+	    let ce = node_id_solver.id2const idrf lxm in
+    	      Verbose.printf ~level:3 " YES -> %s\n" (LicDump.string_of_const_eff ce);
+	      ce
+	  )
+	) in
+	  (* iters local_id2const n eeach declared constant *)
+	  Hashtbl.iter (fun id _ -> let _ = treat_local_const id in ()) temp_const_def_tab ;
+	  (* Finally, adds each local const to ICI *)
+	  let add_local_const idref ceck = (
+	    Verbose.printf ~level:3 " * add_local_const %s = %s\n"
+	      (snd idref)
+	      (match ceck with
+		 | Checking -> "Checking"
+		 | Checked ce -> (LicDump.string_of_const_eff ce)
+		 | Incorrect -> "Incorrect"
+	      );
+	    match ceck with
+	      | Checked ce -> Hashtbl.add local_env.lenv_const (snd idref) ce
+	      | _ -> assert false
+	  ) in
+	    Hashtbl.iter add_local_const temp_const_eff_tab ;
+            
+	    (********************************************************)
+            (* LOCAL FLOWS are added to local_env                   *)
+	    (********************************************************)
+            (* (i.e. ins,outs,locs) *)
+            match node_def.it.vars with
         | None -> assert false (* a node with a body should have a profile *)
         | Some vars ->
             let is_polymorphic = ref false in
@@ -918,96 +968,13 @@ LicDump.dump_local_env local_env
                 is_polym_eff = !is_polymorphic
               }
     ) in
-    let (make_alias_node : Eff.node_exp -> node_vars option -> Eff.node_exp) =
-      fun aliased_node vars_opt -> 
-        (* builds a node that  calls the aliased node. It looks like:
-           node  alias_node(ins) returns (outs);  
-           let 
-           outs = aliased_node(ins); 
-           tel           
-           
-           When instanciating  models with polymorphic  operators, it
-           may   happen  that   some  exported   user   nodes  become
-           polymorphic (via node alias  precisely). But in that case,
-           a non-polymorphic profile is given in the package provided
-           part. In such a case, we can use the types of the provided
-           part (itl and otl) instead of the polymorphic ones.
-        *)
-        let (il,ol) = Eff.profile_of_node_exp aliased_node in
-        let (il_decl, ol_decl) = 
-          match vars_opt with
-            | None -> (il,ol) (* no type profile is declared; we use the alias one *)
-            | Some vars ->
-                (* a type profile is declared; let's check there are compatible *)
-                let vi_il, vi_ol = 
-                  List.map (fun id -> find_var_info lxm vars id) vars.inlist,
-                  List.map (fun id -> find_var_info lxm vars id) vars.outlist
-                in
-                let aux vi = GetEff.typ node_id_solver vi.it.var_type in
-                let (il_decl, ol_decl) = List.map aux vi_il, List.map aux vi_ol in
-                let i_unif_res = UnifyType.f il_decl il
-                and o_unif_res = UnifyType.f ol_decl ol
-                in
-                  (match i_unif_res with
-                     | UnifyType.Ko msg -> raise(Compile_error(lxm, msg))
-                     | UnifyType.Equal -> ()
-                     | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
-                  );
-                  (match o_unif_res with
-                     | UnifyType.Ko msg -> raise(Compile_error (lxm, msg))
-                     | UnifyType.Equal -> ()
-                     | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
-                  );
-                  (* ok, there are compatible. We use the declared profile. *)
-                  (il_decl, ol_decl)
-        in
-        let instanciate_var_info vi t = { vi with var_type_eff = t } in
-        let vil = List.map2 instanciate_var_info aliased_node.inlist_eff  il_decl 
-        and vol = List.map2 instanciate_var_info aliased_node.outlist_eff ol_decl in
-        let (outs:Eff.left list) = List.map  (fun vi -> LeftVarEff (vi, lxm)) vol in
-	let tl = List.map Eff.type_of_left outs in
-	let cl = List.map (fun l -> (Eff.var_info_of_left l).var_clock_eff) outs in
-        let (aliased_node_call : Eff.val_exp) =
-          { core = 
-              CallByPosEff(
-                (Lxm.flagit (Eff.CALL(Lxm.flagit aliased_node lxm)) lxm, 
-                 OperEff
-                   (List.map 
-                      (fun vi -> (* build operands*)
-                         let ve = { 
-                           typ = [vi.var_type_eff]; 
-                           clk = [snd vi.var_clock_eff];
-                           core = CallByPosEff(
-                             Lxm.flagit (Eff.IDENT(
-                                    Ident.to_idref vi.var_name_eff)) lxm, OperEff [])}
-		         in
-		           ve
-                      )
-                      vil)));
-            typ = tl;
-            clk = List.map snd cl;
-          }
-        in
-          {
-            aliased_node with
-              node_key_eff = nk;
-              inlist_eff = vil;
-              outlist_eff = vol;
-              loclist_eff = None;
-              def_eff = BodyEff(
-                { asserts_eff = []; 
-                  eqs_eff = [Lxm.flagit (outs, aliased_node_call) lxm] 
-                });
-              is_polym_eff = List.exists Eff.is_polymorphic (il_decl@ol_decl);
-          }
-    in
       (* let's go *)
     let res =
       match node_def.it.def with
-        | Abstract -> make_node_eff (fun () -> AbstractEff None)
-        | Extern   -> make_node_eff (fun () -> ExternEff)
+        | Abstract -> make_node_eff node_def.it.name (fun () -> AbstractEff None)
+        | Extern   -> make_node_eff node_def.it.name (fun () -> ExternEff)
         | Body nb  ->
-            make_node_eff ( 
+            make_node_eff node_def.it.name ( 
               (fun () -> (* trick to force to delay this evaluation 
                             after the local_env.lenv_vars has been
                             filled
@@ -1046,107 +1013,261 @@ LicDump.dump_local_env local_env
                     raise (Compile_error (lxm, "can not alias this operator, sorry"))
                       (* does it make sense to alias when, pre, etc? *)
             in
+            let (vil, vol) = 
+              match node_def.it.vars with
+                | None -> aliased_node.inlist_eff, aliased_node.outlist_eff
+                | Some (vars) ->
+                    (* a type profile is declared; let's check there are compatible *)
+                    let (il,ol) = profile_of_node_exp aliased_node in
+                    let (il_decl, ol_decl) = 
+                      let vi_il, vi_ol = 
+                        List.map (fun id -> find_var_info lxm vars id) vars.SyntaxTreeCore.inlist,
+                        List.map (fun id -> find_var_info lxm vars id) vars.SyntaxTreeCore.outlist
+                      in
+                      let aux vi = GetEff.typ node_id_solver vi.it.var_type in
+                      let (il_decl, ol_decl) = List.map aux vi_il, List.map aux vi_ol in
+                      let i_unif_res = UnifyType.f il_decl il
+                      and o_unif_res = UnifyType.f ol_decl ol
+                      in
+                        (match i_unif_res with
+                           | UnifyType.Ko msg -> raise(Compile_error(lxm, msg))
+                           | UnifyType.Equal -> ()
+                           | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
+                        );
+                        (match o_unif_res with
+                           | UnifyType.Ko msg -> raise(Compile_error (lxm, msg))
+                           | UnifyType.Equal -> ()
+                           | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
+                        );
+                        (* ok, there are compatible. We use the declared profile. *)
+                        (il_decl, ol_decl)
+                    in
+                    let instanciate_var_info vi t = { vi with var_type_eff = t } in
+                    let vil = List.map2 instanciate_var_info aliased_node.inlist_eff  il_decl 
+                    and vol = List.map2 instanciate_var_info aliased_node.outlist_eff ol_decl in
+                      vil,vol
+            in
             let (alias_node : Eff.node_exp) = 
-              try make_alias_node aliased_node node_def.it.vars 
+              try make_alias_node  aliased_node nk local_env node_id_solver
+                 vil vol node_def.src
               with Not_found -> assert false (* defense against List.assoc *)
             in
               
-            (* update the local_env table *)
-            let _ = 
-              let update_local_env_table vi =
-                Hashtbl.add local_env.lenv_vars vi.var_name_eff vi
-              in
-                List.iter update_local_env_table alias_node.inlist_eff;
-                List.iter update_local_env_table alias_node.outlist_eff;
-                match alias_node.loclist_eff with 
-                    None -> () | Some l -> List.iter update_local_env_table l;
-            in
+              (* XXX useless ?? deja fait dans Eff.make_alias_node:564
+                 essayer d'enlever voir quand tout marchera.
+              *)
               (* Check that the declared profile (if any) matches with the alias *)
-              match node_def.it.vars with
-                | None -> alias_node
-                | Some vars ->
-                    let vi_il, vi_ol = 
-                      List.map (fun id -> find_var_info lxm vars id) vars.inlist,
-                      List.map (fun id -> find_var_info lxm vars id) vars.outlist
-                    in
-                    let aux vi = GetEff.typ node_id_solver vi.it.var_type
-                    in
-                    let (il,ol) = Eff.profile_of_node_exp alias_node in
-                    let (il_exp, ol_exp) = List.map aux vi_il, List.map aux vi_ol in
-                    let i_unif_res = UnifyType.f il_exp il
-                    and o_unif_res = UnifyType.f ol_exp ol
-                    in
-                      (match i_unif_res with
-                         | UnifyType.Ko msg -> raise(Compile_error(lxm, msg))
-                         | UnifyType.Equal -> ()
-                         | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
-                      );
-                      (match o_unif_res with
-                         | UnifyType.Ko msg -> raise(Compile_error (lxm, msg))
-                         | UnifyType.Equal -> ()
-                         | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t
-                      );
+(*               match node_def.it.vars with *)
+(*                 | None -> alias_node *)
+(*                 | Some vars -> *)
+(*                     let vi_il, vi_ol =  *)
+(*                       List.map (fun id -> find_var_info lxm vars id) vars.inlist, *)
+(*                       List.map (fun id -> find_var_info lxm vars id) vars.outlist *)
+(*                     in *)
+(*                     let aux vi = GetEff.typ node_id_solver vi.it.var_type *)
+(*                     in *)
+(*                     let (il,ol) = Eff.profile_of_node_exp alias_node in *)
+(*                     let (il_exp, ol_exp) = List.map aux vi_il, List.map aux vi_ol in *)
+(*                     let i_unif_res = UnifyType.f il_exp il *)
+(*                     and o_unif_res = UnifyType.f ol_exp ol *)
+(*                     in *)
+(*                       (match i_unif_res with *)
+(*                          | UnifyType.Ko msg -> raise(Compile_error(lxm, msg)) *)
+(*                          | UnifyType.Equal -> () *)
+(*                          | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t *)
+(*                       ); *)
+(*                       (match o_unif_res with *)
+(*                          | UnifyType.Ko msg -> raise(Compile_error (lxm, msg)) *)
+(*                          | UnifyType.Equal -> () *)
+(*                          | UnifyType.Unif t ->  GetEff.dump_polymorphic_nodes t *)
+(*                       ); *)
                       alias_node
           )
             (* End Alias *)
     in
-    let is_main_node = 
-      if !Global.main_node = "" then (
-        (* if no main node is provided, we take the first node we find,
-	   that has a non-empty body. *)
-	match res.def_eff with
-	  | ExternEff | AbstractEff _ -> false
-	  | BodyEff _ -> 
-              Global.main_node := Ident.string_of_long (fst nk);
-              true
-      )
-      else
-        (nk = (Ident.long_of_string !Global.main_node, [])) 
+    let current_env = {
+      local = local_env;
+      global = node_id_solver; 
+    }
     in
-    let res = if !Global.one_op_per_equation then Split.node local_env res else res in
-    let res = 
-      if !Global.inline_iterator
-      then Inline.iterators local_env node_id_solver res 
-      else res 
+    let res = source_to_source provide_flag current_env res in
+    let _ = UniqueOutput.check res node_def.src in
+      gen_code provide_flag current_env res;
+      res
+
+(* 
+   [make_alias_node aliased_node alias_nk node_id_solver_vars_opt lxm]
+   builds a node that  calls the aliased node. It looks like:
+   node  alias_node(ins) returns (outs);  
+   let 
+   outs = aliased_node(ins); 
+   tel
+   
+   When instanciating models with polymorphic operators, it
+   may happen that some exported user nodes become
+   polymorphic (via node alias precisely). But in that case,
+   a non-polymorphic profile is given in the package provided
+   part. In such a case, we can use the types of the provided
+   part (itl and otl) instead of the polymorphic ones.  *)
+and (make_alias_node :  node_exp -> node_key -> local_env -> id_solver -> 
+      var_info list -> var_info list -> Lxm.t -> node_exp) =
+  fun  aliased_node alias_nk local_env node_id_solver vil vol lxm -> 
+    Verbose.printf ~level:3 "*** Eff.make_alias_node %s \n" (Ident.long_to_string (fst alias_nk));
+    flush stdout;
+
+    let (outs:left list) = List.map  (fun vi -> LeftVarEff (vi, lxm)) vol in
+    let tl = List.map type_of_left outs in
+    let cl = List.map (fun l -> (var_info_of_left l).var_clock_eff) outs in
+    let (aliased_node_call : val_exp) =
+      { core = 
+          CallByPosEff(
+            (Lxm.flagit (CALL(Lxm.flagit aliased_node lxm)) lxm, 
+             OperEff
+               (List.map 
+                  (fun vi -> (* build operands*)
+                     let ve = { 
+                       typ = [vi.var_type_eff]; 
+                       clk = [snd vi.var_clock_eff];
+                       core = CallByPosEff(
+                         Lxm.flagit (IDENT(
+                                       Ident.to_idref vi.var_name_eff)) lxm, OperEff [])}
+		     in
+		       ve
+                  )
+                  vil)));
+        typ = tl;
+        clk = List.map snd cl;
+      }
     in
-    let res =
-      if !Global.expand_nodes && is_main_node then NodesExpand.f local_env res
-      else res
+    let alias_node = 
+      {
+        aliased_node with
+          node_key_eff = alias_nk;
+          inlist_eff = vil;
+          outlist_eff = vol;
+          loclist_eff = None;
+          def_eff = BodyEff(
+            { asserts_eff = []; 
+              eqs_eff = [Lxm.flagit (outs, aliased_node_call) lxm] 
+            });
+          is_polym_eff = List.exists is_polymorphic (List.map (fun vi -> vi.var_type_eff) (vil@vol));
+      }
     in
-    let is_extern_oper = 
-      match res.def_eff with
-	| ExternEff | AbstractEff None -> true
-	| AbstractEff (Some _) | BodyEff _ -> false
+      (* update the local_env table *)
+    let _ = 
+      let update_local_env_table vi =
+        Hashtbl.add local_env.lenv_vars vi.var_name_eff vi
+      in
+        List.iter update_local_env_table alias_node.inlist_eff;
+        List.iter update_local_env_table alias_node.outlist_eff;
+        match alias_node.loclist_eff with 
+            None -> () | Some l -> List.iter update_local_env_table l;
     in
-    let res_struct =
-      if 
-	(!Global.expand_structs 
-	&& not (res.is_polym_eff) 
-	&& ((not !Global.expand_nodes) || is_main_node) (* it is useless otherwise *)
-        ) || is_extern_oper
-      then
-        (
-          Verbose.printf ~level:3 "-- Expand node %s \n" (Ident.long_to_string (fst nk));
-	  StructArrayExpand.node node_id_solver local_env res
+      alias_node
+
+and (gen_code :  bool -> Eff.node_env -> Eff.node_exp -> unit) =
+  fun provide_flag current_env nexp -> 
+      let nk = nexp.node_key_eff in
+      let is_extern_oper = 
+        match nexp.def_eff with
+	  | ExternEff | AbstractEff None -> true
+	  | AbstractEff (Some _) | BodyEff _ -> false
+      in
+      let is_main_node = 
+        if !Global.main_node = "" then (
+          (* if no main node is provided, we take the first node we find,
+	     that has a non-empty body. *)
+	  match nexp.def_eff with
+	    | ExternEff | AbstractEff _ -> false
+	    | BodyEff _ -> 
+                Global.main_node := Ident.string_of_long (fst nk);
+                true
         )
-      else 
-	res
+        else
+          (nk = (Ident.long_of_string !Global.main_node, [])) 
+      in
+      let nexp =
+        if !Global.expand_nodes && is_main_node 
+        then NodesExpand.f current_env.local nexp
+        else nexp
+      in
+      let nexp_struct =
+        (* nb: we print res_struct, but do not return it from
+           node_check, because the structure and array expansion
+           modify (instanciate) the node profiles.  *)
+        if 
+	  (!Global.expand_structs && not (nexp.is_polym_eff) 
+           && ((not !Global.expand_nodes || is_main_node) (* it is useless otherwise *)
+              ) || is_extern_oper)
+        then
+          (
+            Verbose.printf ~level:3 "-- Expand node %s \n" (Ident.long_to_string (fst nk));
+	    StructArrayExpand.node current_env.global current_env.local nexp
+          )
+        else 
+	  nexp
+      in
+        if not provide_flag then 
+          (
+            if not !Global.expand_nodes || is_extern_oper || is_main_node then
+              if nexp.is_polym_eff then
+                Polymorphism.push_on_polymorphic_node_stack (current_env, nexp_struct)
+              else
+                let str = LicDump.node_of_node_exp_eff nexp_struct in
+                  output_string !Global.oc str
+          );
+
+
+
+(* Apply various source to source transformations, according to command-line options ;
+   + fix-point on generated nodes
+*)
+and (source_to_source : bool -> Eff.node_env -> Eff.node_exp -> Eff.node_exp) =
+  fun provide_flag current_env nexp -> 
+    let rec aux nl_done nl_todo =
+      match nl_todo with
+         | [] -> assert false
+         | nexp::tail ->
+             (*
+               We need to split.node before Inline.iterators to be able to deal
+               with equations like:
+                 x = n(map<<Lustre::iplus; 3>>(y);
+               Indeed, Inline.iterators does not recursively inline its argument 
+               (it could, but it currently does not).
+               
+               Then, we need to split.node after Inline.iterators
+               again because iterator inlining creates some equations
+               that migth need some splitting...
+             *)
+             let _ = Name.reset_local_var_prefix "v" in (* coquetry *)
+             let nexp = 
+               if !Global.one_op_per_equation 
+               then Split.node current_env nexp 
+               else nexp
+             in
+             let nexp =
+               if !Global.inline_iterator
+               then Inline.iterators current_env nexp
+               else nexp
+             in 
+             let nexp = 
+               if !Global.one_op_per_equation 
+               then Split.node current_env nexp 
+               else nexp
+             in
+             let nl_todo = tail in
+             let nl_done = nl_done @ [nexp] in
+               if nl_todo = [] then nl_done else aux nl_done nl_todo
     in
-    let _ = UniqueOutput.check res node_def.src in
-      if not provide_flag then 
-        (
-          if not !Global.expand_nodes || is_extern_oper || is_main_node then
-            if res.is_polym_eff then
-              Polymorphism.push_on_polymorphic_node_stack (node_id_solver,local_env,res_struct)
-            else
-              let str = LicDump.node_of_node_exp_eff res_struct in
-                output_string !Global.oc str
-        );
-      (* nb: we print res_struct, but we return res, because the structure and
-         array expansion modify the node profiles.
+      match aux [] [nexp]  with
+        | [] -> assert false
+        | nexp::new_nodes -> 
+            (* The main node is printed outside 
+              (indeed, we do not apply UniqueOutput.check only to generated nodes)
+            *)
+            List.iter (gen_code provide_flag current_env) new_nodes;
+            nexp
 
-      *)
-      res
 
 
 (** builds a [node_key] and calls [node_check] *)
@@ -1190,7 +1311,7 @@ and (node_check_interface:
     
 (*-------------------------------------------------------------------------
 compile all items
----------------------------------------------------------------------------*)
+  ---------------------------------------------------------------------------*)
 
 let compile_all_item this label  x_check_interface string_of_x_key
     string_of_x_eff to_key id item_def =
diff --git a/src/licDump.ml b/src/licDump.ml
index df8f4593..ef7dd530 100644
--- a/src/licDump.ml
+++ b/src/licDump.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 19/05/2011 (at 16:45) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 11:33) by Erwan Jahier> *)
 
 open Printf
 open Lxm
@@ -108,7 +108,7 @@ and string_ident_of_const_eff c =
     | Enum_const_eff _  -> string_of_const_eff c
     | Struct_const_eff (_, t) -> (
         match t with 
-          | Struct_type_eff (sn,_) -> dump_long sn
+          | Struct_type_eff (sn,_) -> Ident.no_pack_string_of_long sn
           | _ -> assert false
       )
     | Array_const_eff (ctab, t) -> string_of_type_eff t
@@ -247,19 +247,19 @@ and string_of_node_key_rec (nkey: node_key) =
           (Name.node_key nkey name)
 
 (* for printing iterators *)
-and string_of_node_key_iter lxm (nkey: node_key) = 
+and string_of_node_key_iter (nkey: node_key) = 
   match nkey with
     | (ik, []) -> dump_long ik
     | (ik, salst) ->
 	let astrings = List.map (static_arg2string) salst in
-	  sprintf "%s<<%s>>" (dump_long ik) (String.concat ", " astrings)
+	  sprintf "%s<<%s>>" (Ident.string_of_long ik) (String.concat ", " astrings)
 
 (* for inventing a name to parametrized nodes *)
 and static_arg2string_bis (sa : Eff.static_arg) =
   match sa with
     | ConstStaticArgEff (id, ceff) -> sprintf "%s" (string_ident_of_const_eff ceff)
     | TypeStaticArgEff  (id, teff) -> sprintf "%s" (string_of_type_eff teff)
-    | NodeStaticArgEff  (id, (long, _, _)) ->
+    | NodeStaticArgEff  (id, ((long, _sargs), _, _), _) ->
 	sprintf "%s" (Ident.no_pack_string_of_long long)
 
 (* for printing recursive node and iterators *)
@@ -267,8 +267,9 @@ and static_arg2string (sa : Eff.static_arg) =
   match sa with
     | ConstStaticArgEff (id, ceff) -> sprintf "%s" (string_ident_of_const_eff ceff)
     | TypeStaticArgEff  (id, teff) -> sprintf "%s" (string_of_type_eff teff)
-    | NodeStaticArgEff  (id, (long, _, _)) ->
-	sprintf "%s" (dump_long long)
+    | NodeStaticArgEff  (id, ((long,sargs), _, _), _) ->
+        string_of_node_key_iter (long,sargs)
+(* 	sprintf "%s" (dump_long long) *)
 
 and (string_of_var_info_eff4msg: Eff.var_info -> string) =
   fun x -> 
@@ -421,10 +422,10 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
                        ^ " else " ^ sov (hd (tl (tl vel)))
 
 		   | _ -> 
-		       ((string_of_node_key_iter nee.src nee.it.node_key_eff) ^ (tuple_par vel))
+		       ((string_of_node_key_iter nee.it.node_key_eff) ^ (tuple_par vel))
 	        )
 	      else
- 	        ((string_of_node_key_iter nee.src nee.it.node_key_eff) ^ (tuple_par vel))
+ 	        ((string_of_node_key_iter nee.it.node_key_eff) ^ (tuple_par vel))
 	    else
 	      (* recursive node cannot be extern *)
 	      ((string_of_node_key_rec nee.it.node_key_eff) ^ (tuple_par vel))
@@ -711,7 +712,7 @@ and op2string op =
 Formatage standard des erreurs de compil
 ----------------------------------------------------------------------*)
 let node_error_string lxm nkey = (
-   Printf.sprintf "While checking %s" (string_of_node_key_iter lxm nkey)
+   Printf.sprintf "While checking %s" (string_of_node_key_iter nkey)
 )
 
 (*---------------------------------------------------------------------
diff --git a/src/licDump.mli b/src/licDump.mli
index 5b6cfba5..5e433de3 100644
--- a/src/licDump.mli
+++ b/src/licDump.mli
@@ -1,7 +1,8 @@
-(** Time-stamp: <modified the 11/03/2009 (at 17:32) by Erwan Jahier> *)
+(** Time-stamp: <modified the 20/05/2011 (at 10:47) by Erwan Jahier> *)
 
 
 val string_of_node_key_rec : Eff.node_key -> string
+val string_of_node_key_iter : Eff.node_key -> string
 val node_of_node_exp_eff: Eff.node_exp -> string
 
 val string_of_const_eff : Eff.const -> string
diff --git a/src/main.ml b/src/main.ml
index 897f154c..96bdec1f 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 19/05/2011 (at 11:24) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:43) by Erwan Jahier> *)
 
 (** Here follows a description of the different modules used by this lus2lic compiler.
 
@@ -95,7 +95,7 @@ let rec arg_list = [
     ""
   );
   ( "-ei", Arg.Unit (fun _ -> Global.inline_iterator := true),
-    "\n\t Expand array iterators."
+    "\n\t Expand array iterators (i.e., generate iterator-free code)."
   );
 
   ( "--expand-enums", Arg.Unit (fun _ -> Global.expand_enums := true),
diff --git a/src/name.ml b/src/name.ml
index daf5c935..b64d0c18 100644
--- a/src/name.ml
+++ b/src/name.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 19/05/2011 (at 11:35) by Erwan Jahier> *)
+(** Time-stamp: <modified the 24/05/2011 (at 09:31) by Erwan Jahier> *)
 
 
 (* maps node_key to a string that won't clash *)
@@ -11,19 +11,15 @@ let node_name_tbl = Hashtbl.create 0
 let (node_key: Eff.node_key -> string -> string) =
   fun nk name -> 
     let (long, sargs) = nk in
-      assert (name <> "");
-      if sargs = [] then 
-        (* If there is no static argument, we don't have to invent a new name,
-           and therefore there is nothing to do to avoid clashes *)
-        name
-      else
-        try Hashtbl.find node_key_tbl nk
+      try             
+           Hashtbl.find node_key_tbl nk
           (* Note that we ignore the "name" in argument in this case *)
         with 
             Not_found -> 
               (* let's build an ident that won't clash *)
               (* all new name should not begins with a "_" ; hence we prefix by "n_" *)
-              let name = "n_" ^ name in
+              let name = if name = "" then "n_" ^ (Ident.no_pack_string_of_long long) else name in
+                
                 if not (Hashtbl.mem node_name_tbl name) then
                   (
                     (* that name won't clash, but let's tabulate it *)
diff --git a/src/name.mli b/src/name.mli
index d2335394..d549b87b 100644
--- a/src/name.mli
+++ b/src/name.mli
@@ -1,9 +1,9 @@
-(** Time-stamp: <modified the 22/01/2010 (at 18:08) by Erwan Jahier> *)
+(** Time-stamp: <modified the 24/05/2011 (at 09:30) by Erwan Jahier> *)
 
 
 (** All new identifier names ougth to be created via this module. *)
 
-(** [node_key nk name] returns a node ident that won't clash, using [name] or not. 
+(** [node_key nk] returns a fresh node ident. 
 
    The idea is the following: the caller propose a name to map the
    node key. But since that name may clash, we need to work a little bit
diff --git a/src/polymorphism.ml b/src/polymorphism.ml
index ab5ebfad..bc30f9af 100644
--- a/src/polymorphism.ml
+++ b/src/polymorphism.ml
@@ -25,30 +25,24 @@ let (reset_type : unit -> unit) = (* To be called in order to avoid silent bugs
 
 (******************************************************************************)
 
-let polymorphic_node_stack : (Eff.id_solver * Eff.local_env * Eff.node_exp) Stack.t = Stack.create ()
+let polymorphic_node_stack : (Eff.node_env * Eff.node_exp) Stack.t = Stack.create ()
 
 (* exported *)
-let (push_on_polymorphic_node_stack : Eff.id_solver * Eff.local_env * Eff.node_exp -> unit) =
+let (push_on_polymorphic_node_stack : Eff.node_env * Eff.node_exp -> unit) =
   fun n -> 
     Stack.push n polymorphic_node_stack 
 
 (* exported *)
 let (unstack_polymorphic_nodes : 
-       (Eff.id_solver -> Eff.local_env -> Eff.node_exp -> Eff.node_exp) -> 
-	 Eff.type_ -> (Eff.id_solver * Eff.local_env * Eff.node_exp) list) =
-  fun expand t -> 
+       Eff.type_ -> (Eff.node_env * Eff.node_exp) list) =
+  fun t -> 
+    let _ = set_type t in
     let rec aux l = 
-      if Stack.is_empty polymorphic_node_stack 
-      then 
-	l 
-      else
-	let id_solver, nenv, node = Stack.pop polymorphic_node_stack in
-	let node = 
-	  if !Global.expand_structs then expand id_solver nenv node else node
-	in
-	  (id_solver, nenv,node)::(aux l)
+      if Stack.is_empty polymorphic_node_stack then l else
+        let x = Stack.pop polymorphic_node_stack in
+          x::(aux l)
     in
-    let _ = set_type t in
     let res = aux [] in
       res
 
+
diff --git a/src/polymorphism.mli b/src/polymorphism.mli
index f0a657e2..f37cc0f1 100644
--- a/src/polymorphism.mli
+++ b/src/polymorphism.mli
@@ -32,13 +32,10 @@ val get_type : unit -> Eff.type_
    place would avoid silent bugs *)
 val reset_type : unit -> unit
 
-val push_on_polymorphic_node_stack : 
-    Eff.id_solver * Eff.local_env * Eff.node_exp -> unit
+val push_on_polymorphic_node_stack : Eff.node_env * Eff.node_exp -> unit
 
-(** We have added the StructArrayExpand.node function as parameter of this function
-   to break a module dependency.
+(** We have added the StructArrayExpand.node and Inline.iterators
+ functions as parameter of this function to break module
+    dependency loops.
 *)
-val unstack_polymorphic_nodes : 
-  (Eff.id_solver -> Eff.local_env -> Eff.node_exp -> Eff.node_exp) ->
-  Eff.type_ ->  (Eff.id_solver * Eff.local_env * Eff.node_exp) list
-  
+val unstack_polymorphic_nodes :  Eff.type_ -> (Eff.node_env * Eff.node_exp) list
diff --git a/src/predefEvalType.ml b/src/predefEvalType.ml
index efe67d7a..82a8feef 100644
--- a/src/predefEvalType.ml
+++ b/src/predefEvalType.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 26/05/2009 (at 15:36) by Erwan Jahier> *)
+(** Time-stamp: <modified the 27/05/2011 (at 09:31) by Erwan Jahier> *)
 
 open Predef
 open Lxm
@@ -79,24 +79,24 @@ let (get_node_and_constant: Lxm.t ->
        Eff.static_arg list -> Eff.item_key * var_info list * var_info list * int) =
   fun lxm sargs -> 
       match sargs with
-        | [NodeStaticArgEff(_,(n, inlist, outlist));
+        | [NodeStaticArgEff(_,((n,_), inlist, outlist), _);
            ConstStaticArgEff(_,Int_const_eff c)] -> n, inlist, outlist, c
 
-	| [NodeStaticArgEff(_,(n, inlist, outlist)); 
+	| [NodeStaticArgEff(_,((n,_), inlist, outlist), _); 
 	   ConstStaticArgEff(_, Abstract_const_eff(l,_,Int_const_eff c, true))] ->
 	    n, inlist, outlist, c
 
-        | [NodeStaticArgEff(_,_); ConstStaticArgEff(_, Extern_const_eff(l, _))] ->
+        | [NodeStaticArgEff(_,_,_); ConstStaticArgEff(_, Extern_const_eff(l, _))] ->
             let msg = "an integer is expected, whereas an extern constant (" ^ 
               (Ident.string_of_long l) ^ ") was provided.\n"
             in
               raise (Compile_error(lxm, msg))
-        | [NodeStaticArgEff(_,_); ConstStaticArgEff(_, Abstract_const_eff(l,_,_, false))] ->
+        | [NodeStaticArgEff(_,_,_); ConstStaticArgEff(_, Abstract_const_eff(l,_,_, false))] ->
             let msg = "an integer is expected, whereas an abstract constant (" ^ 
               (Ident.string_of_long l) ^ ") was provided.\n"
             in
               raise (Compile_error(lxm, msg))
-        | [NodeStaticArgEff(_,(n, inlist, outlist)); ConstStaticArgEff(_, const)] ->
+        | [NodeStaticArgEff(_,((n,_), inlist, outlist),_); ConstStaticArgEff(_, const)] ->
             let msg = "an integer is expected, whereas a " ^ 
               (LicDump.string_of_type_eff4msg (Eff.type_of_const const)) ^
               " was provided.\n"
diff --git a/src/split.ml b/src/split.ml
index af7000a6..2a5d7359 100644
--- a/src/split.ml
+++ b/src/split.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 19/05/2009 (at 15:43) by Erwan Jahier> *)
+(** Time-stamp: <modified the 01/06/2011 (at 13:45) by Erwan Jahier> *)
 
 
 open Lxm
@@ -8,7 +8,7 @@ open Predef
 (********************************************************************************)
 (* stuff to create fresh var names. *)
 let new_var node_env type_eff clock_eff = 
-  let id = Ident.of_string (Name.new_local_var "v") in
+  let id = Ident.of_string (Name.new_local_var ("v")) in
   let var =
     { 
       var_name_eff   = id;
@@ -125,6 +125,9 @@ let (split_tuples:Eff.eq_info Lxm.srcflagged list -> Eff.eq_info Lxm.srcflagged
 
     in
       List.flatten (List.map split_one_eq eql)
+
+
+(********************************************************************************)
         
 (********************************************************************************)
         
@@ -135,18 +138,18 @@ let (split_tuples:Eff.eq_info Lxm.srcflagged list -> Eff.eq_info Lxm.srcflagged
 type split_acc = (Eff.eq_info srcflagged) list * Eff.var_info list
 
 (* exported *)
-let rec (eq : Eff.local_env -> Eff.eq_info Lxm.srcflagged -> split_acc) =
+let rec (eq : node_env -> Eff.eq_info Lxm.srcflagged -> split_acc) =
   fun node_env { src = lxm_eq ; it = (lhs, rhs) } ->
     let n_rhs, (neqs, nlocs) = split_val_exp false true node_env rhs in
       { src = lxm_eq ; it = (lhs, n_rhs) }::neqs, nlocs
 
 and (split_eq_acc : 
-       Eff.local_env -> split_acc -> Eff.eq_info srcflagged -> split_acc) =
+       node_env -> split_acc -> Eff.eq_info srcflagged -> split_acc) =
   fun node_env (eqs, locs) equation -> 
     let (neqs, nlocs) = eq node_env equation in 
       (split_tuples (eqs@neqs), locs@nlocs)
         
-and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp -> 
+and (split_val_exp : bool -> bool -> node_env -> Eff.val_exp -> 
       Eff.val_exp * split_acc) =
   fun when_flag top_level node_env ve -> 
     (* [when_flag] is true is the call is made from a "when" statement.
@@ -195,17 +198,14 @@ and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp ->
               ([],[],[])
               fl
           in
-          let rhs = { ve with 
-                        core = CallByNameEff (by_name_op_eff, List.rev fl)
-                    } 
-          in
+          let rhs = { ve with core = CallByNameEff (by_name_op_eff, List.rev fl) } in
 	    if top_level then
               rhs, (eql, vl)
             else
               (* create the var for the current call *)
               let clk_l = ve.clk in 
               let typ_l = ve.typ in  
-              let nv_l = List.map2 (new_var node_env) typ_l clk_l  in
+              let nv_l = List.map2 (new_var node_env.local) typ_l clk_l  in
               let nve = match nv_l with
                 | [nv] -> { ve with core = 
                       CallByPosEff(
@@ -217,8 +217,9 @@ and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp ->
               let lpl = List.map (fun nv -> LeftVarEff(nv, lxm)) nv_l in
               let eq = Lxm.flagit (lpl, rhs) lxm in
 		nve, (eql@[eq], vl@nv_l)
+
                   
-      | CallByPosEff(by_pos_op_eff, OperEff vel) ->
+      | CallByPosEff(by_pos_op_eff, OperEff vel) -> (
           (* recursively split the arguments *) 
           let lxm = by_pos_op_eff.src in
           let (rhs, (eql,vl)) =
@@ -248,7 +249,7 @@ and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp ->
                   let by_pos_op_eff = Lxm.flagit (Eff.ARRAY(vel)) lxm in
                   let rhs = CallByPosEff(by_pos_op_eff, OperEff []) in
                     rhs, (eql, vl)
-
+                      
               | _ -> 
                   let vel, (eql, vl) = split_val_exp_list false false node_env vel in
                   let rhs = CallByPosEff(by_pos_op_eff, OperEff vel) in
@@ -261,7 +262,7 @@ and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp ->
               (* create the var for the current call *)
               let clk_l = ve.clk in 
               let typ_l = ve.typ in
-              let nv_l = List.map2 (new_var node_env) typ_l clk_l  in
+              let nv_l = List.map2 (new_var node_env.local) typ_l clk_l  in
 
               let nve = 
                 match nv_l with
@@ -299,10 +300,10 @@ and (split_val_exp : bool -> bool -> Eff.local_env -> Eff.val_exp ->
 	      let lpl = List.map (fun nv -> LeftVarEff(nv, lxm)) nv_l in
               let eq = Lxm.flagit (lpl, rhs) lxm in
 		nve, (eql@[eq], vl@nv_l)
-                  
+        )
 
 and (split_val_exp_list : bool -> 
-      bool -> Eff.local_env -> Eff.val_exp list -> Eff.val_exp list * split_acc) =
+      bool -> node_env -> Eff.val_exp list -> Eff.val_exp list * split_acc) =
   fun when_flag top_level node_env vel ->
     let vel, accl = 
       List.split (List.map (split_val_exp when_flag top_level node_env) vel) 
@@ -312,29 +313,33 @@ and (split_val_exp_list : bool ->
       (vel,(eql,vl))
 
 (* exported *)
-let rec (node : Eff.local_env -> Eff.node_exp -> Eff.node_exp) =
+and (node : node_env -> Eff.node_exp -> Eff.node_exp) =
   fun n_env n ->
-    match n.def_eff with
-      | ExternEff 
-      | AbstractEff None -> n
-      | AbstractEff (Some pn) -> 
-          { n with def_eff = AbstractEff (Some (node n_env pn)) }
-      | BodyEff b -> 
-          Name.reset_local_var_prefix "v";
-          let loc = match n.loclist_eff with None -> [] | Some l -> l in
-          let (neqs, nv) = List.fold_left (split_eq_acc n_env) ([], loc) b.eqs_eff in
-          let asserts = List.map (fun x -> x.it) b.asserts_eff in
-          let lxm_asserts = List.map (fun x -> x.src) b.asserts_eff in
-          let nasserts,(neqs_asserts,nv_asserts) =
-            split_val_exp_list false true n_env asserts 
-          in
-          let nasserts = List.map2 Lxm.flagit nasserts lxm_asserts in
-          let (neqs, nv) =  (neqs@neqs_asserts, nv@nv_asserts) in
-          let nb = { eqs_eff = neqs ; asserts_eff = nasserts } in
-          let res =
-            { n with 
-                loclist_eff = Some nv;
-                def_eff = BodyEff nb
-            }
-          in
-            res
+    let _ =
+      Verbose.printf ~level:3 "*** Splitting node  %s\n"
+        (LicDump.string_of_node_key_iter n.node_key_eff);
+      flush stdout
+    in
+      match n.def_eff with
+        | ExternEff 
+        | AbstractEff None -> n
+        | AbstractEff (Some pn) -> 
+            { n with def_eff = AbstractEff (Some (node n_env pn)) }
+        | BodyEff b -> 
+            let loc = match n.loclist_eff with None -> [] | Some l -> l in
+            let (neqs, nv) = List.fold_left (split_eq_acc n_env) ([], loc) b.eqs_eff in
+            let asserts = List.map (fun x -> x.it) b.asserts_eff in
+            let lxm_asserts = List.map (fun x -> x.src) b.asserts_eff in
+            let nasserts,(neqs_asserts,nv_asserts) =
+              split_val_exp_list false true n_env asserts
+            in
+            let nasserts = List.map2 Lxm.flagit nasserts lxm_asserts in
+            let (neqs, nv) =  (neqs@neqs_asserts, nv@nv_asserts) in
+            let nb = { eqs_eff = neqs ; asserts_eff = nasserts } in
+            let res =
+              { n with
+                  loclist_eff = Some nv;
+                  def_eff = BodyEff nb
+              }
+            in
+              res
diff --git a/src/split.mli b/src/split.mli
index e7099c4a..8b65975a 100644
--- a/src/split.mli
+++ b/src/split.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 07/01/2009 (at 17:29) by Erwan Jahier> *)
+(** Time-stamp: <modified the 31/05/2011 (at 09:52) by Erwan Jahier> *)
 
 
 (** Split the equations of a node into several ones, in such a way
@@ -20,10 +20,14 @@
     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 -> 
+val node : Eff.node_env ->  Eff.node_exp -> Eff.node_exp
+
+
+(** Split an equation in to several ones ; also returns 
+    - the new variables to be declared 
+    - new nodes that were invented in order to deal with nested iterators
+*)
+val eq : Eff.node_env -> Eff.eq_info Lxm.srcflagged -> 
   (Eff.eq_info Lxm.srcflagged) list * Eff.var_info list
diff --git a/src/structArrayExpand.ml b/src/structArrayExpand.ml
index 9178fc0c..d56620e1 100644
--- a/src/structArrayExpand.ml
+++ b/src/structArrayExpand.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 14/04/2010 (at 14:28) by Erwan Jahier> *)
+(** Time-stamp: <modified the 20/05/2011 (at 16:31) by Erwan Jahier> *)
 
 (* Replace structures and arrays by as many variables as necessary.
    Since structures can be recursive, it migth be a lot of new variables...
diff --git a/src/test/should_work/demo/alias.lus b/src/test/should_work/demo/alias.lus
index 4014b5b5..8c7101b7 100644
--- a/src/test/should_work/demo/alias.lus
+++ b/src/test/should_work/demo/alias.lus
@@ -14,7 +14,7 @@
 const SIZE = 3;
 
 --================================================
---        Le noeud principale
+--        Le noeud principal
 --================================================
 node alias (a:bool) returns (b:bool; c:int);
 let
diff --git a/src/test/should_work/lionel/minus.lus b/src/test/should_work/lionel/minus.lus
index 7b8ac71d..1f380d27 100644
--- a/src/test/should_work/lionel/minus.lus
+++ b/src/test/should_work/lionel/minus.lus
@@ -15,3 +15,4 @@ let
   b = a;
   out = not(a);
 tel
+ 
\ No newline at end of file
diff --git a/src/test/test.res.exp b/src/test/test.res.exp
index a68eabb3..1d19efce 100644
--- a/src/test/test.res.exp
+++ b/src/test/test.res.exp
@@ -12,7 +12,7 @@ where [options] can be:
 	 Keep nested calls. By default, only one node per equation is generated.
   --expand-iterators 
   -ei 
-	 Expand array iterators.
+	 Expand array iterators (i.e., generate iterator-free code).
   --expand-enums 
   -ee 
 	 Translate enums into integers.
@@ -4596,19 +4596,10 @@ let
    y = x + 1;
 tel
 -- end of node nested::incr
-node nested::n_node_alias(x:A_int_3) returns (y:A_int_3);
-let
-   y = Lustre::map<<nested::incr, 3>>(x);
-tel
--- end of node nested::n_node_alias
-node nested::n_node_alias_2(x:A_A_int_3_5) returns (y:A_A_int_3_5);
-let
-   y = Lustre::map<<nested::n_node_alias, 5>>(x);
-tel
--- end of node nested::n_node_alias_2
 node nested::toto(x:A_A_A_int_3_5_42) returns (y:A_A_A_int_3_5_42);
 let
-   y = Lustre::map<<nested::n_node_alias_2, 42>>(x);
+    y = Lustre::map<<Lustre::map<<Lustre::map<<nested::incr, 3>>, 5>>,
+	 42>>(x);
 tel
 -- end of node nested::toto
 -- automatically defined aliases:
@@ -7592,17 +7583,17 @@ tel
 ====> ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node.lus
 
-node n_toto_n_iplus_3(a:int) returns (x:A_int_3);
+node toto_n_iplus_3(a:int) returns (x:A_int_3);
 var
    v:int;
 let
    v = Lustre::iplus(a, 1);
    x = v^3;
 tel
--- end of node n_toto_n_iplus_3
+-- end of node toto_n_iplus_3
 node param_node::toto_3(a:int) returns (x:A_int_3);
 let
-   x = n_toto_n_iplus_3(a);
+   x = toto_n_iplus_3(a);
 tel
 -- end of node param_node::toto_3
 -- automatically defined aliases:
@@ -7612,24 +7603,24 @@ type A_int_3 = int^3;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node2.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node2.lus
 
-node n_mk_tab_int_0_3(a:int) returns (res:A_int_3);
+node mk_tab_int_0_3(a:int) returns (res:A_int_3);
 let
    res = 0^3;
 tel
--- end of node n_mk_tab_int_0_3
+-- end of node mk_tab_int_0_3
 node param_node2::tab_int3(a:int) returns (res:A_int_3);
 let
-   res = n_mk_tab_int_0_3(a);
+   res = mk_tab_int_0_3(a);
 tel
 -- end of node param_node2::tab_int3
-node n_mk_tab_bool_true_4(a:bool) returns (res:A_bool_4);
+node mk_tab_bool_true_4(a:bool) returns (res:A_bool_4);
 let
    res = true^4;
 tel
--- end of node n_mk_tab_bool_true_4
+-- end of node mk_tab_bool_true_4
 node param_node2::tab_bool4(a:bool) returns (res:A_bool_4);
 let
-   res = n_mk_tab_bool_true_4(a);
+   res = mk_tab_bool_true_4(a);
 tel
 -- end of node param_node2::tab_bool4
 -- automatically defined aliases:
@@ -7640,19 +7631,19 @@ type A_int_3 = int^3;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node3.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/NONREG/param_node3.lus
 
-node n_mk_tab_int_0_3(a:int) returns (res:A_int_3);
+node mk_tab_int_0_3(a:int) returns (res:A_int_3);
 let
    res = 0^3;
 tel
--- end of node n_mk_tab_int_0_3
-node n_titi_int(a:int) returns (res:A_int_3);
+-- end of node mk_tab_int_0_3
+node titi_int(a:int) returns (res:A_int_3);
 let
-   res = n_mk_tab_int_0_3(a);
+   res = mk_tab_int_0_3(a);
 tel
--- end of node n_titi_int
+-- end of node titi_int
 node param_node3::xxx(a:int) returns (res:A_int_3);
 let
-   res = n_titi_int(a);
+   res = titi_int(a);
 tel
 -- end of node param_node3::xxx
 -- automatically defined aliases:
@@ -7667,17 +7658,17 @@ let
    o = Lustre::iplus(i1, i2);
 tel
 -- end of node param_node4::monplus
-node n_toto_n_monplus_3(a:int) returns (x:A_int_3);
+node toto_n_monplus_3(a:int) returns (x:A_int_3);
 var
    v:int;
 let
    v = param_node4::monplus(a, 1);
    x = v^3;
 tel
--- end of node n_toto_n_monplus_3
+-- end of node toto_n_monplus_3
 node param_node4::toto_3(a:int) returns (x:A_int_3);
 let
-   x = n_toto_n_monplus_3(a);
+   x = toto_n_monplus_3(a);
 tel
 -- end of node param_node4::toto_3
 -- automatically defined aliases:
@@ -7690,7 +7681,7 @@ type A_int_3 = int^3;
 type _param_struct::toto = struct  {a : int; b : int};
 const param_struct::c = _param_struct::toto{a = 1; b = 1};
 
-node n_mk_tab__param_struct::toto_param_struct::toto_3(
+node mk_tab__param_struct::toto_toto_3(
 	a:_param_struct::toto) 
 returns (
 	res:A__param_struct::toto_3);
@@ -7700,14 +7691,14 @@ let
    res = _v_1^3;
    _v_1 = _param_struct::toto{a=1;b=1};
 tel
--- end of node n_mk_tab__param_struct::toto_param_struct::toto_3
+-- end of node mk_tab__param_struct::toto_toto_3
 
 node param_struct::tab_toto(
 	a:_param_struct::toto) 
 returns (
 	res:A__param_struct::toto_3);
 let
-   res = n_mk_tab__param_struct::toto_param_struct::toto_3(a);
+   res = mk_tab__param_struct::toto_toto_3(a);
 tel
 -- end of node param_struct::tab_toto
 -- automatically defined aliases:
@@ -8322,7 +8313,7 @@ tel
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/access.lus
 
 
-node n_quick_access_real_1_m0d314ep1(
+node quick_access_real_1_m0d314ep1(
 	tab:A_real_1;
 	ix:int) 
 returns (
@@ -8337,9 +8328,9 @@ let
    _v_2 = tab[0];
    _v_3 =  if _v_1 then _v_2 else -0.314e+1;
 tel
--- end of node n_quick_access_real_1_m0d314ep1
+-- end of node quick_access_real_1_m0d314ep1
 
-node n_quick_access_real_2_m0d314ep1(
+node quick_access_real_2_m0d314ep1(
 	tab:A_real_2;
 	ix:int) 
 returns (
@@ -8356,15 +8347,15 @@ let
    res = _v_7;
    _v_1 = ix < 1;
    _v_2 = tab[0 .. 0];
-   _v_3 = n_quick_access_real_1_m0d314ep1(_v_2, ix);
+   _v_3 = quick_access_real_1_m0d314ep1(_v_2, ix);
    _v_4 = tab[1 .. 1];
    _v_5 = ix - 1;
-   _v_6 = n_quick_access_real_1_m0d314ep1(_v_4, _v_5);
+   _v_6 = quick_access_real_1_m0d314ep1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_real_2_m0d314ep1
+-- end of node quick_access_real_2_m0d314ep1
 
-node n_quick_access_real_4_m0d314ep1(
+node quick_access_real_4_m0d314ep1(
 	tab:A_real_4;
 	ix:int) 
 returns (
@@ -8381,15 +8372,15 @@ let
    res = _v_7;
    _v_1 = ix < 2;
    _v_2 = tab[0 .. 1];
-   _v_3 = n_quick_access_real_2_m0d314ep1(_v_2, ix);
+   _v_3 = quick_access_real_2_m0d314ep1(_v_2, ix);
    _v_4 = tab[2 .. 3];
    _v_5 = ix - 2;
-   _v_6 = n_quick_access_real_2_m0d314ep1(_v_4, _v_5);
+   _v_6 = quick_access_real_2_m0d314ep1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_real_4_m0d314ep1
+-- end of node quick_access_real_4_m0d314ep1
 
-node n_quick_access_real_8_m0d314ep1(
+node quick_access_real_8_m0d314ep1(
 	tab:A_real_8;
 	ix:int) 
 returns (
@@ -8406,19 +8397,19 @@ let
    res = _v_7;
    _v_1 = ix < 4;
    _v_2 = tab[0 .. 3];
-   _v_3 = n_quick_access_real_4_m0d314ep1(_v_2, ix);
+   _v_3 = quick_access_real_4_m0d314ep1(_v_2, ix);
    _v_4 = tab[4 .. 7];
    _v_5 = ix - 4;
-   _v_6 = n_quick_access_real_4_m0d314ep1(_v_4, _v_5);
+   _v_6 = quick_access_real_4_m0d314ep1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_real_8_m0d314ep1
+-- end of node quick_access_real_8_m0d314ep1
 node access::quick_access_real8(tab:A_real_8; ix:int) returns (res:real);
 let
-   res = n_quick_access_real_8_m0d314ep1(tab, ix);
+   res = quick_access_real_8_m0d314ep1(tab, ix);
 tel
 -- end of node access::quick_access_real8
-node n_quick_access_int_1_m1(tab:A_int_1; ix:int) returns (res:int);
+node quick_access_int_1_m1(tab:A_int_1; ix:int) returns (res:int);
 var
    _v_1:bool;
    _v_2:int;
@@ -8429,8 +8420,8 @@ let
    _v_2 = tab[0];
    _v_3 =  if _v_1 then _v_2 else -1;
 tel
--- end of node n_quick_access_int_1_m1
-node n_quick_access_int_2_m1(tab:A_int_2; ix:int) returns (res:int);
+-- end of node quick_access_int_1_m1
+node quick_access_int_2_m1(tab:A_int_2; ix:int) returns (res:int);
 var
    _v_1:bool;
    _v_2:A_int_1;
@@ -8443,14 +8434,14 @@ let
    res = _v_7;
    _v_1 = ix < 1;
    _v_2 = tab[0 .. 0];
-   _v_3 = n_quick_access_int_1_m1(_v_2, ix);
+   _v_3 = quick_access_int_1_m1(_v_2, ix);
    _v_4 = tab[1 .. 1];
    _v_5 = ix - 1;
-   _v_6 = n_quick_access_int_1_m1(_v_4, _v_5);
+   _v_6 = quick_access_int_1_m1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_int_2_m1
-node n_quick_access_int_4_m1(tab:A_int_4; ix:int) returns (res:int);
+-- end of node quick_access_int_2_m1
+node quick_access_int_4_m1(tab:A_int_4; ix:int) returns (res:int);
 var
    _v_1:bool;
    _v_2:A_int_2;
@@ -8463,14 +8454,14 @@ let
    res = _v_7;
    _v_1 = ix < 2;
    _v_2 = tab[0 .. 1];
-   _v_3 = n_quick_access_int_2_m1(_v_2, ix);
+   _v_3 = quick_access_int_2_m1(_v_2, ix);
    _v_4 = tab[2 .. 3];
    _v_5 = ix - 2;
-   _v_6 = n_quick_access_int_2_m1(_v_4, _v_5);
+   _v_6 = quick_access_int_2_m1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_int_4_m1
-node n_quick_access_int_8_m1(tab:A_int_8; ix:int) returns (res:int);
+-- end of node quick_access_int_4_m1
+node quick_access_int_8_m1(tab:A_int_8; ix:int) returns (res:int);
 var
    _v_1:bool;
    _v_2:A_int_4;
@@ -8483,16 +8474,16 @@ let
    res = _v_7;
    _v_1 = ix < 4;
    _v_2 = tab[0 .. 3];
-   _v_3 = n_quick_access_int_4_m1(_v_2, ix);
+   _v_3 = quick_access_int_4_m1(_v_2, ix);
    _v_4 = tab[4 .. 7];
    _v_5 = ix - 4;
-   _v_6 = n_quick_access_int_4_m1(_v_4, _v_5);
+   _v_6 = quick_access_int_4_m1(_v_4, _v_5);
    _v_7 =  if _v_1 then _v_3 else _v_6;
 tel
--- end of node n_quick_access_int_8_m1
+-- end of node quick_access_int_8_m1
 node access::quick_access_int8(tab:A_int_8; ix:int) returns (res:int);
 let
-   res = n_quick_access_int_8_m1(tab, ix);
+   res = quick_access_int_8_m1(tab, ix);
 tel
 -- end of node access::quick_access_int8
 -- automatically defined aliases:
@@ -8509,15 +8500,15 @@ type A_real_2 = real^2;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/Pascal/consensus.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/consensus.lus
 
-node n_consensus_1(T:A_bool_1) returns (a:bool);
+node consensus_1(T:A_bool_1) returns (a:bool);
 var
    _v_1:bool;
 let
    a = _v_1;
    _v_1 = T[0];
 tel
--- end of node n_consensus_1
-node n_consensus_2(T:A_bool_2) returns (a:bool);
+-- end of node consensus_1
+node consensus_2(T:A_bool_2) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_1;
@@ -8527,11 +8518,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 1];
-   _v_3 = n_consensus_1(_v_2);
+   _v_3 = consensus_1(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_2
-node n_consensus_3(T:A_bool_3) returns (a:bool);
+-- end of node consensus_2
+node consensus_3(T:A_bool_3) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_2;
@@ -8541,11 +8532,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 2];
-   _v_3 = n_consensus_2(_v_2);
+   _v_3 = consensus_2(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_3
-node n_consensus_4(T:A_bool_4) returns (a:bool);
+-- end of node consensus_3
+node consensus_4(T:A_bool_4) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_3;
@@ -8555,16 +8546,16 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 3];
-   _v_3 = n_consensus_3(_v_2);
+   _v_3 = consensus_3(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_4
+-- end of node consensus_4
 node consensus::main(T:A_bool_4) returns (c:bool);
 let
-   c = n_consensus_4(T);
+   c = consensus_4(T);
 tel
 -- end of node consensus::main
-node n_consensus_5(T:A_bool_5) returns (a:bool);
+node consensus_5(T:A_bool_5) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_4;
@@ -8574,11 +8565,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 4];
-   _v_3 = n_consensus_4(_v_2);
+   _v_3 = consensus_4(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_5
-node n_consensus_6(T:A_bool_6) returns (a:bool);
+-- end of node consensus_5
+node consensus_6(T:A_bool_6) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_5;
@@ -8588,11 +8579,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 5];
-   _v_3 = n_consensus_5(_v_2);
+   _v_3 = consensus_5(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_6
-node n_consensus_7(T:A_bool_7) returns (a:bool);
+-- end of node consensus_6
+node consensus_7(T:A_bool_7) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_6;
@@ -8602,11 +8593,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 6];
-   _v_3 = n_consensus_6(_v_2);
+   _v_3 = consensus_6(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_7
-node n_consensus_8(T:A_bool_8) returns (a:bool);
+-- end of node consensus_7
+node consensus_8(T:A_bool_8) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_7;
@@ -8616,11 +8607,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 7];
-   _v_3 = n_consensus_7(_v_2);
+   _v_3 = consensus_7(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_8
-node n_consensus_9(T:A_bool_9) returns (a:bool);
+-- end of node consensus_8
+node consensus_9(T:A_bool_9) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_8;
@@ -8630,11 +8621,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 8];
-   _v_3 = n_consensus_8(_v_2);
+   _v_3 = consensus_8(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_9
-node n_consensus_10(T:A_bool_10) returns (a:bool);
+-- end of node consensus_9
+node consensus_10(T:A_bool_10) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_9;
@@ -8644,18 +8635,18 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 9];
-   _v_3 = n_consensus_9(_v_2);
+   _v_3 = consensus_9(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_10
+-- end of node consensus_10
 node consensus::main2(T:A_bool_10) returns (a:bool);
 let
-   a = n_consensus_10(T);
+   a = consensus_10(T);
 tel
 -- end of node consensus::main2
 node consensus::c8(T:A_bool_8) returns (a:bool);
 let
-   a = n_consensus_8(T);
+   a = consensus_8(T);
 tel
 -- end of node consensus::c8
 -- automatically defined aliases:
@@ -8674,15 +8665,15 @@ type A_bool_3 = bool^3;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/Pascal/consensus2.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/consensus2.lus
 
-node n_consensus_1(T:A_bool_1) returns (a:bool);
+node consensus_1(T:A_bool_1) returns (a:bool);
 var
    _v_1:bool;
 let
    a = _v_1;
    _v_1 = T[0];
 tel
--- end of node n_consensus_1
-node n_consensus_2(T:A_bool_2) returns (a:bool);
+-- end of node consensus_1
+node consensus_2(T:A_bool_2) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_1;
@@ -8692,11 +8683,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 1];
-   _v_3 = n_consensus_1(_v_2);
+   _v_3 = consensus_1(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_2
-node n_consensus_3(T:A_bool_3) returns (a:bool);
+-- end of node consensus_2
+node consensus_3(T:A_bool_3) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_2;
@@ -8706,11 +8697,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 2];
-   _v_3 = n_consensus_2(_v_2);
+   _v_3 = consensus_2(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_3
-node n_consensus_4(T:A_bool_4) returns (a:bool);
+-- end of node consensus_3
+node consensus_4(T:A_bool_4) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_3;
@@ -8720,11 +8711,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 3];
-   _v_3 = n_consensus_3(_v_2);
+   _v_3 = consensus_3(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_4
-node n_consensus_5(T:A_bool_5) returns (a:bool);
+-- end of node consensus_4
+node consensus_5(T:A_bool_5) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_4;
@@ -8734,11 +8725,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 4];
-   _v_3 = n_consensus_4(_v_2);
+   _v_3 = consensus_4(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_5
-node n_consensus_6(T:A_bool_6) returns (a:bool);
+-- end of node consensus_5
+node consensus_6(T:A_bool_6) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_5;
@@ -8748,11 +8739,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 5];
-   _v_3 = n_consensus_5(_v_2);
+   _v_3 = consensus_5(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_6
-node n_consensus_7(T:A_bool_7) returns (a:bool);
+-- end of node consensus_6
+node consensus_7(T:A_bool_7) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_6;
@@ -8762,11 +8753,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 6];
-   _v_3 = n_consensus_6(_v_2);
+   _v_3 = consensus_6(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_7
-node n_consensus_8(T:A_bool_8) returns (a:bool);
+-- end of node consensus_7
+node consensus_8(T:A_bool_8) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_7;
@@ -8776,13 +8767,13 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 7];
-   _v_3 = n_consensus_7(_v_2);
+   _v_3 = consensus_7(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_8
+-- end of node consensus_8
 node consensus2::main(T:A_bool_8) returns (a:bool);
 let
-   a = n_consensus_8(T);
+   a = consensus_8(T);
 tel
 -- end of node consensus2::main
 -- automatically defined aliases:
@@ -10492,14 +10483,14 @@ type A_int_2 = int^2;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t0.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t0.lus
 
-node n_min_n_1(T:A_int_1) returns (mn:int);
+node min_n_1(T:A_int_1) returns (mn:int);
 var
    _v_1:int;
 let
    mn = _v_1;
    _v_1 = T[0];
 tel
--- end of node n_min_n_1
+-- end of node min_n_1
 node t0::min(x:int; y:int) returns (mn:int);
 var
    _v_1:bool;
@@ -10508,7 +10499,7 @@ let
    _v_1 = x <= y;
 tel
 -- end of node t0::min
-node n_min_n_2(T:A_int_2) returns (mn:int);
+node min_n_2(T:A_int_2) returns (mn:int);
 var
    _v_1:int;
    _v_2:A_int_1;
@@ -10518,11 +10509,11 @@ let
    mn = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 1];
-   _v_3 = n_min_n_1(_v_2);
+   _v_3 = min_n_1(_v_2);
    _v_4 = t0::min(_v_1, _v_3);
 tel
--- end of node n_min_n_2
-node n_min_n_3(T:A_int_3) returns (mn:int);
+-- end of node min_n_2
+node min_n_3(T:A_int_3) returns (mn:int);
 var
    _v_1:int;
    _v_2:A_int_2;
@@ -10532,11 +10523,11 @@ let
    mn = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 2];
-   _v_3 = n_min_n_2(_v_2);
+   _v_3 = min_n_2(_v_2);
    _v_4 = t0::min(_v_1, _v_3);
 tel
--- end of node n_min_n_3
-node n_min_n_4(T:A_int_4) returns (mn:int);
+-- end of node min_n_3
+node min_n_4(T:A_int_4) returns (mn:int);
 var
    _v_1:int;
    _v_2:A_int_3;
@@ -10546,13 +10537,13 @@ let
    mn = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 3];
-   _v_3 = n_min_n_3(_v_2);
+   _v_3 = min_n_3(_v_2);
    _v_4 = t0::min(_v_1, _v_3);
 tel
--- end of node n_min_n_4
+-- end of node min_n_4
 node t0::min_4(T:A_int_4) returns (mn:int);
 let
-   mn = n_min_n_4(T);
+   mn = min_n_4(T);
 tel
 -- end of node t0::min_4
 node t0::t0(T:A_int_4) returns (mn:int);
@@ -10571,15 +10562,15 @@ type A_int_1 = int^1;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t1.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t1.lus
 
-node n_consensus_1(T:A_bool_1) returns (a:bool);
+node consensus_1(T:A_bool_1) returns (a:bool);
 var
    _v_1:bool;
 let
    a = _v_1;
    _v_1 = T[0];
 tel
--- end of node n_consensus_1
-node n_consensus_2(T:A_bool_2) returns (a:bool);
+-- end of node consensus_1
+node consensus_2(T:A_bool_2) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_1;
@@ -10589,11 +10580,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 1];
-   _v_3 = n_consensus_1(_v_2);
+   _v_3 = consensus_1(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_2
-node n_consensus_3(T:A_bool_3) returns (a:bool);
+-- end of node consensus_2
+node consensus_3(T:A_bool_3) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_2;
@@ -10603,11 +10594,11 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 2];
-   _v_3 = n_consensus_2(_v_2);
+   _v_3 = consensus_2(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_3
-node n_consensus_4(T:A_bool_4) returns (a:bool);
+-- end of node consensus_3
+node consensus_4(T:A_bool_4) returns (a:bool);
 var
    _v_1:bool;
    _v_2:A_bool_3;
@@ -10617,13 +10608,13 @@ let
    a = _v_4;
    _v_1 = T[0];
    _v_2 = T[1 .. 3];
-   _v_3 = n_consensus_3(_v_2);
+   _v_3 = consensus_3(_v_2);
    _v_4 = _v_1 and _v_3;
 tel
--- end of node n_consensus_4
+-- end of node consensus_4
 node t1::consensus4(T:A_bool_4) returns (a:bool);
 let
-   a = n_consensus_4(T);
+   a = consensus_4(T);
 tel
 -- end of node t1::consensus4
 -- automatically defined aliases:
@@ -10636,12 +10627,12 @@ type A_bool_2 = bool^2;
 ====> ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t2.lus
 --	 ../lus2lic -vl 2 --nonreg-test should_work/Pascal/t2.lus
 
-node n_fold_left_bool_bool_1_and(a:bool; X:A_bool_1) returns (c:bool);
+node fold_left_bool_bool_1_and(a:bool; X:A_bool_1) returns (c:bool);
 let
    c = a;
 tel
--- end of node n_fold_left_bool_bool_1_and
-node n_fold_left_bool_bool_2_and(a:bool; X:A_bool_2) returns (c:bool);
+-- end of node fold_left_bool_bool_1_and
+node fold_left_bool_bool_2_and(a:bool; X:A_bool_2) returns (c:bool);
 var
    _v_1:bool;
    _v_2:bool;
@@ -10652,10 +10643,10 @@ let
    _v_1 = X[0];
    _v_2 = Lustre::and(a, _v_1);
    _v_3 = X[1 .. 1];
-   _v_4 = n_fold_left_bool_bool_1_and(_v_2, _v_3);
+   _v_4 = fold_left_bool_bool_1_and(_v_2, _v_3);
 tel
--- end of node n_fold_left_bool_bool_2_and
-node n_fold_left_bool_bool_3_and(a:bool; X:A_bool_3) returns (c:bool);
+-- end of node fold_left_bool_bool_2_and
+node fold_left_bool_bool_3_and(a:bool; X:A_bool_3) returns (c:bool);
 var
    _v_1:bool;
    _v_2:bool;
@@ -10666,10 +10657,10 @@ let
    _v_1 = X[0];
    _v_2 = Lustre::and(a, _v_1);
    _v_3 = X[1 .. 2];
-   _v_4 = n_fold_left_bool_bool_2_and(_v_2, _v_3);
+   _v_4 = fold_left_bool_bool_2_and(_v_2, _v_3);
 tel
--- end of node n_fold_left_bool_bool_3_and
-node n_fold_left_bool_bool_4_and(a:bool; X:A_bool_4) returns (c:bool);
+-- end of node fold_left_bool_bool_3_and
+node fold_left_bool_bool_4_and(a:bool; X:A_bool_4) returns (c:bool);
 var
    _v_1:bool;
    _v_2:bool;
@@ -10680,10 +10671,10 @@ let
    _v_1 = X[0];
    _v_2 = Lustre::and(a, _v_1);
    _v_3 = X[1 .. 3];
-   _v_4 = n_fold_left_bool_bool_3_and(_v_2, _v_3);
+   _v_4 = fold_left_bool_bool_3_and(_v_2, _v_3);
 tel
--- end of node n_fold_left_bool_bool_4_and
-node n_fold_left_bool_bool_5_and(a:bool; X:A_bool_5) returns (c:bool);
+-- end of node fold_left_bool_bool_4_and
+node fold_left_bool_bool_5_and(a:bool; X:A_bool_5) returns (c:bool);
 var
    _v_1:bool;
    _v_2:bool;
@@ -10694,10 +10685,10 @@ let
    _v_1 = X[0];
    _v_2 = Lustre::and(a, _v_1);
    _v_3 = X[1 .. 4];
-   _v_4 = n_fold_left_bool_bool_4_and(_v_2, _v_3);
+   _v_4 = fold_left_bool_bool_4_and(_v_2, _v_3);
 tel
--- end of node n_fold_left_bool_bool_5_and
-node n_fold_left_bool_bool_6_and(a:bool; X:A_bool_6) returns (c:bool);
+-- end of node fold_left_bool_bool_5_and
+node fold_left_bool_bool_6_and(a:bool; X:A_bool_6) returns (c:bool);
 var
    _v_1:bool;
    _v_2:bool;
@@ -10708,12 +10699,12 @@ let
    _v_1 = X[0];
    _v_2 = Lustre::and(a, _v_1);
    _v_3 = X[1 .. 5];
-   _v_4 = n_fold_left_bool_bool_5_and(_v_2, _v_3);
+   _v_4 = fold_left_bool_bool_5_and(_v_2, _v_3);
 tel
--- end of node n_fold_left_bool_bool_6_and
+-- end of node fold_left_bool_bool_6_and
 node t2::consensus_6(X:A_bool_6) returns (c:bool);
 let
-   c = n_fold_left_bool_bool_6_and(true, X);
+   c = fold_left_bool_bool_6_and(true, X);
 tel
 -- end of node t2::consensus_6
 node t2::t2(X:A_bool_6) returns (c:bool);
@@ -10723,7 +10714,7 @@ tel
 -- end of node t2::t2
 node t2::consensus_6_bis(a:bool; X:A_bool_6) returns (c:bool);
 let
-   c = n_fold_left_bool_bool_6_and(a, X);
+   c = fold_left_bool_bool_6_and(a, X);
 tel
 -- end of node t2::consensus_6_bis
 -- automatically defined aliases:
@@ -10940,9 +10931,13 @@ node clock2::clock(a:bool; b:int) returns (c:int when a);
 var
    _v_1:int when a;
    _v_2:int when a;
+   _v_3:int when a;
+   _v_4:int when a;
 let
    c = _v_1 + _v_2;
-   _v_1 = 1 when a + 1 when a;
+   _v_1 = _v_3 + _v_4;
+   _v_3 = 1 when a;
+   _v_4 = 1 when a;
    _v_2 = b when a;
 tel
 -- end of node clock2::clock
@@ -12591,21 +12586,6 @@ let
    s = i;
 tel
 -- end of node mapdeRed::incr
-node mapdeRed::n_node_alias(i:int) returns (accu:int; s:A_int_2);
-let
-   (accu, s) = Lustre::fill<<mapdeRed::incr, 2>>(i);
-tel
--- end of node mapdeRed::n_node_alias
-
-node mapdeRed::n_node_alias_2(
-	i1:A_int_2;
-	i2:A_int_2) 
-returns (
-	o:A_int_2);
-let
-   o = Lustre::map<<Lustre::plus, 2>>(i1, i2);
-tel
--- end of node mapdeRed::n_node_alias_2
 
 node mapdeRed::mapdeRed(
 	init:A_int_2;
@@ -12615,13 +12595,13 @@ returns (
 	T:A_A_int_2_3;
 	bid:int);
 let
-   (bid, T) = fill<<mapdeRed::n_node_alias, 3>>(init2);
-   r = red<<mapdeRed::n_node_alias_2, 3>>(init, T);
+   (bid, T) = fill<<Lustre::fill<<mapdeRed::incr, 2>>, 3>>(init2);
+   r = red<<Lustre::map<<Lustre::plus, 2>>, 3>>(init, T);
 tel
 -- end of node mapdeRed::mapdeRed
 -- automatically defined aliases:
-type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
+type A_int_2 = int^2;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/demo/mapinf.lus
@@ -12645,14 +12625,9 @@ let
    b = a + 1;
 tel
 -- end of node mapiter::incr_tab
-node mapiter::n_node_alias(a:A_int_7) returns (b:A_int_7);
-let
-   b = Lustre::map<<mapiter::incr_tab, 7>>(a);
-tel
--- end of node mapiter::n_node_alias
 node mapiter::mapiter(i1:A_A_int_7_3) returns (s1:A_A_int_7_3);
 let
-   s1 = map<<mapiter::n_node_alias, 3>>(i1);
+   s1 = map<<Lustre::map<<mapiter::incr_tab, 7>>, 3>>(i1);
 tel
 -- end of node mapiter::mapiter
 -- automatically defined aliases:
@@ -12767,14 +12742,9 @@ let
    _v_1 = init > a;
 tel
 -- end of node rediter::max
-node rediter::n_node_alias(init:int; a:A_int_5) returns (b:int);
-let
-   b = Lustre::red<<rediter::max, 5>>(init, a);
-tel
--- end of node rediter::n_node_alias
 node rediter::rediter(a:A_A_int_5_3) returns (b:int);
 let
-   b = red<<rediter::n_node_alias, 3>>(0, a);
+   b = red<<Lustre::red<<rediter::max, 5>>, 3>>(0, a);
 tel
 -- end of node rediter::rediter
 -- automatically defined aliases:
@@ -12793,19 +12763,14 @@ let
    _v_1 = init > a;
 tel
 -- end of node redoptest::max
-node redoptest::n_node_alias(i1:int; i2:A_int_5) returns (o:int);
-let
-   o = Lustre::red<<Lustre::plus, 5>>(i1, i2);
-tel
--- end of node redoptest::n_node_alias
 node redoptest::redoptest(a:A_A_int_5_3) returns (b:int);
 let
-   b = red<<redoptest::n_node_alias, 3>>(0, a);
+   b = red<<Lustre::red<<Lustre::plus, 5>>, 3>>(0, a);
 tel
 -- end of node redoptest::redoptest
 -- automatically defined aliases:
-type A_int_5 = int^5;
 type A_A_int_5_3 = A_int_5^3;
+type A_int_5 = int^5;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/demo/sample_time_change.lus
@@ -17394,56 +17359,22 @@ let
    val = accin;
 tel
 -- end of node arrays::incr
-node arrays::n_node_alias_2(i1:int; i2:A_A_int_4_3) returns (o:int);
-let
-   o = Lustre::red<<arrays::n_node_alias, 3>>(i1, i2);
-tel
--- end of node arrays::n_node_alias_2
-node arrays::n_node_alias(i1:int; i2:A_int_4) returns (o:int);
-let
-   o = Lustre::red<<Lustre::plus, 4>>(i1, i2);
-tel
--- end of node arrays::n_node_alias
 node arrays::big_sum(x:A_A_A_int_4_3_2) returns (s:int);
 let
-   s = red<<arrays::n_node_alias_2, 2>>(0, x);
+   s = red<<Lustre::red<<Lustre::red<<Lustre::plus, 4>>, 3>>, 2>>(0, x);
 tel
 -- end of node arrays::big_sum
-node arrays::n_node_alias_3(i1:bool; i2:A_bool_4) returns (o:bool);
-let
-   o = Lustre::red<<Lustre::or, 4>>(i1, i2);
-tel
--- end of node arrays::n_node_alias_3
-node arrays::n_node_alias_4(i1:bool; i2:A_A_bool_4_3) returns (o:bool);
-let
-   o = Lustre::red<<arrays::n_node_alias_3, 3>>(i1, i2);
-tel
--- end of node arrays::n_node_alias_4
 node arrays::big_or(x:A_A_A_bool_4_3_2) returns (s:bool);
 let
-   s = red<<arrays::n_node_alias_4, 2>>(false, x);
+   s = red<<Lustre::red<<Lustre::red<<Lustre::or, 4>>, 3>>, 2>>(false, x);
 tel
 -- end of node arrays::big_or
-node arrays::n_node_alias_5(accin:int) returns (accout:int; val:A_int_4);
-let
-   (accout, val) = Lustre::fill<<arrays::incr, 4>>(accin);
-tel
--- end of node arrays::n_node_alias_5
-
-node arrays::n_node_alias_6(
-	accin:int) 
-returns (
-	accout:int;
-	val:A_A_int_4_3);
-let
-   (accout, val) = Lustre::fill<<arrays::n_node_alias_5, 3>>(accin);
-tel
--- end of node arrays::n_node_alias_6
 node arrays::big_incr(init:int) returns (x:A_A_A_int_4_3_2);
 var
    accout:int;
 let
-   (accout, x) = fill<<arrays::n_node_alias_6, 2>>(init);
+    (accout, x) = fill<<Lustre::fill<<Lustre::fill<<arrays::incr, 4>>, 3>>,
+	 2>>(init);
 tel
 -- end of node arrays::big_incr
 
@@ -17467,30 +17398,6 @@ let
 tel
 -- end of node arrays::full_adder
 
-node arrays::n_node_alias_7(
-	ci:bool;
-	x:A_bool_4;
-	y:A_bool_4) 
-returns (
-	co:bool;
-	s:A_bool_4);
-let
-   (co, s) = Lustre::fillred<<arrays::full_adder, 4>>(ci, x, y);
-tel
--- end of node arrays::n_node_alias_7
-
-node arrays::n_node_alias_8(
-	ci:bool;
-	x:A_A_bool_4_3;
-	y:A_A_bool_4_3) 
-returns (
-	co:bool;
-	s:A_A_bool_4_3);
-let
-   (co, s) = Lustre::fillred<<arrays::n_node_alias_7, 3>>(ci, x, y);
-tel
--- end of node arrays::n_node_alias_8
-
 node arrays::add_long(
 	x:A_A_A_bool_4_3_2;
 	y:A_A_A_bool_4_3_2) 
@@ -17499,22 +17406,13 @@ returns (
 var
    co:bool;
 let
-   (co, s) = fillred<<arrays::n_node_alias_8, 2>>(false, x, y);
+    (co, s) = fillred<<Lustre::fillred<<Lustre::fillred<<arrays::full_adder,
+	 4>>, 3>>, 2>>(false, x, y);
 tel
 -- end of node arrays::add_long
-node arrays::n_node_alias_9(i1:bool; i2:A_bool_4) returns (o:bool);
-let
-   o = Lustre::red<<Lustre::xor, 4>>(i1, i2);
-tel
--- end of node arrays::n_node_alias_9
-node arrays::n_node_alias_10(i1:bool; i2:A_A_bool_4_3) returns (o:bool);
-let
-   o = Lustre::red<<arrays::n_node_alias_9, 3>>(i1, i2);
-tel
--- end of node arrays::n_node_alias_10
 node arrays::big_xor(x:A_A_A_bool_4_3_2) returns (s:bool);
 let
-   s = red<<arrays::n_node_alias_10, 2>>(false, x);
+   s = red<<Lustre::red<<Lustre::red<<Lustre::xor, 4>>, 3>>, 2>>(false, x);
 tel
 -- end of node arrays::big_xor
 
@@ -17548,13 +17446,12 @@ let
 tel
 -- end of node arrays::add_byte
 -- automatically defined aliases:
+type A_A_int_4_3 = A_int_4^3;
 type A_A_A_bool_4_3_2 = A_A_bool_4_3^2;
 type A_bool_4 = bool^4;
 type A_A_A_int_4_3_2 = A_A_int_4_3^2;
 type A_A_bool_4_3 = A_bool_4^3;
 type A_int_4 = int^4;
-type A_A_int_4_3 = A_int_4^3;
-type A_A_int_4_3 = A_int_4^3;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/lionel/bug.lus
@@ -17895,16 +17792,6 @@ let
    res = red<<mapiter::red_incr, 3>>(iacc, I);
 tel
 -- end of node mapiter::reducemat
-
-node mapiter::n_node_alias(
-	i1:A_bool_2;
-	i2:A_bool_2) 
-returns (
-	o:A_bool_2);
-let
-   o = Lustre::map<<Lustre::eq, 2>>(i1, i2);
-tel
--- end of node mapiter::n_node_alias
 node mapiter::map_egal(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2);
 let
    o = Lustre::map<<Lustre::eq, 2>>(i1, i2);
@@ -17917,7 +17804,7 @@ node mapiter::composemat(
 returns (
 	s1:A_A_bool_2_3);
 let
-   s1 = map<<mapiter::n_node_alias, 3>>(i1, i2);
+   s1 = map<<Lustre::map<<Lustre::eq, 2>>, 3>>(i1, i2);
 tel
 -- end of node mapiter::composemat
 node mapiter::mapiter(a:bool) returns (nbTrue:int);
@@ -17939,6 +17826,7 @@ tel
 -- automatically defined aliases:
 type A_A_bool_2_3 = A_bool_2^3;
 type A_bool_2 = bool^2;
+type A_bool_2 = bool^2;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/lionel/matrice.lus
@@ -17967,21 +17855,6 @@ let
 tel
 -- end of node matrice::fibo
 
-node matrice::n_node_alias(
-	accu_in:A_int_2) 
-returns (
-	accu_out:A_int_2;
-	elt:A_int_3);
-let
-   (accu_out, elt) = Lustre::fill<<matrice::fibo, 3>>(accu_in);
-tel
--- end of node matrice::n_node_alias
-node matrice::n_node_alias_2(i1:int; i2:A_int_3) returns (o:int);
-let
-   o = Lustre::red<<Lustre::plus, 3>>(i1, i2);
-tel
--- end of node matrice::n_node_alias_2
-
 node matrice::matrice(
 	a:int) 
 returns (
@@ -17991,9 +17864,9 @@ returns (
 var
    _v_1:A_int_2;
 let
-   (bid, T) = fill<<matrice::n_node_alias, 2>>(_v_1);
+   (bid, T) = fill<<Lustre::fill<<matrice::fibo, 3>>, 2>>(_v_1);
    _v_1 = [a, a];
-   sum = red<<matrice::n_node_alias_2, 2>>(0, T);
+   sum = red<<Lustre::red<<Lustre::plus, 3>>, 2>>(0, T);
 tel
 -- end of node matrice::matrice
 -- automatically defined aliases:
@@ -18007,24 +17880,19 @@ type A_A_int_3_2 = A_int_3^2;
 
 const matrice2::m = 2;
 const matrice2::n = 2;
-node matrice2::n_node_alias(i1:int; i2:A_int_2) returns (o:int);
-let
-   o = Lustre::red<<Lustre::plus, 2>>(i1, i2);
-tel
--- end of node matrice2::n_node_alias
 node matrice2::matrice2(a:int) returns (res:int);
 var
    _v_1:A_int_2;
    _v_2:A_A_int_2_2;
 let
-   res = red<<matrice2::n_node_alias, 2>>(0, _v_2);
+   res = red<<Lustre::red<<Lustre::plus, 2>>, 2>>(0, _v_2);
    _v_1 = 1^2;
    _v_2 = _v_1^2;
 tel
 -- end of node matrice2::matrice2
 -- automatically defined aliases:
-type A_int_2 = int^2;
 type A_A_int_2_2 = A_int_2^2;
+type A_int_2 = int^2;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/lionel/minus.lus
@@ -18032,33 +17900,12 @@ type A_A_int_2_2 = A_int_2^2;
 
 const minus::m = 2;
 const minus::n = 3;
-
-node minus::n_node_alias(
-	c:A_bool_3;
-	b1:A_bool_3;
-	b2:A_bool_3) 
-returns (
-	o:A_bool_3);
-let
-   o = Lustre::map<<Lustre::if, 3>>(c, b1, b2);
-tel
--- end of node minus::n_node_alias
 node minus::bitalt(a:bool) returns (out:bool; b:bool);
 let
    b = a;
    out = not a;
 tel
 -- end of node minus::bitalt
-node minus::n_node_alias_2(a:bool) returns (out:bool; b:A_bool_3);
-let
-   (out, b) = Lustre::fill<<minus::bitalt, 3>>(a);
-tel
--- end of node minus::n_node_alias_2
-node minus::n_node_alias_3(i1:bool; i2:A_bool_3) returns (o:bool);
-let
-   o = Lustre::red<<Lustre::xor, 3>>(i1, i2);
-tel
--- end of node minus::n_node_alias_3
 
 node minus::minus(
 	a:A_A_bool_3_2;
@@ -18075,18 +17922,18 @@ var
    _v_3:A_bool_3;
    _v_4:bool;
 let
-   T1 = map<<minus::n_node_alias, 2>>(a, b, c);
-   (bid, T2) = fill<<minus::n_node_alias_2, 2>>(_v_2);
+   T1 = map<<Lustre::map<<Lustre::if, 3>>, 2>>(a, b, c);
+   (bid, T2) = fill<<Lustre::fill<<minus::bitalt, 3>>, 2>>(_v_2);
    _v_1 = a[0];
    _v_2 = _v_1[0];
-   r = red<<minus::n_node_alias_3, 2>>(_v_4, T1);
+   r = red<<Lustre::red<<Lustre::xor, 3>>, 2>>(_v_4, T1);
    _v_3 = a[0];
    _v_4 = _v_3[0];
 tel
 -- end of node minus::minus
 -- automatically defined aliases:
-type A_bool_3 = bool^3;
 type A_A_bool_3_2 = A_bool_3^2;
+type A_bool_3 = bool^3;
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_work/lionel/moyenne.lus
@@ -19515,11 +19362,6 @@ let
    oacc = not res;
 tel
 -- end of node predefOp::bitalt
-node predefOp::n_node_alias(iacc:bool) returns (oacc:bool; res:A_bool_2);
-let
-   (oacc, res) = Lustre::fill<<predefOp::bitalt, 2>>(iacc);
-tel
--- end of node predefOp::n_node_alias
 
 node predefOp::initmatbool(
 	iacc:bool) 
@@ -19527,37 +19369,22 @@ returns (
 	sacc:bool;
 	R:A_A_bool_2_3);
 let
-   (sacc, R) = fill<<predefOp::n_node_alias, 3>>(iacc);
+   (sacc, R) = fill<<Lustre::fill<<predefOp::bitalt, 2>>, 3>>(iacc);
 tel
 -- end of node predefOp::initmatbool
 
-node predefOp::n_node_alias_2(
-	i1:A_bool_2;
-	i2:A_bool_2) 
-returns (
-	o:A_bool_2);
-let
-   o = Lustre::map<<Lustre::impl, 2>>(i1, i2);
-tel
--- end of node predefOp::n_node_alias_2
-
 node predefOp::composematbool(
 	i1:A_A_bool_2_3;
 	i2:A_A_bool_2_3) 
 returns (
 	s1:A_A_bool_2_3);
 let
-   s1 = map<<predefOp::n_node_alias_2, 3>>(i1, i2);
+   s1 = map<<Lustre::map<<Lustre::impl, 2>>, 3>>(i1, i2);
 tel
 -- end of node predefOp::composematbool
-node predefOp::n_node_alias_3(init:int; b:A_bool_2) returns (res:int);
-let
-   res = Lustre::red<<predefOp::incr, 2>>(init, b);
-tel
--- end of node predefOp::n_node_alias_3
 node predefOp::reducematbool(iacc:int; I:A_A_bool_2_3) returns (res:int);
 let
-   res = red<<predefOp::n_node_alias_3, 3>>(iacc, I);
+   res = red<<Lustre::red<<predefOp::incr, 2>>, 3>>(iacc, I);
 tel
 -- end of node predefOp::reducematbool
 
@@ -19581,26 +19408,6 @@ let
 tel
 -- end of node predefOp::predefOp2
 
-node predefOp::n_node_alias_4(
-	i1:A_int_2;
-	i2:A_int_2) 
-returns (
-	o:A_int_2);
-let
-   o = Lustre::map<<Lustre::div, 2>>(i1, i2);
-tel
--- end of node predefOp::n_node_alias_4
-
-node predefOp::n_node_alias_5(
-	i1:A_int_2;
-	i2:A_int_2) 
-returns (
-	o:A_bool_2);
-let
-   o = Lustre::map<<Lustre::gte, 2>>(i1, i2);
-tel
--- end of node predefOp::n_node_alias_5
-
 node predefOp::composematint(
 	i1:A_A_int_2_3;
 	i2:A_A_int_2_3) 
@@ -19608,8 +19415,8 @@ returns (
 	s1:A_A_int_2_3;
 	s2:A_A_bool_2_3);
 let
-   s1 = map<<predefOp::n_node_alias_4, 3>>(i1, i2);
-   s2 = map<<predefOp::n_node_alias_5, 3>>(i1, i2);
+   s1 = map<<Lustre::map<<Lustre::div, 2>>, 3>>(i1, i2);
+   s2 = map<<Lustre::map<<Lustre::gte, 2>>, 3>>(i1, i2);
 tel
 -- end of node predefOp::composematint
 node predefOp::incremental(iacc:int) returns (oacc:int; res:int);
@@ -19618,24 +19425,14 @@ let
    oacc = res + 1;
 tel
 -- end of node predefOp::incremental
-node predefOp::n_node_alias_6(i1:int; i2:A_int_2) returns (o:int);
-let
-   o = Lustre::red<<Lustre::plus, 2>>(i1, i2);
-tel
--- end of node predefOp::n_node_alias_6
 node predefOp::reducematint(iacc:int; I:A_A_int_2_3) returns (res:int);
 let
-   res = red<<predefOp::n_node_alias_6, 3>>(iacc, I);
+   res = red<<Lustre::red<<Lustre::plus, 2>>, 3>>(iacc, I);
 tel
 -- end of node predefOp::reducematint
-node predefOp::n_node_alias_7(iacc:int) returns (oacc:int; res:A_int_2);
-let
-   (oacc, res) = Lustre::fill<<predefOp::incremental, 2>>(iacc);
-tel
--- end of node predefOp::n_node_alias_7
 node predefOp::initmatint(iacc:int) returns (sacc:int; R:A_A_int_2_3);
 let
-   (sacc, R) = fill<<predefOp::n_node_alias_7, 3>>(iacc);
+   (sacc, R) = fill<<Lustre::fill<<predefOp::incremental, 2>>, 3>>(iacc);
 tel
 -- end of node predefOp::initmatint
 
@@ -22560,10 +22357,6 @@ let
 tel
 -- end of node pint::fby1
 type _inter::selType = struct  {i : int; b : bool; r : real};
-*** Error in file "packages.lus", line 31, col 10 to 15, token 'preced':
-*** provided node for inter::preced is not compatible with its implementation: 
-*** int and _inter::selType are not unifiable
-
 
 node inter::preced(
 	in:_inter::selType) 
@@ -22590,6 +22383,10 @@ let
    _v_6 = in.r;
 tel
 -- end of node inter::preced
+*** Error in file "packages.lus", line 31, col 10 to 15, token 'preced':
+*** provided node for inter::preced is not compatible with its implementation: 
+*** int and _inter::selType are not unifiable
+
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_fail/type/packages2.lus
@@ -22597,15 +22394,15 @@ tel
 
 type _stupid::t1;
 type _stupid::t2;
-*** Error in file "packages2.lus", line 5, col 8 to 8, token 'n':
-*** provided node for stupid::n is not compatible with its implementation: 
-*** _stupid::t1 <> int
-
 node stupid::n(x:int; y:_stupid::t2) returns (z:_stupid::t2);
 let
    z = y;
 tel
 -- end of node stupid::n
+*** Error in file "packages2.lus", line 5, col 8 to 8, token 'n':
+*** provided node for stupid::n is not compatible with its implementation: 
+*** _stupid::t1 <> int
+
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --nonreg-test should_fail/type/parametric_node.lus
diff --git a/src/test/test_ec.res.exp b/src/test/test_ec.res.exp
index 832aafdd..a466933c 100644
--- a/src/test/test_ec.res.exp
+++ b/src/test/test_ec.res.exp
@@ -608,7 +608,7 @@ ec2c /tmp/xx.ec
 ====> ../lus2lic   --nonreg-test -ec should_work/call/call03.lus -o /tmp/xx.ec
 ec2c /tmp/xx.ec
 syntax errors...
-syntax error     - at line 19
+syntax error     - at line 28
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test -ec should_work/call/call04.lus -o /tmp/xx.ec
diff --git a/src/test/test_lv4.res.exp b/src/test/test_lv4.res.exp
index c7d113c8..9ce4862f 100644
--- a/src/test/test_lv4.res.exp
+++ b/src/test/test_lv4.res.exp
@@ -595,10 +595,6 @@ lus2ec /tmp/xx.lus nc9__nc9
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/nested.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus nested__incr
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus nested__n_node_alias
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus nested__n_node_alias_2
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus nested__toto
 --Pollux Version 2.3a
 
@@ -629,27 +625,27 @@ lus2ec /tmp/xx.lus cst__cst
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/param_node.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_toto_n_iplus_3
+lus2ec /tmp/xx.lus toto_n_iplus_3
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_node__toto_3
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/param_node2.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_mk_tab_int_0_3
+lus2ec /tmp/xx.lus mk_tab_int_0_3
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_node2__tab_int3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_mk_tab_bool_true_4
+lus2ec /tmp/xx.lus mk_tab_bool_true_4
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_node2__tab_bool4
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/param_node3.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_mk_tab_int_0_3
+lus2ec /tmp/xx.lus mk_tab_int_0_3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_titi_int
+lus2ec /tmp/xx.lus titi_int
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_node3__xxx
 --Pollux Version 2.3a
@@ -658,14 +654,14 @@ lus2ec /tmp/xx.lus param_node3__xxx
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/param_node4.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus param_node4__monplus
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_toto_n_monplus_3
+lus2ec /tmp/xx.lus toto_n_monplus_3
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_node4__toto_3
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/NONREG/param_struct.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_mk_tab__param_struct__toto_param_struct__toto_3
+lus2ec /tmp/xx.lus mk_tab__param_struct__toto_toto_3
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus param_struct__tab_toto
 --Pollux Version 2.3a
@@ -793,50 +789,50 @@ lus2ec /tmp/xx.lus v1__v1
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/access.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_quick_access_real_1_m0d314ep1
+lus2ec /tmp/xx.lus quick_access_real_1_m0d314ep1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_real_2_m0d314ep1
+lus2ec /tmp/xx.lus quick_access_real_2_m0d314ep1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_real_4_m0d314ep1
+lus2ec /tmp/xx.lus quick_access_real_4_m0d314ep1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_real_8_m0d314ep1
+lus2ec /tmp/xx.lus quick_access_real_8_m0d314ep1
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus access__quick_access_real8
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_int_1_m1
+lus2ec /tmp/xx.lus quick_access_int_1_m1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_int_2_m1
+lus2ec /tmp/xx.lus quick_access_int_2_m1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_int_4_m1
+lus2ec /tmp/xx.lus quick_access_int_4_m1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_quick_access_int_8_m1
+lus2ec /tmp/xx.lus quick_access_int_8_m1
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus access__quick_access_int8
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/consensus.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_consensus_1
+lus2ec /tmp/xx.lus consensus_1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_2
+lus2ec /tmp/xx.lus consensus_2
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_3
+lus2ec /tmp/xx.lus consensus_3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_4
+lus2ec /tmp/xx.lus consensus_4
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus consensus__main
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_5
+lus2ec /tmp/xx.lus consensus_5
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_6
+lus2ec /tmp/xx.lus consensus_6
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_7
+lus2ec /tmp/xx.lus consensus_7
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_8
+lus2ec /tmp/xx.lus consensus_8
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_9
+lus2ec /tmp/xx.lus consensus_9
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_10
+lus2ec /tmp/xx.lus consensus_10
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus consensus__main2
 --Pollux Version 2.3a
@@ -845,21 +841,21 @@ lus2ec /tmp/xx.lus consensus__c8
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/consensus2.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_consensus_1
+lus2ec /tmp/xx.lus consensus_1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_2
+lus2ec /tmp/xx.lus consensus_2
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_3
+lus2ec /tmp/xx.lus consensus_3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_4
+lus2ec /tmp/xx.lus consensus_4
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_5
+lus2ec /tmp/xx.lus consensus_5
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_6
+lus2ec /tmp/xx.lus consensus_6
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_7
+lus2ec /tmp/xx.lus consensus_7
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_8
+lus2ec /tmp/xx.lus consensus_8
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus consensus2__main
 --Pollux Version 2.3a
@@ -1019,15 +1015,15 @@ lus2ec /tmp/xx.lus t__toto
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/t0.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_min_n_1
+lus2ec /tmp/xx.lus min_n_1
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus t0__min
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_min_n_2
+lus2ec /tmp/xx.lus min_n_2
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_min_n_3
+lus2ec /tmp/xx.lus min_n_3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_min_n_4
+lus2ec /tmp/xx.lus min_n_4
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus t0__min_4
 --Pollux Version 2.3a
@@ -1036,30 +1032,30 @@ lus2ec /tmp/xx.lus t0__t0
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/t1.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_consensus_1
+lus2ec /tmp/xx.lus consensus_1
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_2
+lus2ec /tmp/xx.lus consensus_2
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_3
+lus2ec /tmp/xx.lus consensus_3
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_consensus_4
+lus2ec /tmp/xx.lus consensus_4
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus t1__consensus4
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/Pascal/t2.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_1_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_1_and
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_2_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_2_and
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_3_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_3_and
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_4_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_4_and
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_5_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_5_and
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus n_fold_left_bool_bool_6_and
+lus2ec /tmp/xx.lus fold_left_bool_bool_6_and
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus t2__consensus_6
 --Pollux Version 2.3a
@@ -1328,10 +1324,6 @@ lus2ec /tmp/xx.lus map_red_iter__map_red_iter
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/demo/mapdeRed.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus mapdeRed__incr
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus mapdeRed__n_node_alias
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus mapdeRed__n_node_alias_2
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus mapdeRed__mapdeRed
 --Pollux Version 2.3a
 
@@ -1344,8 +1336,6 @@ lus2ec /tmp/xx.lus mapinf__mapinf
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/demo/mapiter.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus mapiter__incr_tab
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus mapiter__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus mapiter__mapiter
 --Pollux Version 2.3a
 
@@ -1368,8 +1358,6 @@ lus2ec /tmp/xx.lus pre_x__pre_x
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/demo/rediter.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus rediter__max
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus rediter__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus rediter__rediter
 --Pollux Version 2.3a
 
@@ -1377,8 +1365,6 @@ lus2ec /tmp/xx.lus rediter__rediter
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/demo/redoptest.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus redoptest__max
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus redoptest__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus redoptest__redoptest
 --Pollux Version 2.3a
 
@@ -1758,36 +1744,16 @@ lus2ec /tmp/xx.lus shift_ludic__n_shift
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/lionel/arrays.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus arrays__incr
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_2
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__big_sum
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_3
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_4
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__big_or
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_5
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_6
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__big_incr
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__full_adder
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_7
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_8
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__add_long
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_9
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus arrays__n_node_alias_10
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__big_xor
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus arrays__arrays
@@ -1854,8 +1820,6 @@ lus2ec /tmp/xx.lus mapiter__red_incr
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus mapiter__reducemat
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus mapiter__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus mapiter__map_egal
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus mapiter__composemat
@@ -1867,30 +1831,18 @@ lus2ec /tmp/xx.lus mapiter__mapiter
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/lionel/matrice.lus -o /tmp/xx.lus
 lus2ec /tmp/xx.lus matrice__fibo
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus matrice__n_node_alias
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus matrice__n_node_alias_2
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus matrice__matrice
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/lionel/matrice2.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus matrice2__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus matrice2__matrice2
 --Pollux Version 2.3a
 
 ----------------------------------------------------------------------
 ====> ../lus2lic   --nonreg-test  -lv4 should_work/lionel/minus.lus -o /tmp/xx.lus
-lus2ec /tmp/xx.lus minus__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus minus__bitalt
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus minus__n_node_alias_2
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus minus__n_node_alias_3
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus minus__minus
 --Pollux Version 2.3a
 
@@ -2023,34 +1975,20 @@ lus2ec /tmp/xx.lus predefOp__incr
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__bitalt
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__initmatbool
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_2
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__composematbool
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_3
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__reducematbool
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__predefOp2
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_4
---Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_5
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__composematint
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__incremental
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_6
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__reducematint
 --Pollux Version 2.3a
-lus2ec /tmp/xx.lus predefOp__n_node_alias_7
---Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__initmatint
 --Pollux Version 2.3a
 lus2ec /tmp/xx.lus predefOp__predefOp
-- 
GitLab