From d735e71a246545f1b9e3498d3b76d801d3539f61 Mon Sep 17 00:00:00 2001
From: Erwan Jahier <jahier@imag.fr>
Date: Fri, 10 Apr 2015 16:25:44 +0200
Subject: [PATCH] soc2c: change the C representation of soc instances by
 grouping instances of the same type into arrays.

The rationale is to be able to generate for loops with iterators.

The previous code was working, but probably by chance.
---
 INSTALL.txt             | 10 +++++---
 _oasis                  |  2 +-
 _tags                   |  4 ++-
 release-lv6/Makefile    |  3 ++-
 src/lv6MainArgs.ml      |  2 +-
 src/lv6util.ml          |  6 +++++
 src/soc.ml              |  4 +--
 src/soc2c.ml            | 34 ++++++++++++++++++--------
 src/soc2cHeap.ml        | 12 +++++----
 src/soc2cInstances.ml   | 54 +++++++++++++++++++++++++++++++++++++++++
 src/soc2cInstances.mli  | 19 +++++++++++++++
 src/soc2cStack.ml       | 10 +++++---
 src/socPredef2cHeap.ml  | 17 +++++++++----
 src/socPredef2cStack.ml | 53 +++++++++++++++++++++++-----------------
 test/lus2lic.sum        | 26 +++++++++-----------
 test/lus2lic.time       | 16 ++++++------
 16 files changed, 193 insertions(+), 79 deletions(-)
 create mode 100644 src/soc2cInstances.ml
 create mode 100644 src/soc2cInstances.mli

diff --git a/INSTALL.txt b/INSTALL.txt
index c9e66d89..4ded5d5f 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -1,5 +1,5 @@
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 6654b1d4c0725c67fd685887eb061fa7) *)
+(* DO NOT EDIT (digest: 38ef48284869b477673d8d85fa59f3e7) *)
 
 This is the INSTALL file for the lus2lic distribution.
 
@@ -10,9 +10,11 @@ Dependencies
 ============
 
 In order to compile this package, you will need:
-                                                * ocaml
-                                                * findlib
-                                                * rdbg-plugin
+
+* ocaml
+* findlib
+* rdbg-plugin
+* extlib for executable lus2lic
 
 Installing
 ==========
diff --git a/_oasis b/_oasis
index 7d558b0b..09e67ee5 100644
--- a/_oasis
+++ b/_oasis
@@ -15,7 +15,7 @@ Executable lus2lic
   Path:       src/
   MainIs:     main.ml
   BuildTools: ocamlbuild 
-  BuildDepends: str,unix,num,rdbg-plugin
+  BuildDepends: str,unix,num,rdbg-plugin,extlib
   Build:true
  CompiledObject: native
 #  CompiledObject: byte
diff --git a/_tags b/_tags
index a681c625..c8f41b4a 100644
--- a/_tags
+++ b/_tags
@@ -1,5 +1,5 @@
 # OASIS_START
-# DO NOT EDIT (digest: 2976d8e2b9dc59dbee1849057cd788de)
+# DO NOT EDIT (digest: f21b86c7e59c8317233a32039a042588)
 # Ignore VCS directories, you can use the same kind of rule outside
 # OASIS_START/STOP if you want to exclude directories that contains
 # useless stuff for the build process
@@ -15,10 +15,12 @@ true: annot, bin_annot
 "_darcs": -traverse
 "_darcs": not_hygienic
 # Executable lus2lic
+"src/main.native": pkg_extlib
 "src/main.native": pkg_num
 "src/main.native": pkg_rdbg-plugin
 "src/main.native": pkg_str
 "src/main.native": pkg_unix
