From 5c722d860b5f517bc59b23df89c838a34df24651 Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Fri, 12 Dec 2008 11:10:06 +0100
Subject: [PATCH] Break the recursivity is the Eff.node_exp representation
 (which fix nested iter. pbs).

In  short, the  rationale for  this change,  is that  it is  having a
recursive node_exp is
- useless,
- too complicated,
- wrong w.r.t. nesting iterator calls

In long:

- It is useless because, at the  Eff level, a node cannot call itself
  via one  of its  static arg (which  was where the  recursivity came
  from).

- and indeed, it  is much simpler to consider that  a static arg node
  can only be ident.long that identifies a node alias.

  This  means of  course, that  nested iterators  have  been unnested
  before,   inventing  alias   node  names   along  the   way...  And
  polymorphism makes thing difficult once again.

- But the  *big* problem  with a recursive  node_exp is that  it make
  things very  complicated to (lic)dump nested  iterator call because
  of polymorphism!   Actually, it  even makes thing  complicated when
  the iterators were themselves not nested in the source code !

  Some ugly  things were done in  LicDump to unnest  those calls when
  printing node_exp.   But this uglyness  have a price:  tricky code,
  and bugs! Indeed, nested iterators calls were wong for example when
  using  the --inline-iterator  mode (but  i would  not  be surprised
  that is wrong in other cases...).

Hence,  LicDump  is  simpler,  but  of course  LazyCompiler  is  more
complicated.  But  this  is  reasonable:  a  pretty-printer  is  not
supposed to be complicated.
---
 src/Makefile                                  |   2 +-
 src/TODO                                      |  34 +-
 src/eff.ml                                    |  26 +-
 src/evalConst.ml                              |  26 +-
 src/evalType.ml                               |  20 +-
 src/getEff.ml                                 | 233 +++++-
 src/getEff.mli                                |   2 +-
 src/inline.ml                                 |  12 +-
 src/lazyCompiler.ml                           | 100 ++-
 src/licDump.ml                                | 186 ++---
 src/licDump.mli                               |  67 +-
 src/main.ml                                   |   3 +-
 src/name.ml                                   |   4 +-
 src/name.mli                                  |   4 +-
 src/predef.ml                                 |  23 +-
 src/predefEvalType.ml                         |  63 +-
 src/predefEvalType.mli                        |   2 +-
 src/split.ml                                  |  11 +-
 src/symbolTab.mli                             |   8 +-
 src/syntaxTab.ml                              |  16 +-
 .../call => should_fail/type}/bad_call03.lus  |   0
 src/test/test.res.exp                         | 766 ++++++++----------
 src/unifyType.ml                              |  15 +-
 23 files changed, 805 insertions(+), 818 deletions(-)
 rename src/test/{should_work/call => should_fail/type}/bad_call03.lus (100%)

diff --git a/src/Makefile b/src/Makefile
index 4d09d803..c5897b46 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -2,7 +2,7 @@
 OCAMLMAKEFILE = ./OCamlMakefile
 RESULT=lus2lic
 
-LIBS = str 
+LIBS = str
 OCAMLC=ocamlc
 
 ifndef SOURCES
diff --git a/src/TODO b/src/TODO
index 2f80c97b..460f95f8 100644
--- a/src/TODO
+++ b/src/TODO
@@ -29,12 +29,6 @@ package param
 
 En fait, je trouve le terme de "model" tres surchargé.
 
-
-
-* j'ai  defini  ">"  et  consort  comme  étant  polymorphes  (et  pas
-seulement  surchargées),   parce  que  c'est  facile   en  caml  (via
-Pervasive.compare). Mais est-ce une bonne idée ?
-
 * slice_info_eff width = size ? Le commentaire dit 
  	S[i] = A[first + i*step] pour i = 0 .. width
 mais j'ai l'impression que ce devrait etre 
@@ -49,11 +43,12 @@ le a  et le b. Mais j'ai  l'impression que ca revient  au meme. Ai-je
 raté un truc ? -> cf predefEvalConst.ml
 
 * Evaluer  statiquement  les  iterateurs  quand  c'est  possible  (cf
-  evalConst.ml) ?
+  evalConst.ml) ? pour aller au bout de la logique, oui...
 
 * rajouter  la notion  de  variables polymorphes  et sur-chargées  au
   niveau noeud utilisateur  ? Ce devrait etre peanuts  maintenant que
-  je les ai en interne... (pour une variable par noeud du moins).
+  je les ai en interne... (pour une variable par noeud du moins, sinon ca
+  va foutre le souc).
 
 * autoriser les  alias sur  "nor" et "#"  ? (ca compliquerait  les choses
   pour bien peu...).
@@ -102,6 +97,11 @@ Mais du coup de travail de JB part 
 * Faire qque chose pour les 2 verrues dans predefSemantics
   pas facile...
    
+* bug:   res = map<< Lustre::ilt,  10>>(t1, t2); 
+ne marche pas en mode --inline-iterators
+-> "*** Could not find package Lustre in the package table"
+
+
 o Lazycompiler.solve_x_idref 
 
  Comment  se faisse  que  je n'ai  pas  besoin de  me  servir de  cet
@@ -118,7 +118,7 @@ lazycompiler.ml:
   Simplify  a  little  bit  a  couple  of  functions  (avoiding  code
   duplication basically). 
 
-* mettre pre, current, when, etc. dans predef ?
+* flies fucking: mettre pre, current, when, etc. dans predef ?
 
 * Ident.idref : a remettre dans SyntaxTree ? en tout cas, je devrais
 m'en etre completement debarassé au niveau du compiledData, et ca
@@ -145,26 +145,16 @@ n'est pas le cas pour l'instant... cf  [solve_ident]
       
 * rajouter "mirror"?
 
-* l'unesting des iterateurs devrait etre fait dans split, et pas dans 
-LicDump. D'abord par soucis d'élégance. Mais aussi parce que sinon,
-ca rend complement impossible l'inlining de ces itérateurs imbriqués.
-
-En plus, finalement, ca n'a pas l'air si dur: il suffit d'étendre le type
-split_acc pour y rajouter une liste de definitions de noeud, qui contiendrait
-des definitions d'alias. ces noueds peuvent etre contruit en mimiquant
-LicDump.dump_node_alias.
-
 
 *** facile
 ----------
 
 * utiliser des Map.t dans Unify (et peut-etre ailleurs)
 
-
 * verifier que chacun des exemples du repertoire "should_fail" échoue
 avec un bon message d'erreur. 
 
-A ce propose, pourquoi 
+A ce propos, pourquoi 
      should_fail/semantics/activation1.lus
      should_fail/semantics/activation2.lus
 sont-ils sensés échouer ?
@@ -268,7 +258,7 @@ du code mort ou bien des tests 
 
 * le merge
 
-* dependance checking (lic2loc le fait ; faut-il le faire en amont ? )
+* dependance checking (lic2loc le fait ; faut-il le refaire ici ? )
 ex : 
   a=b;
   b=a;
@@ -325,7 +315,7 @@ qu : 
 
 
 o inconvénients
- - va y avoir beaucoup de loc qui ne feront rien dans cette fonction...
+ - va y avoir beaucoup de lignes de code qui ne feront rien dans cette fonction...
  - pas mal d'effort pour obtenir grosso-merdo le même code rangé autrement
 
 o  avantages
diff --git a/src/eff.ml b/src/eff.ml
index 0366fde6..e87c16ce 100644
--- a/src/eff.ml
+++ b/src/eff.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 26/11/2008 (at 15:56) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:31) by Erwan Jahier> *)
 
 (** 
 
@@ -279,6 +279,7 @@ and node_exp = {
   def_eff      : node_def;
   has_mem_eff  : bool;
   is_safe_eff  : bool;
+  is_polym_eff : bool 
 }
 
 and node_def =
@@ -297,9 +298,9 @@ 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 * node_exp)
-
+  | NodeStaticArgEff  of (Ident.t * sarg_node_eff)
 
+and sarg_node_eff = item_key * var_info list * var_info list
         
 (****************************************************************************)
 (** Type check_flag
@@ -362,7 +363,7 @@ type local_env = {
 (*   lenv_globals : pack_env ; *)
   lenv_types : (Ident.t, type_) Hashtbl.t ;
   lenv_const : (Ident.t, const) Hashtbl.t ; 
-  lenv_nodes : (Ident.t, node_exp) Hashtbl.t ; 
+  lenv_nodes : (Ident.t, sarg_node_eff) Hashtbl.t ; 
 
   lenv_vars  : (Ident.t, var_info) Hashtbl.t ; 
 }
@@ -372,8 +373,8 @@ let (lookup_type: local_env -> Ident.idref -> Lxm.t -> type_) =
   fun env id lxm -> 
     Hashtbl.find env.lenv_types (Ident.name_of_idref id)
 
-let (lookup_node: local_env -> Ident.idref -> static_arg list -> Lxm.t -> 
-      node_exp) = 
+let (lookup_node: 
+       local_env -> Ident.idref -> static_arg list -> Lxm.t -> sarg_node_eff) = 
   fun env id sargs lmx -> Hashtbl.find env.lenv_nodes (Ident.name_of_idref id)
     
 let (lookup_const: local_env -> Ident.idref -> Lxm.t -> const) = 
@@ -450,6 +451,19 @@ let rec (subst_type : type_ -> type_ -> type_) =
     | Any 
     | Overload -> t
 
+let rec (is_polymorphic : type_ -> bool) =
+  fun t -> match t with
+    | Bool_type_eff
+    | Int_type_eff 
+    | Real_type_eff
+    | External_type_eff _
+    | Enum_type_eff(_)  -> false
+    | Any 
+    | Overload -> true
+    | Array_type_eff(teff_ext,i) -> is_polymorphic teff_ext
+    | Struct_type_eff(l, fl) -> 
+        List.exists (fun (_,(teff,_)) -> is_polymorphic teff) fl
+
 
 let (type_of_const: const -> type_) =
   function
diff --git a/src/evalConst.ml b/src/evalConst.ml
index d45b9979..a6bc37f2 100644
--- a/src/evalConst.ml
+++ b/src/evalConst.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 25/11/2008 (at 14:38) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 16:17) by Erwan Jahier> *)
 
 
 open Printf 
@@ -76,8 +76,8 @@ let (make_array_const : Eff.const list list -> Eff.const) =
                     if (t = xtyp) then x else 
                       raise (EvalConst_error(
                                "type error in array, "^
-                                 (LicDump.string_of_type_eff xtyp)^
-                                 " mixed with " ^ LicDump.string_of_type_eff t
+                                 (LicDump.string_of_type_eff4msg xtyp)^
+                                 " mixed with " ^ LicDump.string_of_type_eff4msg t
                              ))
                   )
           )
@@ -117,8 +117,8 @@ let make_struct_const
                                     sprintf
                                       "\n*** type error in struct %s, %s instead of %s"
                                       (Ident.string_of_long tnm)
-                                      (LicDump.string_of_type_eff vt)
-                                      (LicDump.string_of_type_eff ft) 
+                                      (LicDump.string_of_type_eff4msg vt)
+                                      (LicDump.string_of_type_eff4msg ft) 
                                   )) 
                   )
             ) with Not_found -> (
@@ -142,7 +142,7 @@ let make_struct_const
                         sprintf
                           "\n*** %s is not a field of struct %s" 
                           (Ident.to_string id) 
-                          (LicDump.string_of_type_eff(teff))
+                          (LicDump.string_of_type_eff4msg(teff))
                       )) 
           in 
             Hashtbl.iter raise_error arg_tab ;
@@ -152,7 +152,7 @@ let make_struct_const
       | _ -> raise (EvalConst_error(
                           sprintf
                             "struct type expected instead of %s" 
-                            (LicDump.string_of_type_eff teff)
+                            (LicDump.string_of_type_eff4msg teff)
                         ))
   )
 
@@ -256,8 +256,8 @@ let rec f
                             raise(EvalConst_error(
                                     sprintf 
                                       "\n*** type combination error, can't concat %s with %s"
-                                      (LicDump.string_of_type_eff(t0)) 
-                                      (LicDump.string_of_type_eff(t1)) 
+                                      (LicDump.string_of_type_eff4msg(t0)) 
+                                      (LicDump.string_of_type_eff4msg(t1)) 
                                   ))
                         )
                       | [_;_] -> 
@@ -308,7 +308,7 @@ let rec f
                              raise (EvalConst_error
                                       (Printf.sprintf "%s is not a field of struct %s" 
                                          (Ident.to_string fid) 
-                                         (LicDump.string_of_type_eff(typ))))
+                                         (LicDump.string_of_type_eff4msg(typ))))
                          )
                        | [x] -> type_error_const [x] "struct type"
                        | x -> arity_error_const x "1"
@@ -413,7 +413,7 @@ and (eval_array_size: Eff.id_solver -> val_exp -> int) =
             raise(EvalArray_error(sprintf "bad array size %d" sz))
       | [x] -> 
           raise(EvalArray_error(sprintf  "bad array size, int expected but get %s"
-                        (LicDump.string_of_type_eff(Eff.type_of_const x)))) 
+                        (LicDump.string_of_type_eff4msg(Eff.type_of_const x)))) 
       | _ -> 
           raise(EvalArray_error(sprintf "bad array size, int expected, not a tuple"))
             
@@ -448,7 +448,7 @@ and eval_array_index
         | [Extern_const_eff(_,_, Some x)] 
         | [x] -> raise(EvalArray_error(sprintf 
                         "bad array index, int expected but get %s"
-                        (LicDump.string_of_type_eff(Eff.type_of_const x)))
+                        (LicDump.string_of_type_eff4msg(Eff.type_of_const x)))
                       ) 
         | _ -> raise(EvalArray_error(
                        sprintf "bad array index, int expected but get a tuple"))
@@ -491,7 +491,7 @@ and eval_array_slice (env : Eff.id_solver) (sl : slice_info) (sz : int) (lxm : L
               | [Int_const_eff s] ->  s (* ok *)                    
               | [x] -> raise(EvalArray_error(
                       sprintf  "bad array step, int expected but get %s"
-                        (LicDump.string_of_type_eff (Eff.type_of_const x)))) 
+                        (LicDump.string_of_type_eff4msg (Eff.type_of_const x)))) 
               | _ -> raise(EvalArray_error(
                              sprintf "bad array step, int expected but get a tuple"))
           )
diff --git a/src/evalType.ml b/src/evalType.ml
index ff67f94a..ef7253f2 100644
--- a/src/evalType.ml
+++ b/src/evalType.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 25/11/2008 (at 09:38) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 11:50) by Erwan Jahier> *)
  
   
 open Predef
@@ -72,20 +72,6 @@ and (eval_by_pos_type :
       | Eff.Predef (op,sargs) -> (
           let targs = List.map (f id_solver) args in
           let res = PredefEvalType.f op lxm sargs targs in
-            (* Handling iterator calls: cf comments in LucDump.mli *)
-               (match LicDump.poly_op_find lxm with 
-                  | Some (LicDump.OpProfile(op_lti, op_lto)) -> 
-                      (* Retrieve the substitution *)
-                      let targs = List.flatten targs in
-                        (match UnifyType.f (targs@res) (op_lti@op_lto) with
-                          | UnifyType.Unif t ->
-                              LicDump.tabulate_poly_op lxm (LicDump.Subst(t))
-                          | UnifyType.Equal -> ()
-                          | UnifyType.Ko _ -> assert false
-                        )
-                  | None -> ()
-                  | _ -> assert false 
-               );
             res
         )
       | Eff.CALL node_exp_eff -> 
@@ -138,7 +124,7 @@ and (eval_by_pos_type :
                     raise (EvalType_error
                              (Printf.sprintf "%s is not a field of struct %s" 
                                 (Ident.to_string fid) 
-                                (LicDump.string_of_type_eff(List.hd type_args_eff))))
+                                (LicDump.string_of_type_eff4msg(List.hd type_args_eff))))
                 )
               | [x] -> type_error [x] "struct type"
               | x -> arity_error x "1"
@@ -183,7 +169,7 @@ and (eval_by_pos_type :
                         | Eff.Enum_type_eff _ -> ()
 	                | teff  -> 
 		            let msg = "the type of a clock cannot be " ^
-                              (LicDump.string_of_type_eff teff) 
+                              (LicDump.string_of_type_eff4msg teff) 
 		            in
 		              raise(Compile_error(lxm,msg))
                      )
diff --git a/src/getEff.ml b/src/getEff.ml
index 00d94e4b..4ace0e71 100644
--- a/src/getEff.ml
+++ b/src/getEff.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 28/11/2008 (at 10:49) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 16:18) by Erwan Jahier> *)
 
 
 open Lxm
@@ -7,7 +7,7 @@ open SyntaxTree
 open SyntaxTreeCore
 open Eff
 open Errors
-
+open Ident
 
 (******************************************************************************)
 exception GetEffType_error of string
