From 5586d3222910ab197ed5a22577a61a25c22b74ed Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Fri, 14 Mar 2008 15:08:50 +0100
Subject: [PATCH] Fix some non-reg tests lustre files.

---
 src/TODO                                      |  10 +-
 src/test/should_fail/clock/clock.lus          |   6 +-
 src/test/should_work/NONREG/simple.lus        |   9 +-
 src/test/should_work/demo/decl.lus            |   8 +-
 src/test/should_work/lionel/triSel.lus        |  66 ++---
 .../contractForElementSelectionInArray.lus    |   2 +-
 .../tri.lus                                   |  11 +-
 src/test/test.res.exp                         | 265 +++++++++++++++++-
 8 files changed, 319 insertions(+), 58 deletions(-)

diff --git a/src/TODO b/src/TODO
index e8860e8a..a9d5eb66 100644
--- a/src/TODO
+++ b/src/TODO
@@ -4,8 +4,8 @@
 * instanciation de package <<locaux>> à d'autre package interdite
 pour l'instant, alors que ca marchait chez Youssef.
 
-* should_work/packEnvTest/packages2.lus : le package principal est
-implicite. Autorise-t'on ce genre de truc ?
+* should_work/packEnvTest/packages2.lus : il y a des package +
+le package principal est implicite. Autorise-t'on ce genre de mélange ?
 
 * should_work/NONREG/simple.lus
 	declaration de structure en ligne ???
@@ -34,7 +34,13 @@ implicite. Autorise-t'on ce genre de truc ?
 * verifier que chacun des exemples du repertoire "should_fail" à une
 correspondance dans le manuel, et reciproquement...
 
+* que fait-on des constantes réelle ?
+par exemple, dans test/should_work/NONREG/simple.lus, 
 
+	const right = pi/2.;
+
+est evalué (+ warning) alors qu'on ne devrait pas je trouve.
+ -> à discuter
 
 ***********************************************************************************
 *** a faire
diff --git a/src/test/should_fail/clock/clock.lus b/src/test/should_fail/clock/clock.lus
index 81cf8e58..86512949 100644
--- a/src/test/should_fail/clock/clock.lus
+++ b/src/test/should_fail/clock/clock.lus
@@ -1,13 +1,13 @@
 
 -- Entee sur entree
-node clock2(u: bool; v: bool when u) returns (y: bool );
+extern node clock2(u: bool; v: bool when u) returns (y: bool );
 
 -- Sortie sur sortie
-node clock3(u: bool) returns (x: bool; y: bool when x);
+extern node clock3(u: bool) returns (x: bool; y: bool when x);
 
 
 -- Entree sur entree et sortie sur sortie
-node clock4(u: bool; v: bool when u) returns (x: bool; y: bool when x);
+extern node clock4(u: bool; v: bool when u) returns (x: bool; y: bool when x);
 
 -- Noeud principale.
 node clock(a: bool; b: bool) returns (c: bool; d: bool when c);
diff --git a/src/test/should_work/NONREG/simple.lus b/src/test/should_work/NONREG/simple.lus
index 267ec45c..1bf0f5af 100644
--- a/src/test/should_work/NONREG/simple.lus
+++ b/src/test/should_work/NONREG/simple.lus
@@ -1,5 +1,6 @@
 type T=int;
-type U = {a:int; b:{x:S; y:T}};
+type H = {x:S; y:T};
+type U = {a:int; b:H};
 type S;
 type V = U^4;
 type W = T^(size+2);
@@ -10,11 +11,11 @@ const pi = 3.1416;
 const right = pi/2.;
 const u = #(true, false, true);
 
-function f1 (x: int) returns (y: int);
+extern function f1 (x: int) returns (y: int);
 
-function f2 (u,v: int) returns (s: int; t: bool);
+extern function f2 (u,v: int) returns (s: int; t: bool);
 
-node simple(e:bool; a:{x:int,z:int}) returns (b: int);
+node simple(e:bool; a:U) returns (b: int);
 var x: int;
 let x=a.x;
 	b= x+1;