+<src/*.ml{,i,y}>: pkg_extlib
 # Library lustre-v6
 "src/lustre-v6.cmxs": use_lustre-v6
 <src/*.ml{,i,y}>: pkg_num
diff --git a/release-lv6/Makefile b/release-lv6/Makefile
index 24262a43..017b33d7 100644
--- a/release-lv6/Makefile
+++ b/release-lv6/Makefile
@@ -50,6 +50,7 @@ lic2c:
 	cp $(LIC2CDIR)/src/lic2c $(RELNAME)/bin/
 
 test_files:
+	mkfir $(RELNAME)/test/ || true
 	cp -rf $(LUS2LICDIR)/test/should_work $(RELNAME)/test/
 	cp -rf $(LUS2LICDIR)/test/should_fail $(RELNAME)/test/
 	cp -rf $(LUS2LICDIR)/test/lus2lic.tests $(RELNAME)/test/
@@ -110,6 +111,6 @@ test-rel:
 	cd /tmp && \
 	rm -rf $(RELNAME) && \
 	tar xvfz $(RELNAME).tgz && \
-	"cd /tmp/$(RELNAME)/test ; make test"
+	cd /tmp/$(RELNAME)/test ; make test
 
 all: rel
diff --git a/src/lv6MainArgs.ml b/src/lv6MainArgs.ml
index 6bc83d20..61c5eca2 100644
--- a/src/lv6MainArgs.ml
+++ b/src/lv6MainArgs.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 07/04/2015 (at 16:07) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 16:04) by Erwan Jahier> *)
 (*
 Le manager d'argument adapté de celui de lutin, plus joli
 N.B. solution un peu batarde : les options sont stockées, comme avant, dans Global,
diff --git a/src/lv6util.ml b/src/lv6util.ml
index 9ee8922c..24f7064f 100644
--- a/src/lv6util.ml
+++ b/src/lv6util.ml
@@ -57,3 +57,9 @@ let my_assoc x l =
   | (a,b)::l -> if compare a x = 0 then Some(b,List.rev_append acc l) else aux ((a,b)::acc) l
   in 
   aux [] l
+
+
+let gen_N i = 
+  let rec aux acc n = if n<0 then acc else aux (n::acc) (n-1) in
+  aux [] i
+let _ = assert (gen_N 10 = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10])
diff --git a/src/soc.ml b/src/soc.ml
index f23393a0..6d224e98 100644
--- a/src/soc.ml
+++ b/src/soc.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 26/02/2015 (at 11:23) by Erwan Jahier> *)
+(* Time-stamp: <modified the 09/04/2015 (at 11:36) by Erwan Jahier> *)
 
 (** Synchronous Object Component *)
 
@@ -25,7 +25,7 @@ type key_opt =
   | Curr of Lv6Id.long  (* clock constructor for current *)
 
 type key = 
-    ident * 
+    ident *
     Data.t list *  (* I/O type list *)
     key_opt
 
diff --git a/src/soc2c.ml b/src/soc2c.ml
index 56eda63c..8dfc1684 100644
--- a/src/soc2c.ml
+++ b/src/soc2c.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 02/04/2015 (at 10:46) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 15:38) by Erwan Jahier> *)
 
 
 (* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
@@ -78,11 +78,14 @@ let (gao2c : Soc.tbl -> 'a soc_pp -> Soc.gao -> unit) =
         )
         | Call(vel_out, Method((inst_name,sk),sname), vel_in) -> ( 
           let called_soc = Soc.SocMap.find sk stbl in
-          let ctx = Printf.sprintf "ctx->%s" (id2s inst_name) in
+          let _, get_index = Soc2cInstances.to_array (sp.soc).instances in
+          let index = get_index (inst_name,sk) in
+          let step_arg = Printf.sprintf "ctx->%s_tab[%d]" (get_ctx_name sk) index in
+          let ctx = step_arg in
+          let step_arg = "&"^step_arg in
           List.iter (fun ve  -> assert(var_expr_is_not_a_slice ve)) vel_in;
           List.iter (fun ve  -> assert(var_expr_is_not_a_slice ve)) vel_out;
-          Soc2cDep.gen_step_call sp.soc called_soc vel_out vel_in ctx sname
-            ("&ctx->"^(id2s inst_name))
+          Soc2cDep.gen_step_call sp.soc called_soc vel_out vel_in ctx sname step_arg
         )
         | Call(vel_out, Procedure sk, vel_in) -> (
           let called_soc = Soc.SocMap.find sk stbl in
@@ -127,10 +130,19 @@ let (step2c : Soc.tbl -> 'a soc_pp -> Soc.step_method -> unit) =
         );
         sp.cput (sprintf "\n} // End of %s\n\n" sname)
       )
-let (gen_instance_init_call : 'a soc_pp -> Soc.instance -> unit) =
-  fun sp (id,key) -> 
+let (gen_instance_init_call : 'a soc_pp -> Soc.key * int -> unit) =
+  fun sp (key,i) -> 
     let ctx_name = get_ctx_name key in
-    sp.cfmt "\n    %s_reset(&ctx->%s);" ctx_name (id2s id)
+    if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_inline_loops || i<4 then
+      for k=0 to i do
+        sp.cfmt "\n    %s_reset(&ctx->%s_tab[%d]);" ctx_name ctx_name k
+      done
+    else (
+      sp.cput (Printf.sprintf "  for (_i=0 ; _i<%d ; _i+=1){" i);
+      sp.cput (Printf.sprintf "\n    %s_reset(&ctx->%s_tab[_i]);" ctx_name ctx_name);
+      sp.cput "\n }"
+    )
+      
 
 let (soc2c: int -> out_channel -> out_channel -> Soc.tbl -> Soc.t -> unit) = 
   fun pass hfile cfile stbl soc -> 
@@ -151,7 +163,9 @@ let (soc2c: int -> out_channel -> out_channel -> Soc.tbl -> Soc.t -> unit) =
         hfmt "void %s_reset(%s_type* ctx);\n" ctx_name ctx_name;
         cfmt "void %s_reset(%s_type* ctx){" ctx_name ctx_name;
         (* Call the reset_ctx functions of the soc instances *)
-        List.iter (gen_instance_init_call sp) soc.instances;
+        if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_inline_loops then () else 
+          sp.cput "\n  int _i;\n";
+        List.iter (gen_instance_init_call sp) (fst (Soc2cInstances.to_array soc.instances));
         (match soc.key with
           (* set the parameter fields that have a default value (arrow,fby) *)
           | (_,_,MemInit (ve)) -> 
@@ -225,8 +239,8 @@ let (is_extern_type: Lic.type_ -> bool) =
 
 let (typedef : LicPrg.t -> Soc.tbl -> Soc.t -> string) =
   fun licprg soc_tbl main_soc ->
-    (* We need to print the ctx typedef a good order
-       (w.r.t. typedef dependancies).  To do that, we traverse
+    (* We need to print the ctx typedef in a good order
+       (w.r.t. typedef dependencies).  To do that, we traverse
        the tree of soc instances which root is the main soc. *)
     let visited = KeySet.empty in
     (* Soc with memory can be used several times; hence we mark via this
diff --git a/src/soc2cHeap.ml b/src/soc2cHeap.ml
index 1b8ddce6..35dd5067 100644
--- a/src/soc2cHeap.ml
+++ b/src/soc2cHeap.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 26/02/2015 (at 13:47) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 15:14) by Erwan Jahier> *)
 
 open Soc2cUtil
 open Soc2cIdent
@@ -126,7 +126,7 @@ let (gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list ->
     match inline_soc soc called_soc vel_out vel_in with
       | Some str -> str
       | None ->
-        let vel_in = List.map (string_of_var_expr soc) vel_in in
+        let vel_in  = List.map (string_of_var_expr soc) vel_in in
         let vel_out = List.map (string_of_var_expr soc) vel_out in
         let si_str =
           if vel_in = [] then "" (* occurs for pre *) else 
@@ -175,10 +175,12 @@ let (typedef_of_soc : Soc.t -> string) =
       )
     in
     let str =  str ^ (if soc.instances <> [] then  "   /*INSTANCES*/\n" else "") in