@@ -77,9 +77,9 @@ and (type_check_equation: Eff.id_solver -> Lxm.t -> Eff.left list ->
           (fun le re -> 
              if le <> re then
                let msg = "type mismatch: \n***\t'" 
-                 ^ (LicDump.string_of_type_eff le) ^ 
+                 ^ (LicDump.string_of_type_eff4msg le) ^ 
                  "' (left-hand-side) \n*** is not compatible with \n***\t'" 
-                 ^ (LicDump.string_of_type_eff re) ^ "' (right-hand-side)"
+                 ^ (LicDump.string_of_type_eff4msg re) ^ "' (right-hand-side)"
                in
                  raise (Compile_error(lxm, msg))
           )
@@ -166,7 +166,7 @@ and (check_static_arg : Eff.id_solver ->
     let check_type_arg type_eff type_exp =
       if not (eff_type_and_type_exp_are_equal type_eff type_exp.it) then 
         let msg = "Bad (static) type argument: '" ^ 
-          (LicDump.string_of_type_eff type_eff) ^ 
+          (LicDump.string_of_type_eff4msg type_eff) ^ 
           "' and '" ^ (string_of_type_exp type_exp) ^ "' differs."
         in
           raise (Compile_error(type_exp.src, msg))
@@ -189,7 +189,7 @@ and (check_static_arg : Eff.id_solver ->
           raise (Compile_error(sa.src, str ^ "wrong input type profile."))
         else if not (type_check_var_info_list neff.outlist_eff vio) then 
           raise (Compile_error(sa.src, str ^ "wrong output type profile.")) 
-        else ()
+        else (neff.inlist_eff, neff.outlist_eff)
     in
 
     let sa_eff =
@@ -204,14 +204,6 @@ and (check_static_arg : Eff.id_solver ->
             let teff = node_id_solver.id2type idref sa.src in
               TypeStaticArgEff (id, teff)
                 
-        | StaticArgIdent idref, StaticParamNode(id,_,_,_) ->
-            let sargs = [] in
-              (* We suppose that static arg cannot themselves be 
-                 template calls (eg, f<<g<<3>>>> is forbidden) 
-              *)
-            let neff = node_id_solver.id2node idref sargs sa.src in
-              NodeStaticArgEff (id, neff)
-
         | StaticArgConst ce, StaticParamConst(id, type_exp) -> (
             let ceff = EvalConst.f node_id_solver ce in
             let t_ceff = type_of_const (List.hd ceff) in
@@ -224,18 +216,28 @@ and (check_static_arg : Eff.id_solver ->
             let teff = typ node_id_solver te in
               TypeStaticArgEff (id, teff)
 
+	| StaticArgIdent idref, StaticParamNode(id, vii, vio,_) ->
+            (* idref is an alias, hence it cannot have static argument *)
+            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))
+
         | StaticArgNode(CALL_n ne), StaticParamNode(id,vii,vio,_) ->
             let neff = node node_id_solver ne in
-              check_node_arg neff vii vio;
-              NodeStaticArgEff (id, neff)
+            let (inlist, outlist) = check_node_arg neff vii vio in
+            let neff = fst neff.node_key_eff in
+              NodeStaticArgEff (id, (neff, inlist, outlist))
 
         | StaticArgNode(Predef_n (op,sargs)), StaticParamNode(id,vii,vio,_) ->
             let sargs_eff = 
               translate_predef_static_args node_id_solver sargs sa.src
             in
             let opeff = PredefEvalType.make_node_exp_eff None op sa.src sargs_eff in
-              check_node_arg opeff vii vio;
-              NodeStaticArgEff (id, opeff)
+            let (inlist, outlist) = check_node_arg opeff vii vio in
+            let opeff = fst opeff.node_key_eff in
+              NodeStaticArgEff (id, (opeff, inlist, outlist))
 
         | StaticArgNode(      
             (MERGE_n _|ARRAY_SLICE_n _|ARRAY_ACCES_n _|STRUCT_ACCESS_n _|IDENT_n _
@@ -325,20 +327,50 @@ and (translate_val_exp : Eff.id_solver -> SyntaxTreeCore.val_exp -> Eff.val_exp)
              List.map (translate_field id_solver) field_list))
             
       | CallByPos(by_pos_op, Oper vel) ->
-          let vel_eff = OperEff (List.map (translate_val_exp id_solver) vel) in
+          let vel_eff = List.map (translate_val_exp id_solver) vel in
           let lxm = by_pos_op.src in
           let by_pos_op = by_pos_op.it in
           let mk_by_pos_op by_pos_op_eff =
-            CallByPosEff(flagit by_pos_op_eff lxm, vel_eff)
+            CallByPosEff(flagit by_pos_op_eff lxm, OperEff vel_eff)
           in
             match by_pos_op with
                 (* put that in another module ? yes, see above.*)
-              | Predef_n(Map,  _)
-              | Predef_n(Fill, _)
-              | Predef_n(Red,  _)
-              | Predef_n(FillRed, _)
-              | Predef_n(BoolRed, _) -> 
-                  mk_by_pos_op (translate_iteror id_solver by_pos_op lxm)
+              | Predef_n(Map,  sargs)
+              | Predef_n(Fill, sargs)
+              | Predef_n(Red,  sargs)
+              | Predef_n(FillRed, sargs)
+              | Predef_n(BoolRed, sargs) -> 
+
+                  (* We will make use of [vel_eff] to resolve the polymorphism *)
+                  let type_l : Eff.type_ list = 
+                    List.flatten (List.map (EvalType.f id_solver) vel_eff) 
+                  in
+                  let sargs_eff = translate_predef_static_args id_solver sargs lxm in
+                  let iter_op = match by_pos_op with 
+                      Predef_n(op,_) -> op | _ -> assert false
+                  in
+                  let iter_profile = match by_pos_op with
+                    | Predef_n(Map,_) ->  
+                        PredefEvalType.map_profile lxm sargs_eff
+                    | Predef_n(Fill,_) | Predef_n(Red,_) | Predef_n(FillRed,_) ->
+                        PredefEvalType.fillred_profile lxm sargs_eff
+                    | Predef_n(BoolRed,_) ->   
+                        PredefEvalType.boolred_profile lxm sargs_eff
+                    | _  -> assert false
+                  in
+                  let type_l_exp = snd (List.split (fst iter_profile)) in
+                  let sargs_eff = 
+                    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
+                             that the type varaible was [typ]. 
+                          *)
+                          LicDump.unstack_polymorphic_nodes typ;
+			  List.map (instanciate_type typ) sargs_eff
+                      | UnifyType.Ko str -> raise (Compile_error(lxm,  str))
+                  in
+                    mk_by_pos_op (Eff.Predef(iter_op, sargs_eff))
 
               (* other predef operators *)
               | Predef_n(op, args) -> assert (args=[]); mk_by_pos_op(Predef (op,[]))
@@ -474,11 +506,12 @@ and get_const id_solver const_or_const_ident lxm =
     | StaticArgType _
     | StaticArgNode _ -> raise (Compile_error(lxm, "a constant was expected"))
 
+
+
 and get_node id_solver node_or_node_ident lxm =
   match node_or_node_ident with
     | StaticArgIdent(id) -> 
-        let sargs = [] in (* I should do something more clever here to support 
-                             imbricated use of iterators (e.g., "map<<map<<..." *)
+        let sargs = [] in (* it is an alias: no static arg *)
           id_solver.id2node id sargs lxm 
 
     | StaticArgNode(CALL_n ne) -> node id_solver ne
@@ -491,9 +524,81 @@ and get_node id_solver node_or_node_ident lxm =
     | StaticArgConst _ -> raise (Compile_error(lxm, "a node was expected"))
 
 
+and (instanciate_type: Eff.type_ -> Eff.static_arg -> Eff.static_arg) =
+  fun t sarg ->
+    let make_long pstr idstr = 
+      Ident.long_of_idref { id_pack = Some pstr ; id_id = idstr } 
+    in
+    let instanciate_var_info vi =
+      { vi with var_type_eff = Eff.subst_type t vi.var_type_eff }
+    in    
+      match sarg with
+	| ConstStaticArgEff _ -> sarg
+	| TypeStaticArgEff _ -> sarg (* we cannot denote polymorphic type... *)
+	| NodeStaticArgEff(id,(node,il,ol)) ->
+	    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
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "slash" } -> 
+		   let op = if t = Int_type_eff then "islash" else "rslash" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "plus" } -> 
+		   let op = if t = Int_type_eff then "iplus" else "rplus" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "minus" } -> 
+		   let op = if t = Int_type_eff then "iminus" else "rminus" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "uminus" } -> 
+		   let op = if t = Int_type_eff then "iuminus" else "ruminus" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "div" } -> 
+		   let op = if t = Int_type_eff then "div" else "rdiv" in
+		     make_long "Lustre" op
+
+		(* polymorphic op. what should be done for type different from
+		   int and real? 
+		*)
+
+	      |  { id_pack = Some "Lustre" ; id_id = "lt" } -> 
+		   let op = if t = Int_type_eff then "ilt" 
+		   else if t = Real_type_eff then "rlt" else "lt" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "gt" } -> 
+		   let op = if t = Int_type_eff then "igt" 
+		   else if t = Real_type_eff then "rgt" else "gt" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "lte" } -> 
+		   let op = if t = Int_type_eff then "ilte" 
+		   else if t = Real_type_eff then "rlte" else "lte" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "gte" } -> 
+		   let op = if t = Int_type_eff then "igte" 
+		   else if t = Real_type_eff then "rgte" else "gte" in
+		     make_long "Lustre" op
+
+	      |  { id_pack = Some "Lustre" ; id_id = "equal" } -> 
+		   let op = if t = Int_type_eff then "iequal" 
+		   else if t = Real_type_eff then "requal"
+		   else if t = Bool_type_eff then "bequal" else "equal" in
+		     make_long "Lustre" op
+	      |  { id_pack = Some "Lustre" ; id_id = "diff" } -> 
+		   let op = if t = Int_type_eff then "idiff" 
+		   else if t = Real_type_eff then "rdiff" 
+		   else if t = Bool_type_eff then "bdiff" else "diff" in
+		     make_long "Lustre" op
+
+	      | _ -> node
+	    in
+	    let il = List.map instanciate_var_info il 
+	    and ol = List.map instanciate_var_info ol 
+	    in
+	      NodeStaticArgEff(id,(node,il,ol))
+
 (* exported *)
 and (translate_predef_static_args: Eff.id_solver -> 
-      SyntaxTreeCore.static_arg srcflagged list -> Lxm.t -> Eff.static_arg list) =
+      SyntaxTreeCore.static_arg srcflagged list -> Lxm.t -> 
+      Eff.static_arg list) =
   fun id_solver sargs lxm -> 
     match sargs with
       | [] -> []
@@ -506,23 +611,65 @@ 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
-            [NodeStaticArgEff(Ident.of_string "node", node_eff);
+            (* 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;
+                    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 
+          in
+
+            [NodeStaticArgEff(Ident.of_string "node", node_arg);
              ConstStaticArgEff(Ident.of_string "size",get_const id_solver const lxm_c)]
       | _ ->  
           raise (Compile_error(lxm, "bad arguments number for array iterator"))
 
-
-and (translate_iteror: Eff.id_solver -> SyntaxTreeCore.by_pos_op -> Lxm.t -> 
-      Eff.by_pos_op) =
-  fun id_solver op lxm ->
-    match op with 
-      | Predef_n(iter_op, sargs) ->
-          Eff.Predef(iter_op, translate_predef_static_args id_solver sargs lxm)
-      | _ -> assert false
-
-
-
-          
+            
 and (translate_slice_info  : Eff.id_solver -> SyntaxTreeCore.slice_info -> int -> 
       Lxm.t -> Eff.slice_info) =
   fun id_solver si size lxm ->
@@ -541,7 +688,7 @@ let (assertion : Eff.id_solver -> SyntaxTreeCore.val_exp Lxm.srcflagged ->
         (fun ve -> 
            if ve <> Bool_type_eff then
              let msg = "type mismatch: \n\tthe content of the assertion is of type " 
-               ^ (LicDump.string_of_type_eff ve) 
+               ^ (LicDump.string_of_type_eff4msg ve) 
                ^ " whereas it shoud be a Boolean\n"
              in
                raise (Compile_error(vef.src, msg))
diff --git a/src/getEff.mli b/src/getEff.mli
index 76cd8c79..d6541164 100644
--- a/src/getEff.mli
+++ b/src/getEff.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 11/09/2008 (at 16:17) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 14:50) by Erwan Jahier> *)
 
 
 (** This module defines functions that translate SyntaxTreeCore datatypes into
diff --git a/src/inline.ml b/src/inline.ml
index e6761c12..c22be396 100644
--- a/src/inline.ml
+++ b/src/inline.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 28/11/2008 (at 15:51) by Erwan Jahier> *)
+(** Time-stamp: <modified the 09/12/2008 (at 14:05) by Erwan Jahier> *)
 
 
 open Lxm
@@ -86,13 +86,14 @@ 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,c) = match sargs with
+            let ((node,inlist,outlist),c) = match sargs with
               | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(_,node)]
               | [NodeStaticArgEff(_,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
                   node, c
               | _  -> assert false (* todo: issue an error *)
             in
-            let node = { it = node ; src = lxm_ve } 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 -> 
@@ -137,13 +138,14 @@ 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
+            let ((node,_,_),c) = match sargs with
               | [ConstStaticArgEff(_,Int_const_eff(c)) ; NodeStaticArgEff(_,node)]
               | [NodeStaticArgEff(_,node) ; ConstStaticArgEff(_,Int_const_eff(c))] -> 
                   node, c
               | _  -> assert false (* todo: issue an error *)
             in
-            let node = { it = node ; src = lxm_ve } 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 *)
             let acc_out = List.hd lhs in
diff --git a/src/lazyCompiler.ml b/src/lazyCompiler.ml
index 6874a8e8..dd4526ae 100644
--- a/src/lazyCompiler.ml
+++ b/src/lazyCompiler.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 25/11/2008 (at 16:26) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:30) by Erwan Jahier> *)
 
 
 open Lxm
@@ -48,17 +48,25 @@ type t = {
 
 let (create : SyntaxTab.t -> t) =
 fun tbl -> 
-  {
-    src_tab = tbl;
-    types = Hashtbl.create 0;
-    consts =  Hashtbl.create 0;
-    nodes  = Hashtbl.create 0;
-    prov_types = Hashtbl.create 0;
-    prov_consts =  Hashtbl.create 0;
-    prov_nodes  = Hashtbl.create 0;
-
-(* XXX il manque aussi une table pour les clocks !!! *)
-
+  let nodes_tbl =   Hashtbl.create 0 in
+  let prov_nodes_tbl =   Hashtbl.create 0 in
+    List.iter
+      (fun op -> 
+         let op_str = Predef.op2string op in
+         let op_eff = PredefEvalType.make_node_exp_eff None op (Lxm.dummy op_str) [] in
+         let op_key = Predef.op_to_long op, [] in
+           Hashtbl.add nodes_tbl op_key (Eff.Checked op_eff);
+           Hashtbl.add prov_nodes_tbl op_key (Eff.Checked op_eff)
+      )
+      Predef.iterable_op;
+    {
+      src_tab = tbl;
+      types = Hashtbl.create 0;
+      consts =  Hashtbl.create 0;
+      nodes  = nodes_tbl;
+      prov_types = Hashtbl.create 0;
+      prov_consts =  Hashtbl.create 0;
+      prov_nodes  = prov_nodes_tbl;
   } 
 
 (******************************************************************************)
@@ -304,9 +312,9 @@ and (type_check_interface_do: t -> Ident.long -> Lxm.t -> SymbolTab.t ->
         raise(Compile_error (
                 type_def.src,
                 ("provided type \n\t" ^ 
-                   (LicDump.string_of_type_eff prov_type_eff) ^
+                   (LicDump.string_of_type_eff4msg prov_type_eff) ^
                    "\n is not compatible with its implementation \n\t" ^ 
-                   (LicDump.string_of_type_eff body_type_eff))))
+                   (LicDump.string_of_type_eff4msg body_type_eff))))
 
 
 and (const_check_interface_do: t -> Ident.long -> Lxm.t -> SymbolTab.t -> 
@@ -328,9 +336,9 @@ and (const_check_interface_do: t -> Ident.long -> Lxm.t -> SymbolTab.t ->
               raise(Compile_error (
                       const_def.src,
                       ("provided constant type \n***\t" ^ 
-                         (LicDump.string_of_type_eff teff_prov)  ^ 
+                         (LicDump.string_of_type_eff4msg teff_prov)  ^ 
                          "   is not compatible with its implementation \n***\t" ^ 
-                         (LicDump.string_of_type_eff teff_body) ^ "")
+                         (LicDump.string_of_type_eff4msg teff_body) ^ "")
                       ))
         | Eff.Enum_const_eff (_, _)
         | Eff.Bool_const_eff _
@@ -386,8 +394,8 @@ and (type_check_do: t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool ->
                                     raise 
                                       (Compile_error(field_def.src, Printf.sprintf
                                                        " this field is declared as '%s' but evaluated as '%s'"
-                                                       (LicDump.string_of_type_eff teff)
-                                                       (LicDump.string_of_type_eff tv)))
+                                                       (LicDump.string_of_type_eff4msg teff)
+                                                       (LicDump.string_of_type_eff4msg tv)))
                               )
                             | [] -> assert false (* should not occur *)
                             | _::_ -> 