diff --git a/src/test/should_work/demo/decl.lus b/src/test/should_work/demo/decl.lus
index b4e83915..6dadd870 100644
--- a/src/test/should_work/demo/decl.lus
+++ b/src/test/should_work/demo/decl.lus
@@ -16,16 +16,16 @@ type
   t1, t2, t3;
   t4 = t1^(2*g);
   t5 = t4^(2*h+1);
-  coord = {x: real,  y: real};
+  coord = {x: real;  y: real};
   couleur = enum {bleu, blanc, rouge};
   coord_tab = coord^(2*g-7);
 
 ---------------------------------
 -- noeuds et fonctions externes : 
 ---------------------------------
-node decl(a1, b1, c1: t1) returns (d1: bool);
-node n2(a1, b1, c1: t4; d1: bool) returns (e1: t5);
-function f1(a1, b1, c1: couleur) returns (d1: bool^h) ;
+extern node decl(a1, b1, c1: t1) returns (d1: bool);
+extern node n2(a1, b1, c1: t4; d1: bool) returns (e1: t5);
+extern function f1(a1, b1, c1: couleur) returns (d1: bool^h) ;
 
 ------------------------------------
 -- quelques erreurs de declaration : 
diff --git a/src/test/should_work/lionel/triSel.lus b/src/test/should_work/lionel/triSel.lus
index 35445330..fa335b24 100644
--- a/src/test/should_work/lionel/triSel.lus
+++ b/src/test/should_work/lionel/triSel.lus
@@ -24,22 +24,22 @@ const size = 50;        -- size of the arrays
 -----------
 type tabSize = int^size;
 