-    let string_of_instance (id,sk) = 
-      Printf.sprintf "   %s_type %s;\n" (get_ctx_name sk) (id2s id)
+    let il, _get_index = Soc2cInstances.to_array soc.instances in
+    let string_of_instance (sk,i) = 
+      let n = get_ctx_name sk in
+      Printf.sprintf "   %s_type %s_tab[%d];\n" n n i
     in
-    let str =  List.fold_left (fun acc inst -> acc^(string_of_instance inst)) str soc.instances in
+    let str = List.fold_left (fun acc inst -> acc^(string_of_instance inst)) str il in
     let str = Printf.sprintf  "%s} %s;\n\n" str ctx_name_type in
     str
 
diff --git a/src/soc2cInstances.ml b/src/soc2cInstances.ml
new file mode 100644
index 00000000..996857db
--- /dev/null
+++ b/src/soc2cInstances.ml
@@ -0,0 +1,54 @@
+(* Time-stamp: <modified the 10/04/2015 (at 11:10) by Erwan Jahier> *)
+
+
+module SocKey = struct
+  type t = Soc.key
+  let compare = compare
+end
+
+module SkMap = Map.Make(SocKey)
+
+(* List.nth^-1 *)
+let (get_pos : 'a -> 'a list -> int) =
+  fun x l ->
+    let rec aux c = function
+      | [] -> assert false (* SNO *)
+      | y::tail -> if x = y then c else aux (c+1) tail
+    in  
+    let pos = aux 0 l in
+    assert (List.nth l pos = x);
+    pos
+
+(** gathers instances with the same key into an array *)
+
+open Soc
+(* exported *)
+
+let find k t = try SkMap.find k t with Not_found -> 
+  Printf.printf "*** SNO: %s not found in %s\n" (Std.dump k) (Std.dump t);
+  flush stdout;
+  assert false
+
+let to_array : ((ident * Soc.key) list -> (Soc.key * int) list * (ident * Soc.key -> int)) =
+  fun l -> 
+    let rec aux tab = function
+      | [] -> tab
+      | (id,key)::tail ->
+        if SkMap.mem key tab then
+          let idl = find key tab in
+          let tab = SkMap.add key (id::idl) tab in
+          aux tab tail
+        else 
+          let tab = SkMap.add key [id] tab in
+          aux tab tail
+    in
+    let tab = aux SkMap.empty l in
+    let il = SkMap.fold (fun sk idl acc -> (sk, List.length idl)::acc) tab [] in
+    let inst_to_index (id,sk) = 
+      let idl = find sk tab in
+      let i = get_pos id (List.rev idl) in
+      i
+    in 
+    il, inst_to_index 
+
+    
diff --git a/src/soc2cInstances.mli b/src/soc2cInstances.mli
new file mode 100644
index 00000000..4082d4d8
--- /dev/null
+++ b/src/soc2cInstances.mli
@@ -0,0 +1,19 @@
+(* Time-stamp: <modified the 09/04/2015 (at 15:09) by Erwan Jahier> *)
+
+(** Each soc has a list of soc instances, made of an (unique) ident
+    and a Soc.key.  
+
+    In order to be able to iterate of such instances (e.g., with a
+    for loop), we want to store them into arrays. This module will
+    help us to do so.
+*)
+
+(** from a list of soc instances l, this function returns :
+
+    - a list made of all the soc.key in l + their occurences in l
+
+    - a function that maps each instance ident to the corresponding
+    ident in the array where it is stored
+*)
+
+val to_array : (Soc.ident * Soc.key) list -> (Soc.key * int) list * (Soc.ident * Soc.key -> int)
diff --git a/src/soc2cStack.ml b/src/soc2cStack.ml
index d9273809..a7110e3c 100644
--- a/src/soc2cStack.ml
+++ b/src/soc2cStack.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 26/02/2015 (at 11:24) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 11:23) by Erwan Jahier> *)
 
 open Soc2cUtil
 open Soc2cIdent