@@ -456,8 +464,8 @@ and (const_check_do : t -> Ident.long -> Lxm.t -> SymbolTab.t -> bool ->
                               raise 
                                 (Compile_error (const_def.src, Printf.sprintf
                                 " this constant is declared as '%s' but evaluated as '%s'"
-                                (LicDump.string_of_type_eff tdecl)
-                                (LicDump.string_of_type_eff teff)
+                                (LicDump.string_of_type_eff4msg tdecl)
+                                (LicDump.string_of_type_eff4msg teff)
                                                )))
                   )
                 | [] -> assert false (* should not occur *)
@@ -563,18 +571,26 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
       id2const =
         (fun id lxm ->
            try lookup_const local_env id lxm
-           with Not_found -> 
+           with Not_found ->
              solve_const_idref this symbols provide_flag pack_name id lxm);
       id2type  =
         (fun id lxm ->
            try lookup_type local_env id lxm
-           with Not_found -> 
+           with Not_found ->
              solve_type_idref  this symbols provide_flag pack_name id lxm);
       id2node  =
         (fun id sargs lxm ->
-           try lookup_node local_env  id sargs lxm
-           with Not_found -> 
-             solve_node_idref this symbols provide_flag pack_name id sargs lxm);
+           (try
+             let node_id, inlist, outlist = lookup_node local_env  id sargs lxm in
+               node_check this (node_id,[]) lxm  
+                 (* XXX *)
+
+            with 
+                Not_found -> 
+                  solve_node_idref this symbols provide_flag pack_name id sargs lxm
+              | _ -> assert false)
+        );
+
       symbols  = symbols;
     }
     in
@@ -589,9 +605,13 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
       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
             let type_args id =
               let vi = find_var_info lxm vars id in
               let t_eff = GetEff.typ node_id_solver vi.it.var_type in
+              let _ = 
+                if Eff.is_polymorphic t_eff then is_polymorphic := true 
+              in
               let c_eff = GetEff.clock node_id_solver vi.it in
               let vi_eff = {
                 var_name_eff   = vi.it.var_name;
@@ -674,17 +694,18 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
                 def_eff = node_def_eff ();
                 has_mem_eff  = node_def.it.has_mem;
                 is_safe_eff  = node_def.it.is_safe;
+                is_polym_eff = !is_polymorphic
               }
     in
     let (make_alias_node : Eff.node_exp -> Eff.node_exp) =
       fun aliased_node -> 
         (* builds a  node that calls the aliased node. It looks like:
-           node alias_node( ins ) returns ( outs );
-           let
-           outs = aliased_node(ins);
-           tel
+             node alias_node( ins ) returns ( outs );
+             let
+               outs = aliased_node(ins);
+             tel
         *)
-        let (outs:Eff.left list) = 
+        let (outs:Eff.left list) =
           List.map  (fun vi -> LeftVarEff (vi, lxm)) aliased_node.outlist_eff
         and (aliased_node_call : Eff.val_exp) =
           CallByPosEff(
@@ -748,11 +769,14 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
 
                 | Predef_n(predef_op, sargs) -> 
                     let sargs_eff = 
-                      GetEff.translate_predef_static_args node_id_solver sargs lxm 
+                      GetEff.translate_predef_static_args node_id_solver sargs lxm
                     in
+                    let predef_op_eff =
                       PredefEvalType.make_node_exp_eff 
                         (Some node_def.it.has_mem) predef_op lxm sargs_eff 
-                        
+                    in
+                      predef_op_eff
+
                 | CALL_n(node_alias) -> 
                     GetEff.node node_id_solver node_alias 
                 | (MERGE_n _|ARRAY_SLICE_n _|ARRAY_ACCES_n _|STRUCT_ACCESS_n _
@@ -762,7 +786,7 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
                     raise (Compile_error (lxm, "can not alias this operator, sorry"))
                       (* does it make sense to alias when, pre, etc? *)
           in
-          let alias_node = make_alias_node aliased_node in
+          let (alias_node : Eff.node_exp) = make_alias_node aliased_node in
             (* Check that the declared profile (if any) matches with the alias *)
             match node_def.it.vars with
               | None -> alias_node
@@ -792,14 +816,16 @@ and (node_check_do: t -> Eff.node_key -> Lxm.t -> SymbolTab.t ->
     in
       if not provide_flag then 
         (
-          let str = LicDump.node_of_node_exp_eff res in
-            output_string !Global.oc str
+          if res.is_polym_eff then
+            LicDump.push_on_polymorphic_node_stack res
+          else
+            let str = LicDump.node_of_node_exp_eff res in
+              output_string !Global.oc str
         );
       UniqueOutput.check res node_def.src;
       res
 
 
-
 (** builds a [node_key] and calls [node_check] *)
 and (solve_node_idref : t -> SymbolTab.t -> bool -> Ident.pack_name -> Ident.idref ->
       Eff.static_arg list -> Lxm.t -> Eff.node_exp) =
@@ -852,7 +878,7 @@ let compile_all_item this label  x_check_interface string_of_x_key
 
 let compile_all_types pack_name this =
   compile_all_item this "type" type_check_interface Ident.string_of_long 
-    LicDump.string_of_type_eff (fun id -> Ident.make_long pack_name id)
+    LicDump.string_of_type_eff4msg (fun id -> Ident.make_long pack_name id)
 
 let compile_all_constants pack_name this = 
   compile_all_item this "const" const_check_interface  Ident.string_of_long
diff --git a/src/licDump.ml b/src/licDump.ml
index 2627c469..9c23811a 100644
--- a/src/licDump.ml
+++ b/src/licDump.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 01/12/2008 (at 15:47) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:30) by Erwan Jahier> *)
 
 open Printf
 open Lxm
@@ -12,58 +12,12 @@ let (long : Ident.long -> string) = Ident.string_of_long
 let type_alias_table = Hashtbl.create 0
 
 (******************************************************************************)    
-(* exported *)
-type tab_elt = 
-  | OpProfile of Eff.type_ list * Eff.type_ list
-  | Subst of Eff.type_
-
-let (polymorph_op_tab: (Lxm.t, tab_elt) Hashtbl.t) = Hashtbl.create 0
 
-let (tabulate_poly_op : Lxm.t -> tab_elt -> unit) =
-  fun key value -> Hashtbl.replace polymorph_op_tab key value
-
-let (poly_op_mem : Lxm.t -> bool) =
- fun key -> Hashtbl.mem polymorph_op_tab key 
-    
-let (poly_op_find :  Lxm.t -> tab_elt option) =
-  fun x -> 
-    try Some (Hashtbl.find polymorph_op_tab x)
-    with _ -> None
-
-let last_poly_var = ref Int_type_eff
+(* To deal with polymorphism: raised when a polymorphic expr is generated. *)
+exception Polymorphic
+let (poly_var : (unit -> Eff.type_) ref) = ref (fun () -> raise Polymorphic)
 
 (******************************************************************************)    
-(** Un-nesting iterator calls. 
-
-    The idea is the following: each time a nested iterator call
-    (map<<map<<n,3>>,4>>) is encountered, we create a fresh alias
-    name (create_alias_name) ad we add it in the node_alias_tbl.  At
-    the end of the compilation, LicDump.dump_node_alias is called,
-    which prints the definition of those node aliases.
-
-    For example, the expression  "map<<map<<n,3>>,4>>" is printed like this:
-    
-    "map<<_node_alias1, 4>>"
-
-    and later, the node alias is defined:
-
-        node _node_alias1(x:int) returns(y:int); let y = map<<n,3>>(x); tel;
-*)
-
-(* This table associates to node its definition plus a flag indicating if that
-   node has been generated. *)
-
-type node_profile = Eff.type_ list * Eff.type_ list
-let (node_alias_tbl : (string, Eff.node_exp * tab_elt option * bool) Hashtbl.t) = 
-  Hashtbl.create 0
-let alias_fresh_var_cpt = ref 0
-let create_alias_name long =
-  incr alias_fresh_var_cpt;
-  ("_node_alias_" ^ (string_of_int !alias_fresh_var_cpt) 
-   ^ "_" ^ (Ident.string_of_long long))
-
-
-
 let  (get_rank : 'a -> 'a list -> int) =
   fun x l -> 
     let rec aux i l =
@@ -154,6 +108,7 @@ and string_def_of_type_eff = function
 
 
 (* exported *)
+
 and string_of_type_eff = function
   | Bool_type_eff -> "bool"
   | Int_type_eff  -> "int"
@@ -162,8 +117,20 @@ and string_of_type_eff = function
   | Enum_type_eff (name, _) -> prefix ^ (long name)
   | Array_type_eff (ty, sz) -> array_alias ty sz
   | Struct_type_eff (name, _) -> prefix ^ (long name)
-  | Any -> "a"
-  | Overload -> "o"
+  | Any -> string_of_type_eff (!poly_var ())
+  | Overload -> string_of_type_eff (!poly_var ())
+
+
+and string_of_type_eff4msg = function
+  | Bool_type_eff -> "bool"
+  | Int_type_eff  -> "int"
+  | Real_type_eff -> "real"
+  | External_type_eff name -> prefix ^ (long name)
+  | Enum_type_eff (name, _) -> prefix ^ (long name)
+  | Array_type_eff (ty, sz) -> (string_of_type_eff4msg ty) ^ "^" ^(string_of_int sz)
+  | Struct_type_eff (name, _) -> prefix ^ (long name)
+  | Any -> "'a"
+  | Overload -> "'o"
 
 
 (******************************************************************************)
@@ -202,62 +169,17 @@ and dump_type_alias oc =
     if Hashtbl.length type_alias_table > 0 then p "-- automatically defined aliases:";
     Hashtbl.iter
       (fun type_eff alias_name -> 
-         p ("\ntype " ^ alias_name ^ " = "  ^ (string_def_of_type_eff type_eff)^";")
+         try
+           p ("\ntype " ^ alias_name ^ " = "  ^ (string_def_of_type_eff type_eff)^";")
+         with Polymorphic -> ()
       )
       type_alias_table
       
 (******************************************************************************) 
-
-(* exported *)
-and (dump_node_alias : out_channel -> unit) =
-  fun oc -> 
-    let p = output_string oc in
-    let finished = ref true in
-    let f alias (node, np, dumped) =
-      let _ = 
-        match np with
-          | Some(Subst(t)) -> last_poly_var := t
-          | Some(OpProfile(_)) | None -> ()
-      in
-      let get_name_and_type_string var =
-        let t = subst_type !last_poly_var var.var_type_eff in
-          (Ident.to_string var.var_name_eff) ^ ":" ^ (string_of_type_eff t)
-      in
-      let inlist  = List.map get_name_and_type_string node.inlist_eff
-      and outlist = List.map get_name_and_type_string node.outlist_eff
-      in
-      let profile = ("("^(String.concat "; " inlist)^") returns ("^
-                       (String.concat "; " outlist)^");\n")
-      in
-      let lxm = Lxm.dummy "" in
-        if not dumped then (
-          finished := false;
-          p "node ";
-          p alias;
-          (*         p (profile_of_node_exp_eff node); *)
-          p profile;
-          p "let\n  ";
-          p (Ident.to_string (List.hd node.outlist_eff).var_name_eff);
-          p " = ";
-          p (string_of_node_key_iter lxm node.node_key_eff);
-          p "(";
-          p (String.concat "," 
-               (List.map (fun v -> Ident.to_string v.var_name_eff) node.inlist_eff));
-          p ")";
-          p ";\ntel\n";
-          Hashtbl.replace node_alias_tbl alias (node, np, true)
-        )
-    in
-      p "\n";
-      Hashtbl.iter f node_alias_tbl;
-      if not !finished then dump_node_alias oc
-
-(******************************************************************************)    
-
 (* exported  *)
 and (type_eff_list_to_string : Eff.type_ list -> string) =
   fun tel -> 
-    let str_l = List.map string_of_type_eff tel in
+    let str_l = List.map string_of_type_eff4msg tel in
       String.concat "*" str_l    
 
 and string_of_type_eff_list = function
@@ -265,14 +187,13 @@ and string_of_type_eff_list = function
   | [x] -> string_of_type_eff x
   | l   -> String.concat " * " (List.map string_of_type_eff l)
 
-
       
 (* for printing recursive node *)
 and string_of_node_key_rec (nkey: node_key) = 
   match nkey with
     | (ik, []) -> long ik
     | (ik, salst) ->
-	let astrings = List.map static_arg2string_rec salst in
+        let astrings = List.map static_arg2string salst in
 	let name = sprintf "%s_%s" (long ik) (String.concat "_" astrings) in
           Name.node_key nkey name
 
@@ -281,37 +202,16 @@ and string_of_node_key_iter lxm (nkey: node_key) =
   match nkey with
     | (ik, []) -> long ik
     | (ik, salst) ->
-	let astrings = List.map (static_arg2string (Some lxm)) salst in
+	let astrings = List.map (static_arg2string) salst in
 	  sprintf "%s<<%s>>" (long ik) (String.concat ", " astrings)
 
-(* for printing recursive node *)
-and static_arg2string_rec (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, opeff) ->
-	sprintf "%s" (string_of_node_key_rec opeff.node_key_eff)
-
-(* for printing iterators *)
-and static_arg2string lxm_opt (sa : Eff.static_arg) =
+(* for printing recursive node and iterators *)
+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, opeff) ->
-        if 
-          (snd opeff.node_key_eff) = []
-        then 
-	  let lxm = Lxm.dummy "" in
-            sprintf "%s" (string_of_node_key_iter lxm opeff.node_key_eff)
-        else
-          let np = 
-            match lxm_opt with
-              | None -> None
-              | Some lxm -> poly_op_find lxm
-          in
-          let alias = create_alias_name (fst opeff.node_key_eff) in
-            Hashtbl.add node_alias_tbl alias (opeff, np, false);
-            sprintf "%s" alias
+    | NodeStaticArgEff  (id, (long, _, _)) ->
+	sprintf "%s" (Ident.string_of_long long)
 
 and (string_of_var_info_eff: Eff.var_info -> string) =
   fun x -> 
@@ -331,8 +231,6 @@ and (string_of_type_decl_list : Eff.var_info list -> string -> string) =
     let str = String.concat sep (List.map string_of_decl tel) in
       str
 
-
-
 and string_of_slice_info_eff si_eff =
   "[" ^ (string_of_int si_eff.se_first) ^ " .. " ^ (string_of_int si_eff.se_last) ^
     (if si_eff.se_step = 1 then "" else " step " ^ (string_of_int si_eff.se_step)) ^
@@ -352,8 +250,6 @@ and (string_of_leff_list : Eff.left list -> string) =
       (if List.length l = 1 then "" else ")") 
 
 
-
-
 and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> string) =
   fun posop vel -> 
     let tuple vel = (String.concat ", " (List.map string_of_val_exp_eff vel)) in
@@ -361,7 +257,6 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
     let tuple_square vel = 
       "[" ^ (String.concat ", " (List.map string_of_val_exp_eff vel)) ^ "]"
     in
-    let lxm = posop.src in
     let str = 
       match posop.it,vel with
 	| Predef (Predef.IF_n,_), [ve1; ve2; ve3] ->
@@ -373,12 +268,12 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
 	      if Predef.is_infix op then (
 	        match vel with 
 		  | [ve1; ve2] -> 
-		      (string_of_val_exp_eff ve1) ^ " " ^ (Predef.op2string op) ^ 
+		      (string_of_val_exp_eff ve1) ^ " " ^ (op2string op) ^ 
 		        " " ^ (string_of_val_exp_eff ve2)
 		  | _ -> assert false
 	      ) 
 	      else 