-type Sort_accu = {CurrentRank : int,
+type Sort_accu = {CurrentRank : int;
                   Tab : tabSize};
 
-type Exchange_accu = {MinVal : int,
-                      MinRank : int,
-                      RankFrom : int,
-                      CurrentVal : int,
+type Exchange_accu = {MinVal : int;
+                      MinRank : int;
+                      RankFrom : int;
+                      CurrentVal : int;
                       Rank : int};
 
-type Select_accu = {RankToFind : int,
-                    CurrentRank : int,
+type Select_accu = {RankToFind : int;
+                    CurrentRank : int;
                     Val : int};
 
-type MinFR_accu = {MinVal : int,
-                   MinRank : int,
-                   RankFrom : int,
+type MinFR_accu = {MinVal : int;
+                   MinRank : int;
+                   RankFrom : int;
                    Rank : int};
 
 
@@ -56,7 +56,7 @@ var
         UnarySort_accu_out : Sort_accu;
 let
         UnarySort_accu_out = red<<UnarySort;size>>(
-                                { CurrentRank = 0,
+                                { CurrentRank = 0;
                                            Tab = TIn},
                                 TIn);
         TSorted = UnarySort_accu_out.Tab;
@@ -88,9 +88,9 @@ var
 let
     --------------------------------------------------------------
     -- Find the minimum element (its rank and value) from the rank accu_in.CurrentRank
-        accu_out_min = red<<minFromRank;size>>( { MinVal = 0,          -- {0 :  value of the minimum in the begining of the iteration
-                                                            MinRank = 0,                                 --  0 :  rank of the minimum in the begining of the iteration
-                                                            RankFrom = accu_in.CurrentRank,              --  accu_in.CurrentRank :  Rank we have to look from for finding the minimum
+        accu_out_min = red<<minFromRank;size>>( { MinVal = 0;          -- {0 :  value of the minimum in the begining of the iteration
+                                                            MinRank = 0;                                 --  0 :  rank of the minimum in the begining of the iteration
+                                                            RankFrom = accu_in.CurrentRank;              --  accu_in.CurrentRank :  Rank we have to look from for finding the minimum
                                                             Rank = 0 },                                  --  0 : initialisation of the rank in the iteration
                                                 accu_in.Tab);
     --------------------------------------------------------------
@@ -100,8 +100,8 @@ let
 
     --------------------------------------------------------------
     -- Select the current element in the array (of rank accu_in.CurrentRank)
-        accu_out_select = red<<select;size>>( { RankToFind = accu_in.CurrentRank,
-                                                           CurrentRank = 0,
+        accu_out_select = red<<select;size>>( { RankToFind = accu_in.CurrentRank;
+                                                           CurrentRank = 0;
                                                            Val = 0 },
                                               accu_in.Tab);
     --------------------------------------------------------------
@@ -111,10 +111,10 @@ let
     ------------------------------------------------------------------------
     -- Exchange the two elements 'current' and 'minimum from current rank'
         accu_out_exchange, localTab = map_red<<Exchange_i_j;size>>(
-                                         { MinVal = accu_out_min.MinVal,
-                                                        MinRank = accu_out_min.MinRank,
-                                                        RankFrom = accu_out_select.RankToFind,
-                                                        CurrentVal = accu_out_select.Val,
+                                         { MinVal = accu_out_min.MinVal;
+                                                        MinRank = accu_out_min.MinRank;
+                                                        RankFrom = accu_out_select.RankToFind;
+                                                        CurrentVal = accu_out_select.Val;
                                                         Rank = 0 },
                                          accu_in.Tab);
     -----------------------------------------------------------------------
@@ -123,7 +123,7 @@ let
 
     -----------------------------------------------------------------------
     -- Update accumulator structure for next iteration
-        accu_out = { CurrentRank = accu_in.CurrentRank + 1, Tab = localTab };
+        accu_out = { CurrentRank = accu_in.CurrentRank + 1; Tab = localTab };
     ----------------------------------------------------------------------
    
 tel
@@ -151,7 +151,7 @@ let
              then if(TabEltIn<accu_in.MinVal)         -- I compare the current elt with the minimum of the elements already observed
                   then TabEltIn                               -- the current elt is smaller,      -- I thus remember it as the new minimum         
                   else accu_in.MinVal                 -- It's not a minimum,      -- I remember the one I observed before   
-             else accu_in.MinVal,                         -- I'm still not in the zone of the array       -- I want to search a minimum in        
+             else accu_in.MinVal;                          -- I'm still not in the zone of the array       -- I want to search a minimum in        
   --------------------------------------------------
 
 
@@ -164,7 +164,7 @@ let
               then if(TabEltIn<accu_in.MinVal)          
                    then accu_in.Rank                        
                    else accu_in.MinRank             
-              else accu_in.MinRank,                     
+              else accu_in.MinRank;                     
   -------------------------------------------------
 
 
@@ -173,7 +173,7 @@ let
 
   ------------------------------------------------
   -- accu_out.RankFrom
-  RankFrom = accu_in.RankFrom,                        -- Never changes (rank from which I want to start the search)
+  RankFrom = accu_in.RankFrom;                        -- Never changes (rank from which I want to start the search)
   ------------------------------------------------
 
                            
@@ -198,10 +198,10 @@ tel
 node Exchange_i_j(accu_in : Exchange_accu ; eltIn : int) 
         returns (accu_out : Exchange_accu ; eltOut : int);
 let
-        accu_out = { MinVal = accu_in.MinVal,
-                                  MinRank = accu_in.MinRank,
-                                  RankFrom = accu_in.RankFrom,
-                                  CurrentVal = accu_in.CurrentVal,
+        accu_out = { MinVal = accu_in.MinVal;
+                                  MinRank = accu_in.MinRank;
+                                  RankFrom = accu_in.RankFrom;
+                                  CurrentVal = accu_in.CurrentVal;
                                   Rank = accu_in.Rank + 1 };
 
         eltOut = if (accu_in.Rank = accu_in.MinRank)
@@ -225,8 +225,8 @@ tel
 node select(accu_in : Select_accu; elt : int) 
         returns (accu_out : Select_accu);
 let
-        accu_out = { RankToFind = accu_in.RankToFind,
-                                CurrentRank = accu_in.CurrentRank + 1,
+        accu_out = { RankToFind = accu_in.RankToFind;
+                                CurrentRank = accu_in.CurrentRank + 1;
                                 Val = if(accu_in.RankToFind=accu_in.CurrentRank)
                                       then elt
                                       else accu_in.Val };
@@ -251,7 +251,7 @@ tel
 
 -- Property :  
 -- is the array obtained by applying the "main" node sorted
-type sorted_iter_accu = { prev_elt :  int, 
+type sorted_iter_accu = { prev_elt :  int; 
                           prop_is_tt : bool };
 
 node Sorted(TIn : tabSize) 
@@ -260,13 +260,13 @@ var accu_out : sorted_iter_accu;
     TSorted : tabSize;
 let
   TSorted = main(TIn);
-  accu_out = red<<sorted_iter;size>>({prev_elt = 0, prop_is_tt = true}, TSorted);
+  accu_out = red<<sorted_iter;size>>({prev_elt = 0; prop_is_tt = true}, TSorted);
   ok = accu_out.prop_is_tt;
 tel
 
 node sorted_iter(accu_in : sorted_iter_accu; elt : int)
      returns(accu_out : sorted_iter_accu);
 let
-  accu_out = { prev_elt = elt, 
+  accu_out = { prev_elt = elt; 
                                prop_is_tt = (accu_in.prev_elt <= elt) and (accu_in.prop_is_tt) };
 tel
\ No newline at end of file
diff --git a/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus b/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
index 0ef32063..c6b0c78f 100644
--- a/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
+++ b/src/test/should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
@@ -6,7 +6,7 @@ type iteratedStruct = {currentRank : int; rankToSelect : int; elementSelected :
 node selectEltInArray(array : elementType^size; rankToSelect : int) returns (elementSelected : elementType);
 var iterationResult : iteratedStruct;
 let
-  iterationResult = red<<selectOneStage, size>>({0, rankToSelect, 0}, array);
+  iterationResult = red<<selectOneStage, size>>({currentRank=0; rankToSelect=rankToSelect; elementSelected=0}, array);
   elementSelected = iterationResult.elementSelected; 
 tel
 
diff --git a/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus b/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus
index 14c77e2d..400a492e 100644
--- a/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus
+++ b/src/test/should_work/packEnvTest/contractForElementSelectionInArray/tri.lus
@@ -178,8 +178,9 @@ var
 let
 	UnarySort_accu_out = red<<UnarySort,size>>(
                               Sort_accu{CurrentRank = 0;
-                                            Tab = [7,8,4,3,2,9,1,10,2,7]}; -- Values given for test
-                                            [7,8,4,3,2,9,1,10,2,7]);	-- same
+                                        Tab = [7,8,4,3,2,9,1,10,2,7]
+                                            },  -- Values given for test
+                                    [7,8,4,3,2,9,1,10,2,7]);	-- same
 	TSorted = UnarySort_accu_out.Tab;
 tel
 
@@ -202,7 +203,7 @@ tel
 
 -- Property
 -- is the array obtained by applying the "main" node sorted
-type sorted_iter_accu = {prev_elt :  int, 
+type sorted_iter_accu = {prev_elt :  int;
                          prop_is_tt : bool};
 
 
@@ -212,7 +213,7 @@ var accu_out : sorted_iter_accu;
     TSorted :  int^size;
 let
   TSorted = main(TIn);
-  accu_out = red<<sorted_iter,size>>(sorted_iter_accu{prev_elt = 0, prop_is_tt = true}, TSorted);
+  accu_out = red<<sorted_iter,size>>(sorted_iter_accu{prev_elt = 0; prop_is_tt = true}, TSorted);
   res = accu_out.prop_is_tt;
 tel
 
@@ -220,6 +221,6 @@ tel
 node sorted_iter(accu_in : sorted_iter_accu; elt : int)
      returns(accu_out : sorted_iter_accu);
 let
-  accu_out = sorted_iter_accu{prev_elt = elt, 
+  accu_out = sorted_iter_accu{prev_elt = elt;
               prop_is_tt = (accu_in.prev_elt <= elt) and (accu_in.prop_is_tt)};
 tel
\ No newline at end of file
diff --git a/src/test/test.res.exp b/src/test/test.res.exp
index 238734a9..30384c2e 100644
--- a/src/test/test.res.exp
+++ b/src/test/test.res.exp
@@ -2558,8 +2558,52 @@ End of Syntax table dump. 
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/NONREG/simple.lus
-*** Error in file "should_work/NONREG/simple.lus", line 2, col 20 to 20, token '{': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export type H
+       export type S
+       export type T
+       export type U
+       export type V
+       export type W
+       export const size
+       export const right
+       export const u
+       export const pi
+       export const c
+       export node simple
+       export node f1
+       export node f2
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		simple (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "simple::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+		type dummy::H =  {x : dummy::S; y : int}
+		type dummy::S = dummy::S
+		type dummy::T = int
+		type dummy::U =  {a : int; b :  {x : dummy::S; y : int}}
+		type dummy::V =  {a : int; b :  {x : dummy::S; y : int}}^4
+		type dummy::W = int^18
+	Exported constants:
+		const dummy::size = 16
+		const dummy::right = 1.570800
+Warning. in file "should_work/NONREG/simple.lus", line 11, col 17 to 17, token '/':
+---> float in static exp: 3.141600/2.000000 evaluated as 1.570800
 
+*** oops: an internal error occurred in file evalConst.ml, line 299, column 16
+*** when compiling lustre program should_work/NONREG/simple.lus
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/NONREG/stopwatch.lus
@@ -3869,7 +3913,72 @@ End of Syntax table dump. 
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/demo/decl.lus
-*** Error in file "should_work/demo/decl.lus", line 19, col 19 to 19, token ',': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export type t1
+       export type t2
+       export type t3
+       export type t4
+       export type t5
+       export type coord
+       export type coord_tab
+       export enum const bleu
+       export enum const blanc
+       export enum const rouge
+       export type couleur
+       export const d
+       export const e
+       export const f
+       export const g
+       export const h
+       export const a
+       export const b
+       export const c
+       export node decl
+       export node f1
+       export node n2
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		decl (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "decl::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+		type dummy::t1 = dummy::t1
+		type dummy::t2 = dummy::t2
+		type dummy::t3 = dummy::t3
+		type dummy::t4 = dummy::t1^8
+		type dummy::t5 = dummy::t1^8^5
+		type dummy::coord =  {x : real; y : real}
+		type dummy::coord_tab =  {x : real; y : real}^1
+		type dummy::couleur = enum {dummy::bleu, dummy::blanc, dummy::rouge}
+	Exported constants:
+		const dummy::d = true
+		const dummy::e = 8.500000
+		const dummy::f = dummy::blanc
+		const dummy::g = 4
+		const dummy::h = 2
+		const dummy::bleu = dummy::bleu
+		const dummy::blanc = dummy::blanc
+		const dummy::rouge = dummy::rouge
+		const dummy::a = dummy::a
+		const dummy::b = dummy::b
+		const dummy::c = dummy::c
+	Exported nodes:
+		node dummy::decl = dummy::decl(dummy::t1, dummy::t1, dummy::t1) returns (bool) on clock XXX
+
+		node dummy::f1 = dummy::f1(enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}, enum {dummy::bleu, dummy::blanc, dummy::rouge}) returns (bool^2) on clock XXX
+
+		node dummy::n2 = dummy::n2(bool, dummy::t1^8, dummy::t1^8, dummy::t1^8) returns (dummy::t1^8^5) on clock XXX
 
 
 ----------------------------------------------------------------------
@@ -5838,7 +5947,50 @@ End of Syntax table dump. 
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/lionel/triSel.lus
-*** Error in file "should_work/lionel/triSel.lus", line 27, col 36 to 36, token ',': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export type tabSize
+       export type Sort_accu
+       export type MinFR_accu
+       export type Select_accu
+       export type sorted_iter_accu
+       export type Exchange_accu
+       export const size
+       export node minFromRank
+       export node triSel
+       export node Exchange_i_j
+       export node Sorted
+       export node sorted_iter
+       export node select
+       export node UnarySort
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		triSel (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "triSel::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+		type dummy::tabSize = int^50
+		type dummy::Sort_accu =  {CurrentRank : int; Tab : int^50}
+		type dummy::Select_accu =  {RankToFind : int; CurrentRank : int; Val : int}
+		type dummy::MinFR_accu =  {MinVal : int; MinRank : int; RankFrom : int; Rank : int}
+		type dummy::sorted_iter_accu =  {prev_elt : int; prop_is_tt : bool}
+		type dummy::Exchange_accu =  {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}
+	Exported constants:
+		const dummy::size = 50
+	Exported nodes:
+*** Error in file "should_work/lionel/triSel.lus", line 58, col 30 to 32, token 'red': unknown node
+
+		node dummy::minFromRank = dummy::minFromRank( {MinVal : int; MinRank : int; RankFrom : int; Rank : int}, int) returns ( {MinVal : int; MinRank : int; RankFrom : int; Rank : int}) on clock XXX
 
 
 ----------------------------------------------------------------------
@@ -5848,7 +6000,37 @@ End of Syntax table dump. 
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus
-*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus", line 9, col 50 to 50, token '0': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export type iteratedStruct
+       export type elementType
+       export const size
+       export node selectOneStage
+       export node selectEltInArray
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		contractForElementSelectionInArray (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "contractForElementSelectionInArray::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+		type dummy::iteratedStruct =  {currentRank : int; rankToSelect : int; elementSelected : int}
+		type dummy::elementType = int
+	Exported constants:
+		const dummy::size = 10
+	Exported nodes:
+*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/contractForElementSelectionInArray.lus", line 9, col 21 to 23, token 'red': unknown node
+
+		node dummy::selectOneStage = dummy::selectOneStage(int, int) returns (int) on clock XXX
 
 
 ----------------------------------------------------------------------
@@ -5892,7 +6074,48 @@ End of Syntax table dump. 
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_work/packEnvTest/contractForElementSelectionInArray/tri.lus
-*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/tri.lus", line 181, col 74 to 74, token ';': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export type INTSIZE
+       export type Sort_accu
+       export type MinFR_accu
+       export type Select_accu
+       export type sorted_iter_accu
+       export type Exchange_accu
+       export const size
+       export node main
+       export node minFromRank
+       export node Exchange_i_j
+       export node Sorted
+       export node sorted_iter
+       export node select
+       export node UnarySort
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		tri (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "tri::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+		type dummy::INTSIZE = int^10
+		type dummy::Sort_accu =  {CurrentRank : int; Tab : int^10}
+		type dummy::Select_accu =  {RankToFind : int; CurrentRank : int; Val : int}
+		type dummy::MinFR_accu =  {MinVal : int; MinRank : int; RankFrom : int; Rank : int}
+		type dummy::sorted_iter_accu =  {prev_elt : int; prop_is_tt : bool}
+		type dummy::Exchange_accu =  {MinVal : int; MinRank : int; RankFrom : int; CurrentVal : int; Rank : int}
+	Exported constants:
+		const dummy::size = 10
+	Exported nodes:
+*** Error in file "should_work/packEnvTest/contractForElementSelectionInArray/tri.lus", line 179, col 23 to 25, token 'red': unknown node
 
 
 ----------------------------------------------------------------------
@@ -6044,7 +6267,37 @@ Those tests are supposed to generate errors
 
 ----------------------------------------------------------------------
 ====> ../lus2lic -vl 3  should_fail/clock/clock.lus
-*** Error in file "should_fail/clock/clock.lus", line 6, col 1 to 4, token 'node': syntax error
+*** SyntaxTab.create pass 1
+*** SyntaxTab.create pass 2
+    init pack dummy
+       export node clock
+       export node clock2
+       export node clock3
+       export node clock4
+*** SyntaxTab.create pass 3
+   init symbol tables for pack dummy
+*** SyntaxTab.create done
+*** « Syntax table dump:
+ 	 - Package or model list:
+		clock (pack) 
+		
+	 - Raw model table: 
+	 - Raw Package table: dummy 
+	 - Package manager table: dummy 
+End of Syntax table dump. »
+-- MAIN NODE: "clock::main"
+*** Dump the exported items of the packages.
+ * package dummy
+	Exported types:
+	Exported constants:
+	Exported nodes:
+		node dummy::clock = dummy::clock(bool, bool) returns (bool, bool) on clock XXX
+
+		node dummy::clock2 = dummy::clock2(bool, bool) returns (bool) on clock XXX
+
+		node dummy::clock3 = dummy::clock3(bool) returns (bool, bool) on clock XXX
+
+		node dummy::clock4 = dummy::clock4(bool, bool) returns (bool, bool) on clock XXX
 
 
 ----------------------------------------------------------------------
-- 
GitLab