@@ -207,10 +207,12 @@ let (typedef_of_soc : Soc.t -> string) =
       )
     in
     let str =  str ^ (if soc.instances <> [] then  "   /*INSTANCES*/\n" else "") in
-    let string_of_instance (id,sk) = 
-      Printf.sprintf "   %s_type %s;\n" (get_ctx_name sk) (id2s id)
+    let il, _get_index = Soc2cInstances.to_array soc.instances in
+    let string_of_instance (sk,i) = 
+      let n = get_ctx_name sk in
+      Printf.sprintf "   %s_type %s_tab[%d];\n" n n i
     in
-    let str =  List.fold_left (fun acc inst -> acc^(string_of_instance inst)) str soc.instances in
+    let str = List.fold_left (fun acc inst -> acc^(string_of_instance inst)) str il in
     let str = Printf.sprintf  "%s} %s;\n\n" str ctx_name_type in
     str
 
diff --git a/src/socPredef2cHeap.ml b/src/socPredef2cHeap.ml
index 2e58fd83..a762cdf3 100644
--- a/src/socPredef2cHeap.ml
+++ b/src/socPredef2cHeap.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 26/02/2015 (at 09:52) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 15:08) by Erwan Jahier> *)
 
 open Data
 open Soc
@@ -211,10 +211,17 @@ let (get_iterator : Soc.t -> string -> Soc.t -> int -> string) =
           array_index,ctx_access
         )
         | _  -> 