-	        ((Predef.op2string op) ^
+	        ((op2string op) ^
 		   (if sargs = [] then 
                       match op with
                         | Predef.ICONST_n _ | Predef.RCONST_n _   | Predef.NOT_n
@@ -387,7 +282,7 @@ and (string_of_by_pos_op_eff: Eff.by_pos_op srcflagged -> Eff.val_exp list -> st
                         | _ -> tuple_par vel 
                     else 
                    "<<" ^ 
-                   (String.concat ", " (List.map (static_arg2string (Some lxm)) sargs))
+                   (String.concat ", " (List.map (static_arg2string) sargs))
 		   ^ ">>" ^ (tuple_par vel)))
 
 	| CALL nee, _  -> (
@@ -640,6 +535,23 @@ and string_of_clock (ck : Eff.clock) =
     | ClockVar _ ->  assert false
         (*     | ClockVar i -> "_clock_var_" ^ (string_of_int i) *)
 
+and op2string = Predef.op2string
+
+(******************************************************************************)
+let polymorphic_node_stack : Eff.node_exp Stack.t = Stack.create ()
+
+let (push_on_polymorphic_node_stack : Eff.node_exp -> unit) =
+  fun n -> 
+    Stack.push n polymorphic_node_stack 
+
+let (unstack_polymorphic_nodes : Eff.type_ -> unit) =
+ fun t -> 
+   poly_var := (fun () -> t);
+   while (not (Stack.is_empty polymorphic_node_stack)) do
+     let str = node_of_node_exp_eff (Stack.pop polymorphic_node_stack) in
+       output_string !Global.oc str;
+   done;
+   poly_var := (fun () -> raise Polymorphic)
 
 
 (*---------------------------------------------------------------------
diff --git a/src/licDump.mli b/src/licDump.mli
index 95e496c7..fe765faf 100644
--- a/src/licDump.mli
+++ b/src/licDump.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 11/09/2008 (at 10:35) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:30) by Erwan Jahier> *)
 
 
 val string_of_node_key_rec : Eff.node_key -> string
@@ -7,13 +7,13 @@ val node_of_node_exp_eff: Eff.node_exp -> string
 val string_of_const_eff : Eff.const -> string
 
 val string_of_type_eff : Eff.type_ -> string
+val string_of_type_eff4msg : Eff.type_ -> string
 val string_of_type_eff_list : Eff.type_ list -> string
 val type_eff_list_to_string :Eff.type_ list -> string
 
 val type_decl: Ident.long -> Eff.type_ -> string
 val const_decl: Ident.long -> Eff.const -> string
 
-val profile_of_node_exp_eff: Eff.node_exp -> string
 val string_of_var_info_eff: Eff.var_info -> string
 val type_string_of_var_info_eff: Eff.var_info -> string
 val string_of_slice_info_eff : Eff.slice_info -> string 
@@ -21,43 +21,6 @@ val string_of_slice_info_eff : Eff.slice_info -> string
 
 (* Dump all the aliases that were introduced during the compilation process *)
 val dump_type_alias : out_channel -> unit
-val dump_node_alias : out_channel -> unit
-
-
-(* Remember the type of iterator calls. 
-
-   The type of the expression "map<<+,3>>" depends on its
-   context. And when translating expressions like
-   "map<<map<<+,3>>,42>>", we create an alias node for
-   "map<<+,3>>". But this node have an overloaded type (the same
-   problem occur when iterating of polymorphic op).
-
-   One difficulty is that we can know the type of this call only
-   at the top level iterator.
-
-   Therefore we procees in two step : 
-   (1) each time we see an iterator call, we tabulate its profile
-   (cf OpProfile constructor below), that migth contain some 
-   type variables (well, at most one for the time being).
-   (2) When we type check the expression, we know the substition
-   for that type var. So we tabulate it (cf Subst constructor below).
-
-   The problem is that the inner iterator calls are never typed check !
-   (well, more precisely, EvalType.f is never called for them, besause
-   they have been transformed into a node_exp_eff that is polymorphic).
-
-   The (diry) trick I use is to store the substitution in a internal
-   reference, that is uses as soon a I have to deal with a type var.
-   It works because the outter iter call is treated before the inner
-   ones, and because no other call to dump_node_alias is
-   intertwinned...
-*)
-type tab_elt = 
-  | OpProfile of Eff.type_ list * Eff.type_ list
-  | Subst of Eff.type_
-val tabulate_poly_op :  Lxm.t -> tab_elt -> unit
-val poly_op_mem : Lxm.t -> bool
-val poly_op_find :  Lxm.t -> tab_elt option
 
 
 (* used for error msgs *)
@@ -65,3 +28,29 @@ val string_of_clock_exp : SyntaxTreeCore.clock_exp -> string
 val string_of_clock2  : Eff.clock -> string
 val string_of_val_exp_eff : Eff.val_exp -> string
 
+
+(** To deal with polymorphic nodes.
+    
+    The idea is the following. As soon as we try (in LazyCompiler) to
+    dump a polymorphic node, we push it on a stack
+    (push_on_polymorphic_node_stack), instead of dumpinf it, as we have decided
+    that lic does not accept polymorphic nodes.
+    
+    This ougth to occur in a unique situation: when an array iterator
+    is called over a polymorphic operator, e.g., in
+    
+    x = map<<+,3>>([1;2;3],[1;2;3]);
+
+    in such a situation, we do generated a polymorphic Eff.node_exp
+    for the expression "map<<+,3>>" (but we dont' dump it). But once
+    we get that node_exp (in GetEff.translate_val_exp), by unifying
+    the node_exp with the dynamic arguments, we know that the type
+    variable was an integer.
+    
+    Hence, we can now print the instanciated node (unstack_polymorphic_nodes).
+
+    Note that it is a stack because array iterators an be nested.
+
+*)
+val push_on_polymorphic_node_stack : Eff.node_exp -> unit
+val unstack_polymorphic_nodes : Eff.type_ -> unit
diff --git a/src/main.ml b/src/main.ml
index 4000c06b..87b17ea2 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 05/12/2008 (at 10:41) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 16:09) by Erwan Jahier> *)
 
 (** Here follows a description of the different modules used by this lus2lic compiler.
 
@@ -237,7 +237,6 @@ let main = (
       if !Global.outfile <> "" then Global.oc := open_out !Global.outfile;
       Compile.doit nsl main_node;
       LicDump.dump_type_alias !Global.oc;
-      LicDump.dump_node_alias !Global.oc;
       close_out !Global.oc
   ) with
       Sys_error(s) ->
diff --git a/src/name.ml b/src/name.ml
index 423691d9..45d09463 100644
--- a/src/name.ml
+++ b/src/name.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 26/11/2008 (at 09:56) by Erwan Jahier> *)
+(** Time-stamp: <modified the 09/12/2008 (at 17:49) by Erwan Jahier> *)
 
 
 
@@ -37,7 +37,7 @@ let (node_key: Eff.node_key -> string -> string) =
                   let cpt = Hashtbl.find node_name_tbl name in
                   let fresh_name = 
                     Hashtbl.replace node_name_tbl name (cpt+1);
-                    name ^ "$" ^ (string_of_int cpt)
+                    name ^ "_" ^ (string_of_int cpt)
                   in
                     Hashtbl.add node_key_tbl nk fresh_name;
                     fresh_name
diff --git a/src/name.mli b/src/name.mli
index d3e78b54..d3c77644 100644
--- a/src/name.mli
+++ b/src/name.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 26/11/2008 (at 09:56) by Erwan Jahier> *)
+(** Time-stamp: <modified the 09/12/2008 (at 11:03) by Erwan Jahier> *)
 
 
 (** All new identifier names ougth to be created via this module.  
@@ -8,7 +8,7 @@
     generated here never begins with "_" and no clash is possible.
 *)
 
-(** [node_key nk prop name] returns a node ident that won't clash. 
+(** [node_key nk name] returns a node ident that won't clash, using [name] or not. 
 
    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/predef.ml b/src/predef.ml
index 31883eb5..8c05c8d7 100644
--- a/src/predef.ml
+++ b/src/predef.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 28/08/2008 (at 10:29) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 17:49) by Erwan Jahier> *)
 
 (* XXX shoud not type int, real, and bool be handled there ? *)
 
@@ -58,6 +58,18 @@ type op =
   | FillRed
   | BoolRed
 
+(* can occur into an array iterator *)
+let iterable_op =  [ 
+  NOT_n; REAL2INT_n; INT2REAL_n; AND_n; OR_n; XOR_n; IMPL_n;
+  DIV_n; MOD_n; IUMINUS_n; IMINUS_n; IPLUS_n; ISLASH_n; ITIMES_n;
+  RUMINUS_n; RMINUS_n; RPLUS_n; RSLASH_n; RTIMES_n ;
+  UMINUS_n; MINUS_n; PLUS_n; SLASH_n; TIMES_n ; 
+  EQ_n; NEQ_n; LT_n; LTE_n; GT_n; GTE_n ;
+  IF_n
+ ]
+
+(* iterators? *)
+
 let op2string = function
   | TRUE_n -> "true"
   | FALSE_n -> "false"
@@ -123,7 +135,7 @@ let op2string_long = function
   | ITIMES_n -> "itimes"
   | RUMINUS_n -> "ruminus"
   | RMINUS_n -> "rminus"
-  | RPLUS_n -> "plus"
+  | RPLUS_n -> "rplus"
   | RSLASH_n -> "rdiv"
   | RTIMES_n -> "rtimes"
   | op -> op2string op
@@ -204,6 +216,13 @@ let (string_to_op : string -> op) =
 *)
 type 'a evaluator = 'a list list -> 'a list 
 
+
+let (op_to_long : op -> Ident.long) =
+  fun op -> 
+    Ident.make_long 
+      (Ident.pack_name_of_string "Lustre") 
+      (Ident.of_string (op2string_long op))
+    
 (*********************************************************************************)
 (* Automatically generate the latex documentation associated to predefined
    entities *)
diff --git a/src/predefEvalType.ml b/src/predefEvalType.ml
index a66c4613..2907cd35 100644
--- a/src/predefEvalType.ml
+++ b/src/predefEvalType.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 20/11/2008 (at 15:26) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:34) by Erwan Jahier> *)
 
 open Predef
 open Lxm