-          let inst_names = List.map fst soc.instances in 
-          let inst_names = List.rev inst_names in
-          let step_args = List.map (fun sn  -> ("&ctx->"^(id2s sn))) inst_names in
-          let ctx = List.map (fun sn  -> ("ctx->"^(id2s sn))) inst_names in
+          let il, _ = Soc2cInstances.to_array soc.instances in
+          let step_args = List.flatten(List.map(
+            fun (sk,i) -> 
+              let l = Lv6util.gen_N i in
+              let id = get_ctx_name sk in
+              let step_args = List.map (fun n -> Printf.sprintf "ctx->%s_tab[%d]" id n) l in
+              step_args
+          ) il)
+          in
+          let ctx = step_args in
+          let step_args = List.map (fun x -> "&"^x) step_args in
           let ctx_access =  "ctx->"  in
           let (array_index : int -> var -> Soc.var_expr) =
             fun i (vn,vt) -> Var(Printf.sprintf "ctx->%s[%d]" vn i,vt) 
diff --git a/src/socPredef2cStack.ml b/src/socPredef2cStack.ml
index 26ecb24e..07b71224 100644
--- a/src/socPredef2cStack.ml
+++ b/src/socPredef2cStack.ml
@@ -1,4 +1,4 @@
-(* Time-stamp: <modified the 08/04/2015 (at 14:39) by Erwan Jahier> *)
+(* Time-stamp: <modified the 10/04/2015 (at 16:21) by Erwan Jahier> *)
 
 open Data
 open Soc
@@ -194,6 +194,7 @@ let (not_an_array : Data.t -> bool) = function
   | Data.Array(_,_) -> false | _ -> true
 
 
+
 (* exported *)
 let (get_iterator : Soc.t -> string -> Soc.t -> int -> string) = 
   fun soc iterator it_soc n -> 
@@ -215,17 +216,25 @@ let (get_iterator : Soc.t -> string -> Soc.t -> int -> string) =
           array_index
         )
         | _  -> 
-          let inst_names = List.map fst soc.instances in
-          let step_args = List.map (fun sn  -> ("&ctx->"^(id2s sn))) inst_names in
-          let ctx = List.map (fun sn -> ("ctx->"^(id2s sn))) inst_names in
+          let il, _ = Soc2cInstances.to_array soc.instances in
+          let step_args = List.flatten(List.map(
+            fun (sk,i) -> 
+              let l = Lv6util.gen_N i in
+              let id = get_ctx_name sk in
+              let step_args = List.map (fun n -> Printf.sprintf "&ctx->%s_tab[%d]" id n) l in
+(*              let ctx = List.map (fun n -> Printf.sprintf "&ctx->%s" id n) l in *)
+              step_args
+          ) il)
+          in
+          let ctx = step_args (*List.map (fun sn -> ("ctx->"^(id2s sn))) inst_names *) in
           let (array_index : int -> var -> Soc.var_expr) =