@@ -16,7 +16,7 @@ exception EvalType_error of string
 (* exported *)
 let (type_error : Eff.type_ list -> string -> 'a) =
   fun tel expect -> 
-    let str_l = List.map LicDump.string_of_type_eff tel in
+    let str_l = List.map LicDump.string_of_type_eff4msg tel in
     let str_provided = String.concat "*" str_l in 
       raise (EvalType_error(
                ("\n*** type '" ^ str_provided ^ "' was provided" ^
@@ -75,10 +75,12 @@ let (type_to_array_type: Eff.var_info list -> int -> (Ident.t * Eff.type_) list)
     List.map (fun vi -> vi.var_name_eff, Array_type_eff(vi.var_type_eff,c)) l
 
 (* Extract the node and the constant from a list of static args *)
-let (get_node_and_constant:Eff.static_arg list -> Eff.node_exp * int)=
+let (get_node_and_constant:
+       Eff.static_arg list -> Eff.item_key * var_info list * var_info list * int)=
   fun sargs -> 
       match sargs with
-        | [NodeStaticArgEff(_,n);ConstStaticArgEff(_,Int_const_eff c)] -> n,c
+        | [NodeStaticArgEff(_,(n, inlist, outlist));
+           ConstStaticArgEff(_,Int_const_eff c)] -> n, inlist, outlist, c
         | _ -> assert false
 
 
@@ -90,14 +92,10 @@ let map_profile =
      The profile of map is: tau_1^c * ... * tau_n^c -> teta_1^c * ... * teta_l^c
     *)
   fun lxm sargs -> 
-    let (n,c) = get_node_and_constant sargs in
-    let lti = type_to_array_type n.inlist_eff c in
-    let lto = type_to_array_type n.outlist_eff c in
+    let (n, inlist, outlist, c) = get_node_and_constant sargs in
+    let lti = type_to_array_type inlist c in
+    let lto = type_to_array_type outlist c in
     let res = (lti, lto) in
-      if not(LicDump.poly_op_mem lxm) then (
-        LicDump.tabulate_poly_op lxm 
-          (LicDump.OpProfile (snd (List.split lti), snd(List.split lto)))
-      );
       res
 
 let get_id_type vi = vi.var_name_eff, vi.var_type_eff
@@ -112,12 +110,12 @@ let (fillred_profile : Lxm.t -> Eff.static_arg list ->
         tau * tau_1^c * ... * tau_n^c  -> tau * teta_1^c * ... * teta_l^c
     *)
   fun lxm sargs ->
-    let (n,c) = get_node_and_constant sargs in
-    let _ = assert(n.inlist_eff <> [] && n.outlist_eff <> []) in
-    let lti = (get_id_type (List.hd n.inlist_eff))::
-      type_to_array_type (List.tl n.inlist_eff) c in
-    let lto = (get_id_type (List.hd n.outlist_eff))::
-      type_to_array_type (List.tl n.outlist_eff) c in
+    let (n, inlist, outlist, c) = get_node_and_constant sargs in
+    let _ = assert(inlist <> [] && outlist <> []) in
+    let lti = (get_id_type (List.hd inlist))::
+      type_to_array_type (List.tl inlist) c in
+    let lto = (get_id_type (List.hd outlist))::
+      type_to_array_type (List.tl outlist) c in
     let (id1, t1) = List.hd lti and (id2, t2) = List.hd lto in
     let res = 
       if t1 = t2 then (lti,lto) else
@@ -129,13 +127,6 @@ let (fillred_profile : Lxm.t -> Eff.static_arg list ->
                List.map (fun (id,tid) -> id, subst_type t tid) lto)
           | Ko(msg) -> raise (Compile_error(lxm, msg))
     in
-      if not(LicDump.poly_op_mem lxm) then (
-(*         print_string ("*** Tabulating " ^ lxm._str ^":"^(string_of_int lxm._line)  *)
-(*                       ^"."^(string_of_int lxm._cstart)  ^  "\n"); *)
-(*         flush stdout; *)
-        LicDump.tabulate_poly_op lxm 
-          (LicDump.OpProfile (snd (List.split lti), snd(List.split lto)))
-      );
       res
 
 (* let fill_profile = fillred_profile *)
@@ -213,14 +204,14 @@ let (op2profile : Predef.op -> Lxm.t -> Eff.static_arg list -> node_profile) =
 (* exported *)
 let (make_node_exp_eff : 
        bool option -> op -> Lxm.t -> Eff.static_arg list -> Eff.node_exp) =
-  fun has_mem op lxm sargs -> 
-    let id = Ident.make_long 
-      (Ident.pack_name_of_string "Lustre") (Ident.of_string (Predef.op2string_long op))
-    in
+  fun has_mem op lxm sargs ->
+    let id = Predef.op_to_long op in
     let (lti,lto) = op2profile op lxm sargs in
     let i = ref 0 in
+    let is_polymorphic = ref false in
     let to_var_info_eff nature (id, te) =
-      let res = 
+      let res =
+        if Eff.is_polymorphic te then is_polymorphic := true ;
         {
           var_name_eff = id;
           var_nature_eff = nature;
@@ -232,15 +223,24 @@ let (make_node_exp_eff :
         incr i;
         res
     in
+    let inlist_eff = List.map (to_var_info_eff SyntaxTreeCore.VarInput) lti in
+    let outlist_eff = (i:=0;List.map (to_var_info_eff SyntaxTreeCore.VarOutput) lto) in
+    let res = 
       {
         node_key_eff = id,sargs ;
-        inlist_eff  = List.map (to_var_info_eff SyntaxTreeCore.VarInput) lti;
-        outlist_eff  = (i:=0; List.map (to_var_info_eff SyntaxTreeCore.VarOutput) lto);
+        inlist_eff   = inlist_eff;
+        outlist_eff  = outlist_eff;
         loclist_eff  = None;
         def_eff      = ExternEff;
         has_mem_eff  = (match has_mem with Some b -> b | None -> true);
         is_safe_eff  = true;
+        is_polym_eff = 
+(*           List.exists (fun vi -> Eff.is_polymorphic vi.var_type_eff) inlist_eff || *)
+(*           List.exists (fun vi -> Eff.is_polymorphic vi.var_type_eff) outlist_eff *)
+          !is_polymorphic
       }
+    in 
+      res
 
 (* exported *)
 let (f : op -> Lxm.t -> Eff.static_arg list -> typer) = 
@@ -294,4 +294,3 @@ let (f : op -> Lxm.t -> Eff.static_arg list -> typer) =
                   | Ko(str) -> 
                       type_error2 (LicDump.type_eff_list_to_string l) 
                         (LicDump.type_eff_list_to_string lti) str
-
diff --git a/src/predefEvalType.mli b/src/predefEvalType.mli
index 63dae2b8..76839f7e 100644
--- a/src/predefEvalType.mli
+++ b/src/predefEvalType.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 29/08/2008 (at 10:21) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:34) by Erwan Jahier> *)
 
 type typer = Eff.type_ Predef.evaluator
 
diff --git a/src/split.ml b/src/split.ml
index 350740a6..e6b98acc 100644
--- a/src/split.ml
+++ b/src/split.ml
@@ -1,8 +1,9 @@
-(** Time-stamp: <modified the 28/11/2008 (at 15:20) by Erwan Jahier> *)
+(** Time-stamp: <modified the 11/12/2008 (at 15:36) by Erwan Jahier> *)
 
 
 open Lxm
 open Eff
+open Predef
 
 (********************************************************************************)
 (* stuff to create fresh var names. *)
@@ -108,6 +109,7 @@ let (split_tuples:Eff.eq_info Lxm.srcflagged list -> Eff.eq_info Lxm.srcflagged
       List.flatten (List.map split_one_eq eql)
         
 (********************************************************************************)
+        
 (* The functions below accumulate 
    (1) the new equations 
    (2) the fresh variables. 
@@ -147,11 +149,11 @@ and (split_val_exp : bool -> Eff.local_env -> Eff.val_exp -> Eff.val_exp * split
                    ((fn,fv)::fl_acc, eql@eql_acc, vl@vl_acc)
               )
               ([],[],[])
-              fl 
+              fl
           in
           let rhs = CallByNameEff (by_name_op_eff, List.rev fl) in
-            if top_level then 
-              rhs, (eql, vl) 
+            if top_level then
+              rhs, (eql, vl)
             else
               (* create the var for the current call *)
               let clk_l = EvalClock.get_val_exp_eff ve in
@@ -200,6 +202,7 @@ and (split_val_exp : bool -> Eff.local_env -> Eff.val_exp -> Eff.val_exp * split
                   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 node_env vel in
                   let rhs = CallByPosEff(by_pos_op_eff, OperEff vel) in
diff --git a/src/symbolTab.mli b/src/symbolTab.mli
index d3b184ad..1c2240c3 100644
--- a/src/symbolTab.mli
+++ b/src/symbolTab.mli
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 15/09/2008 (at 18:09) by Erwan Jahier> *)
+(** Time-stamp: <modified the 09/12/2008 (at 15:00) by Erwan Jahier> *)
 
 (**********************************************************
 Sous-module pour SyntaxTab 
@@ -15,11 +15,7 @@ qui sont par d
 open SyntaxTreeCore
 open Lxm
 
-(** Symbol table elements.
-
-Note that the list of static params does not make sens for types
-and consts (Well, maybe it could for types?). 
-*)
+(** Symbol table elements. *)
 type 'a elt =
   | Local of 'a
   | Imported of Ident.long * static_param srcflagged list
diff --git a/src/syntaxTab.ml b/src/syntaxTab.ml
index fe6b49e2..8da71b48 100644
--- a/src/syntaxTab.ml
+++ b/src/syntaxTab.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 23/10/2008 (at 11:33) by Erwan Jahier> *)
+(** Time-stamp: <modified the 09/12/2008 (at 17:36) by Erwan Jahier> *)
 
 (** 
     Table des infos sources : une couche au dessus de SyntaxTree pour mieux
@@ -97,7 +97,7 @@ let (pack_body_env: t -> Ident.pack_name -> SymbolTab.t) =
       print_string ("*** Can not find package '" ^ 
 		      (Ident.pack_name_to_string p) ^ "' in the following packages: ");
       Hashtbl.iter 
-	(fun pn pm -> print_string ("\n***\t - '"^(Ident.pack_name_to_string pn)^ "'"))
+	(fun pn pm -> print_string ("\n***\t '"^(Ident.pack_name_to_string pn)^ "'"))
 	this.st_pack_mng_tab;
       print_string "\n";
       flush stdout;
@@ -108,13 +108,13 @@ let (pack_body_env: t -> Ident.pack_name -> SymbolTab.t) =
 let (pack_prov_env: t -> Ident.pack_name -> Lxm.t -> SymbolTab.t option) =
   fun this p lxm -> 
     try (Hashtbl.find this.st_pack_mng_tab p).pm_provide_stab
-    with Not_found -> raise(Compile_error(lxm, ""))
+    with Not_found -> 
+      let msg = 
+        ("\n*** Could not find package " ^(Ident.pack_name_to_string p) ^ 
+           " in the package table" )
+      in
+        raise(Compile_error(lxm, msg))
       
-(** XXX This can occur is a lot of different contexts, so it is difficult to
-    give a good error message. *)
-
-(* "\n*** Could not find package " ^(Ident.pack_name_to_string p) ^ 
- " in the package table" *)
 
 
 
diff --git a/src/test/should_work/call/bad_call03.lus b/src/test/should_fail/type/bad_call03.lus
similarity index 100%
rename from src/test/should_work/call/bad_call03.lus
rename to src/test/should_fail/type/bad_call03.lus
diff --git a/src/test/test.res.exp b/src/test/test.res.exp
index 01bc2ddd..b76b1415 100644
--- a/src/test/test.res.exp
+++ b/src/test/test.res.exp
@@ -61,7 +61,6 @@ type A_bool_11 = bool^11;
 type A_A_A_int_1_2_3 = A_A_int_1_2^3;
 type A_A_int_1_2 = A_int_1^2;
 type A_int_1 = int^1;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/COUNTER.lus
 Opening file should_work/NONREG/COUNTER.lus
@@ -87,7 +86,6 @@ let
 tel
 -- end of node COUNTER::COUNTER
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/CURRENT.lus
 Opening file should_work/NONREG/CURRENT.lus
@@ -97,7 +95,6 @@ let
 tel
 -- end of node CURRENT::CURRENT
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/EDGE.lus
 Opening file should_work/NONREG/EDGE.lus
@@ -114,7 +111,6 @@ let
 tel
 -- end of node EDGE::EDGE
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/FALLING_EDGE.lus
 Opening file should_work/NONREG/FALLING_EDGE.lus
@@ -139,7 +135,6 @@ let
 tel
 -- end of node FALLING_EDGE::FALLING_EDGE
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Int.lus
 Opening file should_work/NONREG/Int.lus
@@ -204,7 +199,6 @@ tel
 -- end of node mainPack::Nat
 -- automatically defined aliases:
 type A_bool_8 = bool^8;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/PCOND.lus
 Opening file should_work/NONREG/PCOND.lus
@@ -261,7 +255,6 @@ let
 tel
 -- end of node PCOND::PCOND
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/PCOND1.lus
 Opening file should_work/NONREG/PCOND1.lus
@@ -290,7 +283,6 @@ let
 tel
 -- end of node PCOND1::PCOND1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/SOURIS.lus
 Opening file should_work/NONREG/SOURIS.lus
@@ -716,7 +708,6 @@ let
 tel
 -- end of node SOURIS::SOURIS
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/STABLE.lus
 Opening file should_work/NONREG/STABLE.lus
@@ -739,7 +730,6 @@ let
 tel
 -- end of node STABLE::STABLE
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/SWITCH.lus
 Opening file should_work/NONREG/SWITCH.lus
@@ -768,7 +758,6 @@ let
 tel
 -- end of node SWITCH::SWITCH
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/SWITCH1.lus
 Opening file should_work/NONREG/SWITCH1.lus
@@ -791,7 +780,6 @@ let
 tel
 -- end of node SWITCH1::SWITCH1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/TIME_STABLE.lus
 Opening file should_work/NONREG/TIME_STABLE.lus
@@ -836,7 +824,6 @@ let
 tel
 -- end of node TIME_STABLE::TIME_STABLE
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/TIME_STABLE1.lus
 Opening file should_work/NONREG/TIME_STABLE1.lus
@@ -871,7 +858,6 @@ let
 tel
 -- end of node TIME_STABLE1::TIME1_STABLE1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/Watch.lus
 Opening file should_work/NONREG/Watch.lus
@@ -1631,7 +1617,6 @@ let
 tel
 -- end of node Watch::MORE_RECENT
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X.lus
 Opening file should_work/NONREG/X.lus
@@ -1669,7 +1654,6 @@ let
 tel
 -- end of node X::X
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X1.lus
 Opening file should_work/NONREG/X1.lus
@@ -1682,7 +1666,6 @@ let
 tel
 -- end of node X1::X1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X2.lus
 Opening file should_work/NONREG/X2.lus
@@ -1697,7 +1680,6 @@ let
 tel
 -- end of node X2::X2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X3.lus
 Opening file should_work/NONREG/X3.lus
@@ -1728,7 +1710,6 @@ let
 tel
 -- end of node X3::X3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/X6.lus
 Opening file should_work/NONREG/X6.lus
@@ -1764,7 +1745,6 @@ let
 tel
 -- end of node X6::X6
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/_N_uu.lus
 Opening file should_work/NONREG/_N_uu.lus
@@ -1865,7 +1845,6 @@ let
 tel
 -- end of node _N_uu::_N_uu
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/activation_ec.lus
 Opening file should_work/NONREG/activation_ec.lus
@@ -1906,7 +1885,6 @@ let
 tel
 -- end of node activation_ec::activation_ec
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/after.lus
 Opening file should_work/NONREG/after.lus
@@ -1921,7 +1899,6 @@ let
 tel
 -- end of node after::after
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/alarme.lus
 Opening file should_work/NONREG/alarme.lus
@@ -2113,7 +2090,6 @@ let
 tel
 -- end of node alarme::alarme
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/arbitre.lus
 Opening file should_work/NONREG/arbitre.lus
@@ -2235,7 +2211,6 @@ let
 tel
 -- end of node arbitre::arbitre
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/argos.lus
 Opening file should_work/NONREG/argos.lus
@@ -2300,7 +2275,6 @@ let
 tel
 -- end of node argos::argos
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/assertion.lus
 Opening file should_work/NONREG/assertion.lus
@@ -2321,7 +2295,6 @@ let
 tel
 -- end of node assertion::assertion
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/aux.lus
 Opening file should_work/NONREG/aux.lus
@@ -2334,7 +2307,6 @@ let
 tel
 -- end of node aux::aux
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/aux1.lus
 Opening file should_work/NONREG/aux1.lus
@@ -2360,7 +2332,6 @@ let
 tel
 -- end of node aux1::aux1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/bascule.lus
 Opening file should_work/NONREG/bascule.lus
@@ -2392,7 +2363,6 @@ let
 tel
 -- end of node bascule::bascule
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/call.lus
 Opening file should_work/NONREG/call.lus
@@ -2417,7 +2387,6 @@ let
 tel
 -- end of node call::call
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck2.lus
 Opening file should_work/NONREG/ck2.lus
@@ -2436,7 +2405,6 @@ let
 tel
 -- end of node ck2::ck2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck3.lus
 Opening file should_work/NONREG/ck3.lus
@@ -2449,7 +2417,6 @@ let
 tel
 -- end of node ck3::ck3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck4.lus
 Opening file should_work/NONREG/ck4.lus
@@ -2459,7 +2426,6 @@ let
 tel
 -- end of node ck4::ck4
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck5.lus
 Opening file should_work/NONREG/ck5.lus
@@ -2486,7 +2452,6 @@ let
 tel
 -- end of node ck5::ck5
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck6.lus
 Opening file should_work/NONREG/ck6.lus
@@ -2517,7 +2482,6 @@ let
 tel
 -- end of node ck6::ck6
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ck7.lus
 Opening file should_work/NONREG/ck7.lus
@@ -2528,7 +2492,6 @@ let
 tel
 -- end of node ck7::ck7
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/clock.lus
 Opening file should_work/NONREG/clock.lus
@@ -2592,7 +2555,6 @@ tel
 -- end of node clock::clock
 -- automatically defined aliases:
 type A_bool_7 = bool^7;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cminus.lus
 Opening file should_work/NONREG/cminus.lus
@@ -2665,7 +2627,6 @@ let
 tel
 -- end of node cminus::cminus
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/compteur.lus
 Opening file should_work/NONREG/compteur.lus
@@ -2682,7 +2643,6 @@ let
 tel
 -- end of node compteur::compteur
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/count.lus
 Opening file should_work/NONREG/count.lus
@@ -2695,7 +2655,6 @@ let
 tel
 -- end of node count::count
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cpt.lus
 Opening file should_work/NONREG/cpt.lus
@@ -2714,7 +2673,6 @@ let
 tel
 -- end of node cpt::cpt
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/cst.lus
 Opening file should_work/NONREG/cst.lus
@@ -2738,7 +2696,6 @@ let
 tel
 -- end of node cst::cst
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/deconne.lus
 Opening file should_work/NONREG/deconne.lus
@@ -2781,7 +2738,6 @@ let
 tel
 -- end of node deconne::deconne
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dep.lus
 Opening file should_work/NONREG/dep.lus
@@ -2806,7 +2762,6 @@ let
 tel
 -- end of node dep::dep
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dependeur.lus
 Opening file should_work/NONREG/dependeur.lus
@@ -2831,7 +2786,6 @@ let
 tel
 -- end of node dependeur::dependeur
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/dependeur_struct.lus
 Opening file should_work/NONREG/dependeur_struct.lus
@@ -2854,7 +2808,6 @@ let
 tel
 -- end of node dependeur_struct::dependeur_struct
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/drapfab.lus
 Opening file should_work/NONREG/drapfab.lus
@@ -2983,7 +2936,6 @@ let
 tel
 -- end of node drapfab::drapfab
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/enum.lus
 Opening file should_work/NONREG/enum.lus
@@ -3009,14 +2961,12 @@ let
 tel
 -- end of node enum::boo
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/enum0.lus
 Opening file should_work/NONREG/enum0.lus
 type _enum0::color1 = enum {enum0::blue, enum0::white, enum0::black};
 type _enum0::color2 = enum {enum0::green, enum0::orange, enum0::yellow};
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/eq1.lus
 Opening file should_work/NONREG/eq1.lus
@@ -3054,7 +3004,6 @@ let
 tel
 -- end of node eq1::eq1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/ex.lus
 Opening file should_work/NONREG/ex.lus
@@ -3098,7 +3047,6 @@ type A_bool_11 = bool^11;
 type A_A_A_int_1_2_3 = A_A_int_1_2^3;
 type A_A_int_1_2 = A_int_1^2;
 type A_int_1 = int^1;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/exclusion.lus
 Opening file should_work/NONREG/exclusion.lus
@@ -3128,7 +3076,6 @@ let
 tel
 -- end of node exclusion::exclusion
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/fby.lus
 Opening file should_work/NONREG/fby.lus
@@ -3143,7 +3090,6 @@ let
 tel
 -- end of node fby::followed_by
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/flo.lus
 Opening file should_work/NONREG/flo.lus
@@ -3179,7 +3125,6 @@ let
 tel
 -- end of node flo::flo
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/hanane.lus
 Opening file should_work/NONREG/hanane.lus
@@ -3258,7 +3203,6 @@ type A_A_A_int_4_4_4 = A_A_int_4_4^4;
 type A_A_int_4_4 = A_int_4^4;
 type A__hanane::structT_2 = _hanane::structT^2;
 type A_int_4 = int^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/import1.lus
 Opening file should_work/NONREG/import1.lus
@@ -3274,7 +3218,6 @@ let
 tel
 -- end of node import1::import1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/initial.lus
 Opening file should_work/NONREG/initial.lus
@@ -3293,7 +3236,6 @@ let
 tel
 -- end of node initial::initial
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/integrator.lus
 Opening file should_work/NONREG/integrator.lus
@@ -3322,7 +3264,6 @@ let
 tel
 -- end of node integrator::integrator
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/long_et_stupide_nom_de_noeud.lus
 Opening file should_work/NONREG/long_et_stupide_nom_de_noeud.lus
@@ -3339,7 +3280,6 @@ let
 tel
 -- end of node long_et_stupide_nom_de_noeud::long_et_stupide_nom_de_noeud
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/merge.lus
 Opening file should_work/NONREG/merge.lus
@@ -3360,7 +3300,6 @@ let
 tel
 -- end of node minmax1::minmax1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax2.lus
 Opening file should_work/NONREG/minmax2.lus
@@ -3379,7 +3318,6 @@ let
 tel
 -- end of node minmax2::minmax2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax3.lus
 Opening file should_work/NONREG/minmax3.lus
@@ -3412,7 +3350,6 @@ let
 tel
 -- end of node minmax3::minmax3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax4.lus
 Opening file should_work/NONREG/minmax4.lus
@@ -3452,7 +3389,6 @@ let
 tel
 -- end of node minmax4::minmax4
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax4_bis.lus
 Opening file should_work/NONREG/minmax4_bis.lus
@@ -3492,7 +3428,6 @@ let
 tel
 -- end of node minmax4_bis::minmax4_bis
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax5.lus
 Opening file should_work/NONREG/minmax5.lus
@@ -3524,7 +3459,6 @@ let
 tel
 -- end of node minmax5::minmax5
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax5_random.lus
 Opening file should_work/NONREG/minmax5_random.lus
@@ -3562,7 +3496,6 @@ let
 tel
 -- end of node minmax5_random::minmax5_random
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/minmax6.lus
 Opening file should_work/NONREG/minmax6.lus
@@ -3619,7 +3552,6 @@ let
 tel
 -- end of node minmax6::minmax6
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm.lus
 Opening file should_work/NONREG/mm.lus
@@ -3635,7 +3567,6 @@ let
 tel
 -- end of node mm::mm
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm1.lus
 Opening file should_work/NONREG/mm1.lus
@@ -3651,7 +3582,6 @@ let
 tel
 -- end of node mm1::mm1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm22.lus
 Opening file should_work/NONREG/mm22.lus
@@ -3669,7 +3599,6 @@ let
 tel
 -- end of node mm22::mm22
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mm3.lus
 Opening file should_work/NONREG/mm3.lus
@@ -3697,7 +3626,6 @@ let
 tel
 -- end of node mm3::mm3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/model.lus
 Opening file should_work/NONREG/model.lus
@@ -3718,7 +3646,6 @@ let
 tel
 -- end of node p::est_egal
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse.lus
 Opening file should_work/NONREG/mouse.lus
@@ -3805,7 +3732,6 @@ let
 tel
 -- end of node mouse::mouse
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse1.lus
 Opening file should_work/NONREG/mouse1.lus
@@ -3876,7 +3802,6 @@ let
 tel
 -- end of node mouse1::mouse1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse2.lus
 Opening file should_work/NONREG/mouse2.lus
@@ -3963,7 +3888,6 @@ let
 tel
 -- end of node mouse2::mouse2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/mouse3.lus
 Opening file should_work/NONREG/mouse3.lus
@@ -4010,7 +3934,6 @@ let
 tel
 -- end of node mouse3::mouse3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/multiclock.lus
 Opening file should_work/NONREG/multiclock.lus
@@ -4056,7 +3979,6 @@ let
 tel
 -- end of node multiclock::multiclock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc1.lus
 Opening file should_work/NONREG/nc1.lus
@@ -4079,7 +4001,6 @@ let
 tel
 -- end of node nc1::nc1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc10.lus
 Opening file should_work/NONREG/nc10.lus
@@ -4141,7 +4062,6 @@ let
 tel
 -- end of node nc10::nc10
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc2.lus
 Opening file should_work/NONREG/nc2.lus
@@ -4170,7 +4090,6 @@ let
 tel
 -- end of node nc2::nc2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc3.lus
 Opening file should_work/NONREG/nc3.lus
@@ -4205,7 +4124,6 @@ let
 tel
 -- end of node nc3::nc3
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc4.lus
 Opening file should_work/NONREG/nc4.lus
@@ -4250,7 +4168,6 @@ let
 tel
 -- end of node nc4::nc4
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc5.lus
 Opening file should_work/NONREG/nc5.lus
@@ -4285,7 +4202,6 @@ let
 tel
 -- end of node nc5::nc5
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc6.lus
 Opening file should_work/NONREG/nc6.lus
@@ -4329,7 +4245,6 @@ let
 tel
 -- end of node nc6::nc6
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc7.lus
 Opening file should_work/NONREG/nc7.lus
@@ -4379,7 +4294,6 @@ let
 tel
 -- end of node nc7::nc7
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc8.lus
 Opening file should_work/NONREG/nc8.lus
@@ -4434,7 +4348,6 @@ let
 tel
 -- end of node nc8::nc8
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nc9.lus
 Opening file should_work/NONREG/nc9.lus
@@ -4492,7 +4405,6 @@ let
 tel
 -- end of node nc9::nc9
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/nested.lus
 Opening file should_work/NONREG/nested.lus
@@ -4501,26 +4413,25 @@ 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<<_node_alias_1_Lustre::map, 42>>(x);
+   y = Lustre::map<<nested::n_node_alias_2, 42>>(x);
 tel
 -- end of node nested::toto
 -- automatically defined aliases:
 type A_A_int_3_5 = A_int_3^5;
 type A_A_A_int_3_5_42 = A_A_int_3_5^42;
 type A_int_3 = int^3;
-node _node_alias_1_Lustre::map(x:A_A_int_3_5) returns (y:A_A_int_3_5);
-let
-  y = Lustre::map<<_node_alias_2_Lustre::map, 5>>(x);
-tel
-
-node _node_alias_2_Lustre::map(x:A_int_3) returns (y:A_int_3);
-let
-  y = Lustre::map<<nested::incr, 3>>(x);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/node_caller1.lus
 Opening file should_work/NONREG/node_caller1.lus
@@ -4567,7 +4478,6 @@ let
 tel
 -- end of node node_caller1::node_caller1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/o2l_feux_compl.lus
 Opening file should_work/NONREG/o2l_feux_compl.lus
@@ -7468,7 +7378,6 @@ let
 tel
 -- end of node o2l_feux_compl::o2l_feux_compl
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/packed_cst.lus
 Opening file should_work/NONREG/packed_cst.lus
@@ -7492,7 +7401,6 @@ let
 tel
 -- end of node cst::cst
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/param_node.lus
 Opening file should_work/NONREG/param_node.lus
@@ -7511,7 +7419,6 @@ tel
 -- end of node param_node::toto_3
 -- automatically defined aliases:
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/param_node2.lus
 Opening file should_work/NONREG/param_node2.lus
@@ -7538,7 +7445,6 @@ tel
 -- automatically defined aliases:
 type A_bool_4 = bool^4;
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/param_node3.lus
 Opening file should_work/NONREG/param_node3.lus
@@ -7559,7 +7465,33 @@ tel
 -- end of node param_node3::xxx
 -- automatically defined aliases:
 type A_int_3 = int^3;
+----------------------------------------------------------------------
+====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/param_node4.lus
+Opening file should_work/NONREG/param_node4.lus
+node param_node4::monplus(i1:int; i2:int) returns (o:int);
+let
+   o = Lustre::iplus(i1, i2);
+tel
+-- end of node param_node4::monplus
 
+node n_param_node4::toto_n_param_node4::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_param_node4::toto_n_param_node4::monplus_3
+node param_node4::toto_3(a:int) returns (x:A_int_3);
+let
+   x = n_param_node4::toto_n_param_node4::monplus_3(a);
+tel
+-- end of node param_node4::toto_3
+-- automatically defined aliases:
+type A_int_3 = int^3;
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/param_struct.lus
 Opening file should_work/NONREG/param_struct.lus
@@ -7588,7 +7520,6 @@ tel
 -- end of node param_struct::tab_toto
 -- automatically defined aliases:
 type A__param_struct::toto_3 = _param_struct::toto^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/patrick.lus
 Opening file should_work/NONREG/patrick.lus
@@ -7603,7 +7534,6 @@ let
 tel
 -- end of node patrick::patrick
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/poussoir.lus
 Opening file should_work/NONREG/poussoir.lus
@@ -7656,7 +7586,6 @@ let
 tel
 -- end of node poussoir::poussoir
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/rs.lus
 Opening file should_work/NONREG/rs.lus
@@ -7689,7 +7618,6 @@ let
 tel
 -- end of node rs::rs
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/s.lus
 Opening file should_work/NONREG/s.lus
@@ -7700,7 +7628,6 @@ let
 tel
 -- end of node s::s
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/simple.lus
 Opening file should_work/NONREG/simple.lus
@@ -7730,7 +7657,6 @@ tel
 extern function simple::f1(x:int) returns (y:int);
 extern function simple::f2(u:int; v:int) returns (s:int; t:bool);
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/sincos.lus
 Opening file should_work/NONREG/sincos.lus
@@ -7766,6 +7692,27 @@ let
 tel
 -- end of node sincos::sincos
 
+----------------------------------------------------------------------
+====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/speedcontrol.lus
+Opening file should_work/NONREG/speedcontrol.lus
+node speedcontrol::f(x:int) returns (y:int);
+var
+   _v1:int;
+   _v2:int;
+let
+   y = 0 -> _v2;
+   _v1 = pre x;
+   _v2 = _v1 + 1;
+tel
+-- end of node speedcontrol::f
+node speedcontrol::speedcontrol(c:bool) returns (counter:int);
+var
+   _v1:int;
+let
+   counter = 0 -> _v1;
+   _v1 = speedcontrol::f(counter);
+tel
+-- end of node speedcontrol::speedcontrol
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/stopwatch.lus
@@ -7853,7 +7800,6 @@ let
 tel
 -- end of node stopwatch::stopwatch
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/testCA.lus
 Opening file should_work/NONREG/testCA.lus
@@ -7878,7 +7824,6 @@ let
 tel
 -- end of node testCA::testCA
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/test_clash.lus
 Opening file should_work/NONREG/test_clash.lus
@@ -7898,7 +7843,6 @@ let
 tel
 -- end of node test::toto
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/trivial.lus
 Opening file should_work/NONREG/trivial.lus
@@ -7920,7 +7864,6 @@ let
 tel
 -- end of node trivial::trivial
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/trivial2.lus
 Opening file should_work/NONREG/trivial2.lus
@@ -7945,7 +7888,6 @@ let
 tel
 -- end of node trivial2::trivial2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/tuple.lus
 Opening file should_work/NONREG/tuple.lus
@@ -7957,7 +7899,6 @@ let
 tel
 -- end of node tuple::toto
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/type_decl.lus
 Opening file should_work/NONREG/type_decl.lus
@@ -7965,7 +7906,6 @@ type _type_decl::alias = int;
 type _type_decl::pair = struct  {a : int; b : int};
 type _type_decl::color = enum {type_decl::blue, type_decl::white, type_decl::black};
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/uu.lus
 Opening file should_work/NONREG/uu.lus
@@ -8066,7 +8006,6 @@ let
 tel
 -- end of node uu::uu
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/NONREG/v1.lus
 Opening file should_work/NONREG/v1.lus
@@ -8079,7 +8018,6 @@ let
 tel
 -- end of node v1::v1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/consensus.lus
 Opening file should_work/Pascal/consensus.lus
@@ -8243,7 +8181,6 @@ type A_bool_2 = bool^2;
 type A_bool_6 = bool^6;
 type A_bool_10 = bool^10;
 type A_bool_3 = bool^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/consensus2.lus
 Opening file should_work/Pascal/consensus2.lus
@@ -8367,7 +8304,6 @@ type A_bool_5 = bool^5;
 type A_bool_2 = bool^2;
 type A_bool_6 = bool^6;
 type A_bool_3 = bool^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/fby.lus
 Opening file should_work/Pascal/fby.lus
@@ -8394,7 +8330,6 @@ let
 tel
 -- end of node fby::rising_edge
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/func_with_body.lus
 Opening file should_work/Pascal/func_with_body.lus
@@ -8405,7 +8340,6 @@ let
 tel
 -- end of node func_with_body::trivial
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/heater_control.lus
 Opening file should_work/Pascal/heater_control.lus
@@ -8651,7 +8585,6 @@ let
 tel
 -- end of node heater_control::not_a_sauna
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/left.lus
 Opening file should_work/Pascal/left.lus
@@ -8675,7 +8608,6 @@ tel
 -- automatically defined aliases:
 type A__left::truc_3 = _left::truc^3;
 type A_bool_100 = bool^100;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/newpacks.lus
 Opening file should_work/Pascal/newpacks.lus
@@ -8742,7 +8674,6 @@ tel
 -- end of node mainPack::preced
 const inter::n = -4;
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/onlyroll.lus
 Opening file should_work/Pascal/onlyroll.lus
@@ -9851,7 +9782,6 @@ let
 tel
 -- end of node onlyroll::InHardoverRange
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/p.lus
 Opening file should_work/Pascal/p.lus
@@ -9918,7 +9848,6 @@ tel
 -- end of node mainPack::preced
 const inter::n = -4;
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/packs.lus
 Opening file should_work/Pascal/packs.lus
@@ -9990,7 +9919,6 @@ tel
 -- end of node mainPack::preced
 type _inter::toto = enum {inter::X, inter::Y};
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/pfs.lus
 Opening file should_work/Pascal/pfs.lus
@@ -10026,7 +9954,6 @@ let
 tel
 -- end of node struct::plus
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/struct0.lus
 Opening file should_work/Pascal/struct0.lus
@@ -10037,7 +9964,6 @@ let
 tel
 -- end of node struct0::bibi
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t.lus
 Opening file should_work/Pascal/t.lus
@@ -10059,7 +9985,6 @@ tel
 -- automatically defined aliases:
 type A_A_int_2_3 = A_int_2^3;
 type A_int_2 = int^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t0.lus
 Opening file should_work/Pascal/t0.lus
@@ -10137,7 +10062,6 @@ type A_int_2 = int^2;
 type A_int_3 = int^3;
 type A_int_4 = int^4;
 type A_int_1 = int^1;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t1.lus
 Opening file should_work/Pascal/t1.lus
@@ -10201,7 +10125,6 @@ type A_bool_3 = bool^3;
 type A_bool_4 = bool^4;
 type A_bool_1 = bool^1;
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/t2.lus
 Opening file should_work/Pascal/t2.lus
@@ -10332,14 +10255,12 @@ type A_bool_4 = bool^4;
 type A_bool_1 = bool^1;
 type A_bool_5 = bool^5;
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/test.lus
 Opening file should_work/Pascal/test.lus
 const P1::y = 3;
 type _P1::titi = int^5;
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/Pascal/trivial.lus
 Opening file should_work/Pascal/trivial.lus
@@ -10349,7 +10270,6 @@ let
 tel
 -- end of node trivial::trivial
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/bad_call02.lus
 Opening file should_work/call/bad_call02.lus
@@ -10359,39 +10279,6 @@ let
 tel
 -- end of node bad_call02::bad_call02
 
-
-----------------------------------------------------------------------
-====> ../lus2lic -vl 2 --compile-all-items should_work/call/bad_call03.lus
-Opening file should_work/call/bad_call03.lus
-node bad_call03::toto(i1:A_o_3; i2:A_o_3) returns (o:A_o_3);
-let
-   o = Lustre::map<<Lustre::plus, 3>>(i1, i2);
-tel
--- end of node bad_call03::toto
-node bad_call03::titi(c:A_real_3; d:A_real_3) returns (y:A_real_3);
-let
-   y = bad_call03::toto(c, d);
-tel
--- end of node bad_call03::titi
-
-node bad_call03::bad_call03(
-	a:A_int_3;
-	b:A_int_3;
-	c:A_real_3;
-	d:A_real_3) 
-returns (
-	x:A_int_3;
-	y:A_real_3);
-let
-   x = bad_call03::toto(a, b);
-   y = bad_call03::toto(c, d);
-tel
--- end of node bad_call03::bad_call03
--- automatically defined aliases:
-type A_int_3 = int^3;
-type A_o_3 = o^3;
-type A_real_3 = real^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call01.lus
 Opening file should_work/call/call01.lus
@@ -10407,7 +10294,6 @@ tel
 -- end of node call01::call01
 extern function call01::momo(x:bool; y:bool) returns (z:bool);
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call02.lus
 Opening file should_work/call/call02.lus
@@ -10427,7 +10313,6 @@ let
 tel
 -- end of node call02::call02
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call03.lus
 Opening file should_work/call/call03.lus
@@ -10444,7 +10329,6 @@ tel
 extern function call03::momo(x:bool; y:bool) returns (z:bool);
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call04.lus
 Opening file should_work/call/call04.lus
@@ -10470,7 +10354,6 @@ tel
 -- end of node call04::call04
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call05.lus
 Opening file should_work/call/call05.lus
@@ -10481,7 +10364,6 @@ let
 tel
 -- end of node call05::call05
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call06.lus
 Opening file should_work/call/call06.lus
@@ -10493,7 +10375,6 @@ let
 tel
 -- end of node call06::call06
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/call/call07.lus
 Opening file should_work/call/call07.lus
@@ -10503,7 +10384,6 @@ let
 tel
 -- end of node call07::call07
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/clock.lus
 Opening file should_work/clock/clock.lus
@@ -10559,7 +10439,6 @@ returns (
 	clock2_y:bool);
 -- automatically defined aliases:
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/clock2.lus
 Opening file should_work/clock/clock2.lus
@@ -10574,7 +10453,6 @@ let
 tel
 -- end of node clock2::clock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/clock_ite.lus
 Opening file should_work/clock/clock_ite.lus
@@ -10593,7 +10471,6 @@ let
 tel
 -- end of node clock_ite::clock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/when_enum.lus
 Opening file should_work/clock/when_enum.lus
@@ -10620,7 +10497,6 @@ let
 tel
 -- end of node when_enum::clock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/clock/when_node.lus
 Opening file should_work/clock/when_node.lus
@@ -10686,7 +10562,6 @@ let
 tel
 -- end of node when_tuple::clock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/Gyroscope2.lus
 Opening file should_work/demo/Gyroscope2.lus
@@ -11344,7 +11219,6 @@ type A_real_4 = real^4;
 type A__Gyroscope2::Faulty_ChannelT_4 = _Gyroscope2::Faulty_ChannelT^4;
 type A_A__Gyroscope2::Faulty_ChannelT_4_3 = A__Gyroscope2::Faulty_ChannelT_4^3;
 type A_bool_3 = bool^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/alias.lus
 Opening file should_work/demo/alias.lus
@@ -11395,7 +11269,6 @@ tel
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred.lus
 Opening file should_work/demo/bred.lus
@@ -11406,7 +11279,6 @@ tel
 -- end of node bred::bred
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/bred_lv4.lus
 Opening file should_work/demo/bred_lv4.lus
@@ -11418,7 +11290,6 @@ tel
 -- end of node bred_lv4::bred
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/clock.lus
 Opening file should_work/demo/clock.lus
@@ -11451,7 +11322,6 @@ let
 tel
 -- end of node clock::clock
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/clock1_2ms.lus
 Opening file should_work/demo/clock1_2ms.lus
@@ -11490,7 +11360,6 @@ let
 tel
 -- end of node clock1_2ms::clock1_2ms
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/decl.lus
 Opening file should_work/demo/decl.lus
@@ -11535,7 +11404,6 @@ returns (
 type A_A__decl::t1_8_5 = A__decl::t1_8^5;
 type A__decl::t1_8 = _decl::t1^8;
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/declaration.lus
 Opening file should_work/demo/declaration.lus
@@ -11605,7 +11473,6 @@ tel
 type A_A__declaration::t1_8_5 = A__declaration::t1_8^5;
 type A__declaration::t1_8 = _declaration::t1^8;
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/def.lus
 Opening file should_work/demo/def.lus
@@ -11812,7 +11679,6 @@ type A_A_A_int_4_4_4 = A_A_int_4_4^4;
 type A_A_int_4_4 = A_int_4^4;
 type A__def::structT_2 = _def::structT^2;
 type A_int_4 = int^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filliter.lus
 Opening file should_work/demo/filliter.lus
@@ -11851,7 +11717,6 @@ tel
 -- automatically defined aliases:
 type A_int_3 = int^3;
 type A_int_4 = int^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/filter.lus
 Opening file should_work/demo/filter.lus
@@ -11885,7 +11750,6 @@ let
 tel
 -- end of node filter::filter
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/lustre_test1_ok.lus
 Opening file should_work/demo/lustre_test1_ok.lus
@@ -12007,7 +11871,6 @@ let
 tel
 -- end of node lustre_test1_ok::lustre_test1_ok
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/map_red_iter.lus
 Opening file should_work/demo/map_red_iter.lus
@@ -12057,7 +11920,6 @@ tel
 type A_int_20 = int^20;
 type A_bool_20 = bool^20;
 type A_int_4 = int^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapdeRed.lus
 Opening file should_work/demo/mapdeRed.lus
@@ -12070,6 +11932,21 @@ 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;
@@ -12079,23 +11956,24 @@ returns (
 	T:A_A_int_2_3;
 	bid:int);
 let
-   (bid, T) = fill<<_node_alias_1_Lustre::fill, 3>>(init2);
-   r = red<<_node_alias_2_Lustre::map, 3>>(init, T);
+   (bid, T) = fill<<mapdeRed::n_node_alias, 3>>(init2);
+   r = red<<mapdeRed::n_node_alias_2, 3>>(init, T);
 tel
 -- end of node mapdeRed::mapdeRed
 -- automatically defined aliases:
-type A_A_int_2_3 = A_int_2^3;
 type A_int_2 = int^2;
-node _node_alias_2_Lustre::map(i1:A_int_2; i2:A_int_2) returns (o:A_int_2);
-let
-  o = Lustre::map<<Lustre::plus, 2>>(i1,i2);
-tel
-node _node_alias_1_Lustre::fill(i:int) returns (accu:int; s:A_int_2);
+type A_A_int_2_3 = A_int_2^3;
+----------------------------------------------------------------------
+====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapinf.lus
+Opening file should_work/demo/mapinf.lus
+node mapinf::mapinf(t1:A_int_10; t2:A_int_10) returns (res:A_bool_10);
 let
-  accu = Lustre::fill<<mapdeRed::incr, 2>>(i);
+   res = map<<Lustre::ilt, 10>>(t1, t2);
 tel
-
-
+-- end of node mapinf::mapinf
+-- automatically defined aliases:
+type A_int_10 = int^10;
+type A_bool_10 = bool^10;
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mapiter.lus
 Opening file should_work/demo/mapiter.lus
@@ -12104,20 +11982,19 @@ 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<<_node_alias_1_Lustre::map, 3>>(i1);
+   s1 = map<<mapiter::n_node_alias, 3>>(i1);
 tel
 -- end of node mapiter::mapiter
 -- automatically defined aliases:
 type A_A_int_7_3 = A_int_7^3;
 type A_int_7 = int^7;
-node _node_alias_1_Lustre::map(a:A_int_7) returns (b:A_int_7);
-let
-  b = Lustre::map<<mapiter::incr_tab, 7>>(a);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/mappredef.lus
 Opening file should_work/demo/mappredef.lus
@@ -12149,7 +12026,6 @@ tel
 -- automatically defined aliases:
 type A_bool_3 = bool^3;
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/plus.lus
 Opening file should_work/demo/plus.lus
@@ -12186,7 +12062,6 @@ tel
 -- end of node plus::plus
 -- automatically defined aliases:
 type A_bool_2 = bool^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/pre_x.lus
 Opening file should_work/demo/pre_x.lus
@@ -12211,7 +12086,6 @@ let
 tel
 -- end of node pre_x::pre_x
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/rediter.lus
 Opening file should_work/demo/rediter.lus
@@ -12223,20 +12097,19 @@ let
    _v1 = 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<<_node_alias_1_Lustre::red, 3>>(0, a);
+   b = red<<rediter::n_node_alias, 3>>(0, a);
 tel
 -- end of node rediter::rediter
 -- automatically defined aliases:
 type A_A_int_5_3 = A_int_5^3;
 type A_int_5 = int^5;
-node _node_alias_1_Lustre::red(init:int; a:A_int_5) returns (b:int);
-let
-  b = Lustre::red<<rediter::max, 5>>(init,a);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/redoptest.lus
 Opening file should_work/demo/redoptest.lus
@@ -12248,20 +12121,19 @@ let
    _v1 = 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<<_node_alias_1_Lustre::red, 3>>(0, a);
+   b = red<<redoptest::n_node_alias, 3>>(0, a);
 tel
 -- end of node redoptest::redoptest
 -- automatically defined aliases:
-type A_A_int_5_3 = A_int_5^3;
 type A_int_5 = int^5;
-node _node_alias_1_Lustre::red(i1:int; i2:A_int_5) returns (o:int);
-let
-  o = Lustre::red<<Lustre::plus, 5>>(i1,i2);
-tel
-
-
+type A_A_int_5_3 = A_int_5^3;
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/demo/sample_time_change.lus
 Opening file should_work/demo/sample_time_change.lus
@@ -12406,7 +12278,6 @@ let
 tel
 -- end of node sample_time_change::MainNode
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/bob.lus
 Opening file should_work/fab_test/bob.lus
@@ -12430,7 +12301,6 @@ let
 tel
 -- end of node bob::bob
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/def.lus
 Opening file should_work/fab_test/def.lus
@@ -12441,7 +12311,6 @@ let
 tel
 -- end of node def::def
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/ex.lus
 Opening file should_work/fab_test/ex.lus
@@ -12471,7 +12340,6 @@ let
 tel
 -- end of node ex::ex
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/iter.lus
 Opening file should_work/fab_test/iter.lus
@@ -12515,7 +12383,7 @@ var
 let
    (bidon, T_inter) = fill<<iter::filled, 5>>(init);
    Tab_out = map<<iter::mapped, 5>>(T_inter);
-   Red_plus = red<<Lustre::plus, 5>>(_v1, Tab_out);
+   Red_plus = red<<Lustre::iplus, 5>>(_v1, Tab_out);
    _v1 = -100;
    (zorroAcc, zorroTab) = fillred<<iter::garcia, 5>>(0, _v2);
    _v2 = [0, 0, 0, 0, 0];
@@ -12528,7 +12396,6 @@ tel
 -- end of node iter::plus
 -- automatically defined aliases:
 type A_int_5 = int^5;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/iterate.lus
 Opening file should_work/fab_test/iterate.lus
@@ -12614,7 +12481,6 @@ tel
 -- end of node iterate::iterate
 -- automatically defined aliases:
 type A_int_10 = int^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/lecteur.lus
 Opening file should_work/fab_test/lecteur.lus
@@ -12714,7 +12580,6 @@ let
 tel
 -- end of node lecteur::lecteur
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/lucky.lus
 Opening file should_work/fab_test/lucky.lus
@@ -12825,7 +12690,6 @@ let
 tel
 -- end of node lucky::lucky
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel.lus
 Opening file should_work/fab_test/morel.lus
@@ -12939,7 +12803,6 @@ tel
 type A_bool_3 = bool^3;
 type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel2.lus
 Opening file should_work/fab_test/morel2.lus
@@ -13042,7 +12905,6 @@ tel
 type A_bool_3 = bool^3;
 type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel3.lus
 Opening file should_work/fab_test/morel3.lus
@@ -13150,7 +13012,6 @@ tel
 type A_bool_3 = bool^3;
 type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel4.lus
 Opening file should_work/fab_test/morel4.lus
@@ -13277,7 +13138,6 @@ tel
 type A_bool_3 = bool^3;
 type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/morel5.lus
 Opening file should_work/fab_test/morel5.lus
@@ -13418,7 +13278,6 @@ type A_A_int_2_2 = A_int_2^2;
 type A_bool_3 = bool^3;
 type A_int_2 = int^2;
 type A_A_int_2_3 = A_int_2^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/noAlarm.lus
 Opening file should_work/fab_test/noAlarm.lus
@@ -13428,7 +13287,6 @@ let
 tel
 -- end of node noAlarm::noAlarm
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/notTwo.lus
 Opening file should_work/fab_test/notTwo.lus
@@ -13441,7 +13299,6 @@ let
 tel
 -- end of node notTwo::notTwo
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/onlyroll.lus
 Opening file should_work/fab_test/onlyroll.lus
@@ -14556,7 +14413,6 @@ let
 tel
 -- end of node onlyroll::InHardoverRange
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/onlyroll2.lus
 Opening file should_work/fab_test/onlyroll2.lus
@@ -15671,7 +15527,6 @@ let
 tel
 -- end of node onlyroll2::InHardoverRange
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/test.lus
 Opening file should_work/fab_test/test.lus
@@ -15733,7 +15588,6 @@ let
 tel
 -- end of node test::test
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/titi.lus
 Opening file should_work/fab_test/titi.lus
@@ -15746,7 +15600,6 @@ let
 tel
 -- end of node titi::titi
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toolate.lus
 Opening file should_work/fab_test/toolate.lus
@@ -15873,7 +15726,6 @@ type A_int_2 = int^2;
 type A_int_5 = int^5;
 type A_int_3 = int^3;
 type A_A_int_5_6 = A_int_5^6;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/fab_test/toto.lus
 Opening file should_work/fab_test/toto.lus
@@ -15892,7 +15744,6 @@ let
 tel
 -- end of node toto::toto
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/FillFollowedByRed.lus
 Opening file should_work/lionel/FillFollowedByRed.lus
@@ -15935,7 +15786,6 @@ tel
 -- end of node FillFollowedByRed::FillFollowedByRed
 -- automatically defined aliases:
 type A_real_10 = real^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/Gyroscope.lus
 Opening file should_work/lionel/Gyroscope.lus
@@ -16386,7 +16236,6 @@ type A_A__Gyroscope::Faulty_ChannelT_4_3 = A__Gyroscope::Faulty_ChannelT_4^3;
 type A__Gyroscope::Faulty_ChannelT_4 = _Gyroscope::Faulty_ChannelT^4;
 type A_real_3 = real^3;
 type A__Gyroscope::Valid_ChannelT_4 = _Gyroscope::Valid_ChannelT^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/produitBool.lus
 Opening file should_work/lionel/ProduitBool/produitBool.lus
@@ -16578,7 +16427,6 @@ tel
 type A_A_bool_20_10 = A_bool_20^10;
 type A_bool_10 = bool^10;
 type A_bool_20 = bool^20;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shiftFill_ludic.lus
 Opening file should_work/lionel/ProduitBool/shiftFill_ludic.lus
@@ -16686,7 +16534,6 @@ tel
 -- end of node shiftFill_ludic::n_shiftFill
 -- automatically defined aliases:
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/ProduitBool/shift_ludic.lus
 Opening file should_work/lionel/ProduitBool/shift_ludic.lus
@@ -16813,7 +16660,6 @@ tel
 -- automatically defined aliases:
 type A_bool_20 = bool^20;
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/arrays.lus
 Opening file should_work/lionel/arrays.lus
@@ -16830,21 +16676,56 @@ 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<<_node_alias_1_Lustre::red, 2>>(0, x);
+   s = red<<arrays::n_node_alias_2, 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<<_node_alias_2_Lustre::red, 2>>(false, x);
+   s = red<<arrays::n_node_alias_4, 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<<_node_alias_3_Lustre::fill, 2>>(init);
+   (accout, x) = fill<<arrays::n_node_alias_6, 2>>(init);
 tel
 -- end of node arrays::big_incr
 
@@ -16868,6 +16749,30 @@ 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) 
@@ -16876,12 +16781,22 @@ returns (
 var
    co:bool;
 let
-   (co, s) = fillred<<_node_alias_4_Lustre::fillred, 2>>(false, x, y);
+   (co, s) = fillred<<arrays::n_node_alias_8, 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<<_node_alias_5_Lustre::red, 2>>(false, x);
+   s = red<<arrays::n_node_alias_10, 2>>(false, x);
 tel
 -- end of node arrays::big_xor
 
@@ -16915,55 +16830,13 @@ let
 tel
 -- end of node arrays::add_byte
 -- automatically defined aliases:
-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_bool_4 = bool^4;
-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_bool_4_3 = A_bool_4^3;
 type A_int_4 = int^4;
-node _node_alias_4_Lustre::fillred(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 = Lustre::fillred<<_node_alias_6_Lustre::fillred, 3>>(ci,x,y);
-tel
-node _node_alias_5_Lustre::red(i1:bool; i2:A_A_bool_4_3) returns (o:bool);
-let
-  o = Lustre::red<<_node_alias_7_Lustre::red, 3>>(i1,i2);
-tel
-node _node_alias_3_Lustre::fill(accin:int) returns (accout:int; val:A_A_int_4_3);
-let
-  accout = Lustre::fill<<_node_alias_8_Lustre::fill, 3>>(accin);
-tel
-node _node_alias_2_Lustre::red(i1:bool; i2:A_A_bool_4_3) returns (o:bool);
-let
-  o = Lustre::red<<_node_alias_9_Lustre::red, 3>>(i1,i2);
-tel
-node _node_alias_1_Lustre::red(i1:int; i2:A_A_int_4_3) returns (o:int);
-let
-  o = Lustre::red<<_node_alias_10_Lustre::red, 3>>(i1,i2);
-tel
-
-node _node_alias_8_Lustre::fill(accin:int) returns (accout:int; val:A_int_4);
-let
-  accout = Lustre::fill<<arrays::incr, 4>>(accin);
-tel
-node _node_alias_7_Lustre::red(i1:bool; i2:A_bool_4) returns (o:bool);
-let
-  o = Lustre::red<<Lustre::xor, 4>>(i1,i2);
-tel
-node _node_alias_6_Lustre::fillred(ci:bool; x:A_bool_4; y:A_bool_4) returns (co:bool; s:A_bool_4);
-let
-  co = Lustre::fillred<<arrays::full_adder, 4>>(ci,x,y);
-tel
-node _node_alias_10_Lustre::red(i1:int; i2:A_int_4) returns (o:int);
-let
-  o = Lustre::red<<Lustre::plus, 4>>(i1,i2);
-tel
-node _node_alias_9_Lustre::red(i1:bool; i2:A_bool_4) returns (o:bool);
-let
-  o = Lustre::red<<Lustre::or, 4>>(i1,i2);
-tel
-
-
+type A_A_int_4_3 = A_int_4^3;
+type A_A_A_int_4_3_2 = A_A_int_4_3^2;
+type A_A_int_4_3 = A_int_4^3;
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/calculs_max.lus
 Opening file should_work/lionel/calculs_max.lus
@@ -17097,7 +16970,6 @@ tel
 -- automatically defined aliases:
 type A_int_10 = int^10;
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/deSimone.lus
 Opening file should_work/lionel/deSimone.lus
@@ -17178,7 +17050,6 @@ tel
 -- end of node deSimone::prop1
 -- automatically defined aliases:
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/iterFibo.lus
 Opening file should_work/lionel/iterFibo.lus
@@ -17214,7 +17085,6 @@ tel
 -- automatically defined aliases:
 type A_int_10 = int^10;
 type A_int_2 = int^2;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/mapiter.lus
 Opening file should_work/lionel/mapiter.lus
@@ -17232,11 +17102,6 @@ let
    _v2 = init + 1;
 tel
 -- end of node mapiter::incr
-node mapiter::map_egal(i1:A_a_2; i2:A_a_2) returns (o:A_bool_2);
-let
-   o = Lustre::map<<Lustre::equal, 2>>(i1, i2);
-tel
--- end of node mapiter::map_egal
 node mapiter::bitalt(in:bool) returns (sacc:bool; out:bool);
 let
    sacc = not in;
@@ -17264,13 +17129,28 @@ let
 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::equal, 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::equal, 2>>(i1, i2);
+tel
+-- end of node mapiter::map_egal
+
 node mapiter::composemat(
 	i1:A_A_bool_2_3;
 	i2:A_A_bool_2_3) 
 returns (
 	s1:A_A_bool_2_3);
 let
-   s1 = map<<_node_alias_1_Lustre::map, 3>>(i1, i2);
+   s1 = map<<mapiter::n_node_alias, 3>>(i1, i2);
 tel
 -- end of node mapiter::composemat
 node mapiter::mapiter(a:bool) returns (nbTrue:int);
@@ -17291,14 +17171,7 @@ tel
 -- end of node mapiter::mapiter
 -- automatically defined aliases:
 type A_A_bool_2_3 = A_bool_2^3;
-type A_a_2 = a^2;
 type A_bool_2 = bool^2;
-node _node_alias_1_Lustre::map(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2);
-let
-  o = Lustre::map<<Lustre::equal, 2>>(i1,i2);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice.lus
 Opening file should_work/lionel/matrice.lus
@@ -17325,6 +17198,21 @@ 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 (
@@ -17334,36 +17222,31 @@ returns (
 var
    _v1:A_int_2;
 let
-   (bid, T) = fill<<_node_alias_1_Lustre::fill, 2>>(_v1);
+   (bid, T) = fill<<matrice::n_node_alias, 2>>(_v1);
    _v1 = [a, a];
-   sum = red<<_node_alias_2_Lustre::red, 2>>(0, T);
+   sum = red<<matrice::n_node_alias_2, 2>>(0, T);
 tel
 -- end of node matrice::matrice
 -- automatically defined aliases:
 type A_int_2 = int^2;
 type A_A_int_3_2 = A_int_3^2;
 type A_int_3 = int^3;
-node _node_alias_2_Lustre::red(i1:int; i2:A_int_3) returns (o:int);
-let
-  o = Lustre::red<<Lustre::plus, 3>>(i1,i2);
-tel
-node _node_alias_1_Lustre::fill(accu_in:A_int_2) returns (accu_out:A_int_2; elt:A_int_3);
-let
-  accu_out = Lustre::fill<<matrice::fibo, 3>>(accu_in);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/matrice2.lus
 Opening file should_work/lionel/matrice2.lus
 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
    _v1:A_int_2;
    _v2:A_A_int_2_2;
 let
-   res = red<<_node_alias_1_Lustre::red, 2>>(0, _v2);
+   res = red<<matrice2::n_node_alias, 2>>(0, _v2);
    _v1 = 1^2;
    _v2 = _v1^2;
 tel
@@ -17371,23 +17254,38 @@ tel
 -- automatically defined aliases:
 type A_A_int_2_2 = A_int_2^2;
 type A_int_2 = int^2;
-node _node_alias_1_Lustre::red(i1:int; i2:A_int_2) returns (o:int);
-let
-  o = Lustre::red<<Lustre::plus, 2>>(i1,i2);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/minus.lus
 Opening file should_work/lionel/minus.lus
 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;
@@ -17404,11 +17302,11 @@ var
    _v3:A_bool_3;
    _v4:bool;
 let
-   T1 = map<<_node_alias_1_Lustre::map, 2>>(a, b, c);
-   (bid, T2) = fill<<_node_alias_2_Lustre::fill, 2>>(_v2);
+   T1 = map<<minus::n_node_alias, 2>>(a, b, c);
+   (bid, T2) = fill<<minus::n_node_alias_2, 2>>(_v2);
    _v1 = a[0];
    _v2 = _v1[0];
-   r = red<<_node_alias_3_Lustre::red, 2>>(_v4, T1);
+   r = red<<minus::n_node_alias_3, 2>>(_v4, T1);
    _v3 = a[0];
    _v4 = _v3[0];
 tel
@@ -17416,20 +17314,6 @@ tel
 -- automatically defined aliases:
 type A_A_bool_3_2 = A_bool_3^2;
 type A_bool_3 = bool^3;
-node _node_alias_2_Lustre::fill(a:bool) returns (out:bool; b:A_bool_3);
-let
-  out = Lustre::fill<<minus::bitalt, 3>>(a);
-tel
-node _node_alias_3_Lustre::red(i1:bool; i2:A_bool_3) returns (o:bool);
-let
-  o = Lustre::red<<Lustre::xor, 3>>(i1,i2);
-tel
-node _node_alias_1_Lustre::map(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
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/moyenne.lus
 Opening file should_work/lionel/moyenne.lus
@@ -17476,7 +17360,6 @@ tel
 -- end of node moyenne::moyenne
 -- automatically defined aliases:
 type A_real_10 = real^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/normal.lus
 Opening file should_work/lionel/normal.lus
@@ -17857,7 +17740,6 @@ type A_bool_20 = bool^20;
 type A_A_bool_20_4 = A_bool_20^4;
 type A_A_int_20_4 = A_int_20^4;
 type A_int_20 = int^20;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/pipeline.lus
 Opening file should_work/lionel/pipeline.lus
@@ -17892,7 +17774,6 @@ tel
 -- end of node pipeline::pipeline
 -- automatically defined aliases:
 type A_bool_10 = bool^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/predefOp.lus
 Opening file should_work/lionel/predefOp.lus
@@ -17918,6 +17799,11 @@ 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) 
@@ -17925,22 +17811,37 @@ returns (
 	sacc:bool;
 	R:A_A_bool_2_3);
 let
-   (sacc, R) = fill<<_node_alias_1_Lustre::fill, 3>>(iacc);
+   (sacc, R) = fill<<predefOp::n_node_alias, 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<<_node_alias_2_Lustre::map, 3>>(i1, i2);
+   s1 = map<<predefOp::n_node_alias_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<<_node_alias_3_Lustre::red, 3>>(iacc, I);
+   res = red<<predefOp::n_node_alias_3, 3>>(iacc, I);
 tel
 -- end of node predefOp::reducematbool
 
@@ -17964,6 +17865,26 @@ 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) 
@@ -17971,8 +17892,8 @@ returns (
 	s1:A_A_int_2_3;
 	s2:A_A_bool_2_3);
 let
-   s1 = map<<_node_alias_4_Lustre::map, 3>>(i1, i2);
-   s2 = map<<_node_alias_5_Lustre::map, 3>>(i1, i2);
+   s1 = map<<predefOp::n_node_alias_4, 3>>(i1, i2);
+   s2 = map<<predefOp::n_node_alias_5, 3>>(i1, i2);
 tel
 -- end of node predefOp::composematint
 node predefOp::incremental(iacc:int) returns (oacc:int; res:int);
@@ -17981,14 +17902,24 @@ 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<<_node_alias_6_Lustre::red, 3>>(iacc, I);
+   res = red<<predefOp::n_node_alias_6, 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<<_node_alias_7_Lustre::fill, 3>>(iacc);
+   (sacc, R) = fill<<predefOp::n_node_alias_7, 3>>(iacc);
 tel
 -- end of node predefOp::initmatint
 
@@ -18017,36 +17948,6 @@ type A_int_2 = int^2;
 type A_A_bool_2_3 = A_bool_2^3;
 type A_A_int_2_3 = A_int_2^3;
 type A_bool_2 = bool^2;
-node _node_alias_1_Lustre::fill(iacc:bool) returns (oacc:bool; res:A_bool_2);
-let
-  oacc = Lustre::fill<<predefOp::bitalt, 2>>(iacc);
-tel
-node _node_alias_7_Lustre::fill(iacc:int) returns (oacc:int; res:A_int_2);
-let
-  oacc = Lustre::fill<<predefOp::incremental, 2>>(iacc);
-tel
-node _node_alias_3_Lustre::red(init:int; b:A_bool_2) returns (res:int);
-let
-  res = Lustre::red<<predefOp::incr, 2>>(init,b);
-tel
-node _node_alias_4_Lustre::map(i1:A_int_2; i2:A_int_2) returns (o:A_int_2);
-let
-  o = Lustre::map<<Lustre::div, 2>>(i1,i2);
-tel
-node _node_alias_5_Lustre::map(i1:A_int_2; i2:A_int_2) returns (o:A_bool_2);
-let
-  o = Lustre::map<<Lustre::gte, 2>>(i1,i2);
-tel
-node _node_alias_2_Lustre::map(i1:A_bool_2; i2:A_bool_2) returns (o:A_bool_2);
-let
-  o = Lustre::map<<Lustre::impl, 2>>(i1,i2);
-tel
-node _node_alias_6_Lustre::red(i1:int; i2:A_int_2) returns (o:int);
-let
-  o = Lustre::red<<Lustre::plus, 2>>(i1,i2);
-tel
-
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/redIf.lus
 Opening file should_work/lionel/redIf.lus
@@ -18062,7 +17963,6 @@ tel
 -- end of node redIf::redIf
 -- automatically defined aliases:
 type A_bool_3 = bool^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/simpleRed.lus
 Opening file should_work/lionel/simpleRed.lus
@@ -18072,13 +17972,12 @@ node simpleRed::simpleRed(a:int) returns (res:int);
 var
    _v1:A_int_3;
 let
-   res = red<<Lustre::plus, 3>>(0, _v1);
+   res = red<<Lustre::iplus, 3>>(0, _v1);
    _v1 = a^3;
 tel
 -- end of node simpleRed::simpleRed
 -- automatically defined aliases:
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/testSilus.lus
 Opening file should_work/lionel/testSilus.lus
@@ -18399,7 +18298,6 @@ type A_bool_20 = bool^20;
 type A_A_bool_20_4 = A_bool_20^4;
 type A_A_int_20_4 = A_int_20^4;
 type A_int_20 = int^20;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/lionel/triSel.lus
 Opening file should_work/lionel/triSel.lus
@@ -18658,7 +18556,6 @@ tel
 -- end of node triSel::Sorted
 -- automatically defined aliases:
 type A_int_50 = int^50;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/Condact.lus
 Opening file should_work/packEnvTest/Condact.lus
@@ -18692,7 +18589,6 @@ let
 tel
 -- end of node Main::Condact
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/complex.lus
 Opening file should_work/packEnvTest/complex.lus
@@ -18704,7 +18600,6 @@ let
 tel
 -- end of node complex::re
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
 Opening file should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
@@ -18758,7 +18653,6 @@ tel
 -- end of node contractForElementSelectionInArray::selectEltInArray
 -- automatically defined aliases:
 type A_int_10 = int^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/main.lus
 Opening file should_work/packEnvTest/contractForElementSelectionInArray/main.lus
@@ -18776,11 +18670,6 @@ let
    res = util::igt(i, j);
 tel
 -- end of node intArray::_isGreaterThan_
-node intArray::_isEqualTo_(i1:a; i2:a) returns (o:bool);
-let
-   o = Lustre::equal(i1, i2);
-tel
--- end of node intArray::_isEqualTo_
 type _intArray::T_isElementOf_ = struct  {eltToSearch : int; iselementof : bool};
 
 node intArray::iterated_isElementOf_(
@@ -19267,7 +19156,6 @@ tel
 -- end of node main::main
 -- automatically defined aliases:
 type A_int_10 = int^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus
 Opening file should_work/packEnvTest/contractForElementSelectionInArray/noeudsIndependants.lus
@@ -19282,7 +19170,6 @@ let
 tel
 -- end of node noeudsIndependants::gt
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus
 Opening file should_work/packEnvTest/contractForElementSelectionInArray/packageTableau.lus
@@ -19530,7 +19417,6 @@ tel
 -- end of node tri::Sorted
 -- automatically defined aliases:
 type A_int_10 = int^10;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/iter.lus
 Opening file should_work/packEnvTest/iter.lus
@@ -19553,7 +19439,6 @@ tel
 -- end of node main::main
 -- automatically defined aliases:
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/model.lus
 Opening file should_work/packEnvTest/model.lus
@@ -19567,7 +19452,6 @@ let
 tel
 -- end of node pint::fby1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/modelInst.lus
 Opening file should_work/packEnvTest/modelInst.lus
@@ -19623,7 +19507,6 @@ let
 tel
 -- end of node main::main
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages.lus
 Opening file should_work/packEnvTest/packages.lus
@@ -19690,7 +19573,6 @@ tel
 -- end of node mainPack::preced
 const inter::n = -4;
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/packages2.lus
 Opening file should_work/packEnvTest/packages2.lus
@@ -19755,13 +19637,12 @@ let
 tel
 -- end of node main::foo
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/packEnvTest/polymorphic_pack.lus
 Opening file should_work/packEnvTest/polymorphic_pack.lus
 type _p::t = int;
 const p::size = 3;
-node p::n(i1:o; i2:o) returns (o:o);
+node p::n(i1:int; i2:int) returns (o:int);
 let
    o = Lustre::plus(i1, i2);
 tel
@@ -19773,7 +19654,6 @@ tel
 -- end of node p::map2
 -- automatically defined aliases:
 type A_int_3 = int^3;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_work/to_sort_out/asservi.lus
 Opening file should_work/to_sort_out/asservi.lus
@@ -19936,7 +19816,6 @@ let
    p = asservi::make_pend(x0, y0, x, y);
 tel
 -- end of node asservi::asservi
-
 Those tests are supposed to generate errors
 Opening file do_not_exist.lus
 do_not_exist.lus: No such file or directory
@@ -20058,7 +19937,6 @@ let
 tel
 -- end of node activation1::activation1
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/activation2.lus
 Opening file should_fail/semantics/activation2.lus
@@ -20111,7 +19989,6 @@ let
 tel
 -- end of node activation2::activation2
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/bad_call01.lus
 Opening file should_fail/semantics/bad_call01.lus
@@ -20277,7 +20154,6 @@ type A_int_2 = int^2;
 type A_int_5 = int^5;
 type A_int_3 = int^3;
 type A_A_int_5_6 = A_int_5^6;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/const.lus
 Opening file should_fail/semantics/const.lus
@@ -20321,7 +20197,6 @@ let
 tel
 -- end of node cpt_dc::cpt_dc
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/def.lus
 Opening file should_fail/semantics/def.lus
@@ -20359,7 +20234,6 @@ tel
 -- end of node def::def
 -- automatically defined aliases:
 type A_int_4 = int^4;
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/import2.lus
 Opening file should_fail/semantics/import2.lus
@@ -20415,7 +20289,6 @@ let
 tel
 -- end of node piege::piege
 
-
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/semantics/tranche.lus
 Opening file should_fail/semantics/tranche.lus
@@ -20460,6 +20333,31 @@ Opening file should_fail/type/Gyro.lus
 *** syntax error
 
 
+----------------------------------------------------------------------
+====> ../lus2lic -vl 2 --compile-all-items should_fail/type/bad_call03.lus
+Opening file should_fail/type/bad_call03.lus
+node bad_call03::titi(c:A_real_3; d:A_real_3) returns (y:A_real_3);
+let
+   y = bad_call03::toto(c, d);
+tel
+-- end of node bad_call03::titi
+
+node bad_call03::bad_call03(
+	a:A_int_3;
+	b:A_int_3;
+	c:A_real_3;
+	d:A_real_3) 
+returns (
+	x:A_int_3;
+	y:A_real_3);
+let
+   x = bad_call03::toto(a, b);
+   y = bad_call03::toto(c, d);
+tel
+-- end of node bad_call03::bad_call03
+-- automatically defined aliases:
+type A_int_3 = int^3;
+type A_real_3 = real^3;
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 2 --compile-all-items should_fail/type/const2.lus
 Opening file should_fail/type/const2.lus
@@ -20482,7 +20380,7 @@ type _const2::t8 = A_A_A_A_A_A_int_3_7_8_9_3_8^8;
 *** Error in file "should_fail/type/const2.lus", line 16, col 12 to 13, token '<>':
 *** type error: 
 *** type 'int*real' was provided whereas
-*** type 'a*a' was expected
+*** type ''a*'a' was expected
 *** 
 *** int and real are not unifiable
 
diff --git a/src/unifyType.ml b/src/unifyType.ml
index 51785ad8..b9bc6213 100644
--- a/src/unifyType.ml
+++ b/src/unifyType.ml
@@ -1,4 +1,4 @@
-(** Time-stamp: <modified the 15/09/2008 (at 18:14) by Erwan Jahier> *)
+(** Time-stamp: <modified the 10/12/2008 (at 16:41) by Erwan Jahier> *)
 
 open Eff
 
@@ -8,7 +8,7 @@ type t =
   | Unif of Eff.type_
   | Ko of string (* a msg explaining why the unification failed *)
 
-let teff2str = LicDump.string_of_type_eff
+let teff2str = LicDump.string_of_type_eff4msg
 
 let (is_overloadable : Eff.type_ -> bool) = function
   | Int_type_eff -> true
@@ -141,6 +141,13 @@ let gen_unifiable_typeff_of_size size =
   in
     aux [] []
 
+
+let (type_eff_list_to_string : Eff.type_ list -> string) =
+  fun tel -> 
+    let str_l = List.map LicDump.string_of_type_eff4msg tel in
+      String.concat "*" str_l    
+
+
 let unit_test () = 
   assert( f [i;r;b] [i;r;b] = Equal  );
   assert( f [i;r;b] [i;r;a] = Unif b );
@@ -158,7 +165,7 @@ let unit_test () =
     let (tl1, tl2) = gen_unifiable_typeff_of_size (1+ Random.int 10) in
       Verbose.print_string ~level:3 (
 	" ==> try UnifyType.proposition1 with lists " ^ 
-	  (LicDump.type_eff_list_to_string tl1) ^ " and " ^ 
-	  (LicDump.type_eff_list_to_string tl2) ^ "\n");
+	  (type_eff_list_to_string tl1) ^ " and " ^ 
+	  (type_eff_list_to_string tl2) ^ "\n");
       assert (proposition1 tl1 tl2)
   done
-- 
GitLab