-            fun i (vn,vt) ->  
+            fun i (vn,vt) ->
               let vt_elt = match vt with
-                | Data.Array(vt,_) -> vt 
+                | Data.Array(vt,_) -> vt
                 | _ -> assert false
-              in 
+              in
               Index(Var (vn, Data.Array(vt,i)),i,vt_elt)
-          (* Var(Printf.sprintf "%s[%d]" vn i,vt)   *)
+          (* Var(Printf.sprintf "%s[%d]" vn i,vt) *)
           in
           Array.of_list step_args,
           Array.of_list ctx,
@@ -323,8 +332,8 @@ let (get_iterator : Soc.t -> string -> Soc.t -> int -> string) =
           List.hd vel_out ::( List.tl vel_in),
           List.hd vel_in ::( List.tl vel_out)
         in
-        let step_arg  = if step_args.(0) = "" then "" else step_args.(0)^"+_i" in
-        let step_arg2 = if step_args.(0) = "" then "" else step_args.(0)^"+_i+1" in
+        let step_arg  = Str.global_replace (Str.regexp "\[0\]") "[_i]"   step_args.(0) in
+        let step_arg2 = Str.global_replace (Str.regexp "\[0\]") "[_i+1]" step_args.(0) in
         let body = Soc2cStack.gen_step_call
           soc it_soc vel_out vel_in ctx.(0) node_step step_arg;
         in
@@ -353,7 +362,7 @@ let (get_iterator : Soc.t -> string -> Soc.t -> int -> string) =
 (* exported *)
 let (get_condact : Soc.t -> Soc.t -> var_expr list -> string ) = 
   fun soc condact_soc el -> 
-        let buff = ref "" in
+    let buff = ref "" in
     let add str = buff:=!buff^(str^"\n") in
 
     let clk = Printf.sprintf "i0" in
@@ -363,24 +372,24 @@ let (get_condact : Soc.t -> Soc.t -> var_expr list -> string ) =
     let vel_out = List.map (fun var -> Var var) vel_out in
     add (Printf.sprintf "  if (%s == _true) { " clk); 
     (if SocUtils.is_memory_less condact_soc then
-      let condact_ctx = get_ctx_name condact_soc.key in
-      add (Soc2cStack.gen_step_call soc condact_soc vel_out vel_in condact_ctx "step" "")
-    else
-      let condact_ctx = 
-        let inst_name =
+        let condact_ctx = get_ctx_name condact_soc.key in
+        add (Soc2cStack.gen_step_call soc condact_soc vel_out vel_in condact_ctx "step" "")
+     else
+        let condact_ctx = 
           match soc.instances with
-            | [inst] -> (id2s (fst inst))
+            | [inst] -> 
+              let _, get_index = Soc2cInstances.to_array soc.instances in
+              let index = get_index (inst) in
+              (Printf.sprintf "ctx->%s_tab[%d]" (get_ctx_name condact_soc.key) index)
             | _ -> assert false
         in
-        Printf.sprintf  "ctx->%s" inst_name
-      in
-      add (Soc2cStack.gen_step_call soc condact_soc vel_out vel_in 
-             condact_ctx "step"  ("&"^condact_ctx))
+        add (Soc2cStack.gen_step_call soc condact_soc vel_out vel_in 
+               condact_ctx "step"  ("&"^condact_ctx))
     );
     add "    ctx->_memory = _false;";
     add "   } else if (ctx->_memory == _true) {";
     List.iter2 (fun var ve -> 
-      add (Printf.sprintf "    %s = %s;" (Soc2cStack.string_of_var_expr soc var)
+      add (Printf.sprintf "    *%s = %s;" (Soc2cStack.string_of_var_expr soc var)
              (Soc2cStack.string_of_var_expr soc ve) )
     ) vel_out el ;
     add "    ctx->_memory = _false;";
diff --git a/test/lus2lic.sum b/test/lus2lic.sum
index 2592573a..fd820943 100644
--- a/test/lus2lic.sum
+++ b/test/lus2lic.sum
@@ -1,5 +1,5 @@
 ==> lus2lic0.sum <==
-Test Run By jahier on Wed Apr  8 14:47:31 
+Test Run By jahier on Fri Apr 10 16:23:08 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic0 tests ===
@@ -63,7 +63,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
 XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
 
 ==> lus2lic1.sum <==
-Test Run By jahier on Wed Apr  8 14:47:37 
+Test Run By jahier on Fri Apr 10 16:23:06 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic1 tests ===
@@ -397,7 +397,7 @@ PASS: gcc -o multipar.exec multipar_multipar.c multipar_multipar_loop.c
 PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus  {}
 
 ==> lus2lic2.sum <==
-Test Run By jahier on Wed Apr  8 14:48:19 
+Test Run By jahier on Fri Apr 10 16:23:14 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic2 tests ===
@@ -727,7 +727,7 @@ PASS: gcc -o zzz2.exec zzz2_zzz2.c zzz2_zzz2_loop.c
 PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus  {}
 
 ==> lus2lic3.sum <==
-Test Run By jahier on Wed Apr  8 14:49:27 
+Test Run By jahier on Fri Apr 10 16:23:10 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic3 tests ===
@@ -1230,7 +1230,7 @@ PASS: ./myec2c {-o multipar.c multipar.ec}
 PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
 
 ==> lus2lic4.sum <==
-Test Run By jahier on Wed Apr  8 14:50:05 
+Test Run By jahier on Fri Apr 10 16:23:12 
 Native configuration is x86_64-unknown-linux-gnu
 
 		=== lus2lic4 tests ===
@@ -1726,14 +1726,12 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
 # of unexpected failures	3
 ===============================
 # Total number of failures: 14
-lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 5 seconds
-lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 41 seconds
-lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 68 seconds
-lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 38 seconds
-lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 72 seconds
+lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 6 seconds
+lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 57 seconds
+lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 84 seconds
+lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 54 seconds
+lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 91 seconds
 * Ref time: 
-0.04user 0.01system 3:46.25elapsed 0%CPU (0avgtext+0avgdata 5156maxresident)k
-160inputs+0outputs (0major+5535minor)pagefaults 0swaps
 * Quick time (-j 4):
-0.04user 0.02system 1:27.44elapsed 0%CPU (0avgtext+0avgdata 5188maxresident)k
-160inputs+0outputs (0major+5527minor)pagefaults 0swaps
+0.04user 0.02system 1:37.57elapsed 0%CPU (0avgtext+0avgdata 5164maxresident)k
+160inputs+0outputs (0major+5564minor)pagefaults 0swaps
diff --git a/test/lus2lic.time b/test/lus2lic.time
index 8eef8b8d..dbb36281 100644
--- a/test/lus2lic.time
+++ b/test/lus2lic.time
@@ -1,11 +1,9 @@
-lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 5 seconds
-lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 41 seconds
-lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 68 seconds
-lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 38 seconds
-lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 72 seconds
+lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 6 seconds
+lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 57 seconds
+lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 84 seconds
+lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 54 seconds
+lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 91 seconds
 * Ref time: 
-0.04user 0.01system 3:46.25elapsed 0%CPU (0avgtext+0avgdata 5156maxresident)k
-160inputs+0outputs (0major+5535minor)pagefaults 0swaps
 * Quick time (-j 4):
-0.04user 0.02system 1:27.44elapsed 0%CPU (0avgtext+0avgdata 5188maxresident)k
-160inputs+0outputs (0major+5527minor)pagefaults 0swaps
+0.04user 0.02system 1:37.57elapsed 0%CPU (0avgtext+0avgdata 5164maxresident)k
+160inputs+0outputs (0major+5564minor)pagefaults 0swaps
-- 
GitLab