diff --git a/Makefile b/Makefile index ee2d5c5bdd0ddf9d45411d8945a963ef7d31a224..9d80615c6ecb774e2d9d2ddd014d990e3965fff4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,4 @@ -LUSTREV6_PATH=$(PWD) - all:build build: setup.data src/lv6version.ml ocaml setup.ml -build @@ -12,8 +10,9 @@ setup.ml:_oasis PROF=--enable-profile PROF=--disable-profile +BINPATH=$(shell dirname `which ocamlc`)/.. setup.data:setup.ml - ocaml setup.ml -configure $(PROF) --prefix $(LUSTREV6_PATH) --exec-prefix $(LUSTREV6_PATH)/$(HOSTTYPE) + ocaml setup.ml -configure $(PROF) --prefix $(BINPATH) --exec-prefix $(BINPATH) install: ocaml setup.ml -install diff --git a/_oasis b/_oasis index ea9ccfc09344439e4635c1300cf473f9027bed74..e9bd9eb9c09fd9ae62070f86aa3797012cd73078 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: lustre-v6 -Version: 1.665 +Version: 1.666 Synopsis: The Lustre V6 Verimag compiler Description: This package contains: (1) lus2lic: the (current) name of the compiler (and interpreter via -exec). diff --git a/lv6-ref-man/lv6-ref-man.tex b/lv6-ref-man/lv6-ref-man.tex index cc8383f55cebd64edc7926d6609af0149943c553..670b422c624c8abffed7433b9368f162760a118f 100644 --- a/lv6-ref-man/lv6-ref-man.tex +++ b/lv6-ref-man/lv6-ref-man.tex @@ -356,7 +356,7 @@ assertion} can be specified: \begin{program} - \kwd{assert} not (set \kwdd{and} reset); + \kwd{assert}(not (set \kwdd{and} reset)); \end{program} \index{assertion} @@ -933,6 +933,20 @@ slice = a[2..5] -- get an array slice (i.e., a sub array) \section{Assertions} +\begin{example}[Assertions] +\begin{alltt} + node divide(i1,i2:int) returns (res:int); + let + assert(i2<>0); + o = i1/i2; + tel +\end{alltt} +\end{example} + +Assertions takes boolean expressions. Tools that parse lustre +program migth use it or not. For instance, a model-checker such as +Lesar migth use it. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Expressions} \label{stream expressions} @@ -1000,7 +1014,7 @@ sense that they are operating pointwise on streams. \sxDef{Call} \is \sx{User\_Op} \prag\ \lx{(} \sx{Expression\_List} \lx{)} \\ \sxDef{User\_Op} \is \sx{Identifier} - \myor \sx{Iterator} {\tt <<} \sx{User\_Op} \lx{;} \sx{Expression} {\tt >>} + \myor \sx{Iterator} {\tt <<} \sx{User\_Op} \lx{,} \sx{Expression} {\tt >>} \\ \sxDef{Iterator} \is \lx{map} \sor \lx{red} \sor \lx{fill} \sor \lx{fillred} \sor \lx{boolred} \\ @@ -1010,8 +1024,28 @@ sense that they are operating pointwise on streams. } \syntaxExpressions -\begin{example}[Expressions] +\begin{example}[Array Expressions] +\begin{alltt} + array2 = [1,2]; + array10 = 42^10; + array12 = array2 | array10; -- concat + slice = array12[1..10]; -- slice + array_sum = map<<+, 10>>(array10,slice); + max_elt = red<<max, 10>>(array_sum) +\end{alltt} + +\end{example} + +\begin{example}[Struct Expressions] \begin{alltt} +type Toto = struct { + x : int = 1; + y : int = 2 +}; +[...] + s = Toto { x = 12; y = 13 }; + ns = Toto { s with x = 42 }; + x = s.x + ns.y; \end{alltt} \end{example} @@ -1051,14 +1085,6 @@ a delay (\prog{pre}) and an initialization operator (\prog{->}). -\begin{example}[Temporal operators] -The equation -\begin{alltt} - X = 0 -> pre X + 1; -\end{alltt} -defines X as the stream (0,1,2,3, ...) -\end{example} - \newcommand{\syntaxBinopTemp}{ \begin{grammarrule} \begin{tabular}{lcl} @@ -1072,14 +1098,26 @@ defines X as the stream (0,1,2,3, ...) } \syntaxBinopTemp -\begin{example}[Operators] -\begin{alltt} +\begin{example}[Temporal operators] +The equation +\begin{alltt} + pX = 0 -> pre(X) + 1; -- or pre X + 1 + pY = 0 fby Y + 1; -- or 0 fby(y)+1 \end{alltt} +defines X and Y as the stream (0,1,2,3, ...) +\end{example} + +\begin{example}[Operators] +\begin{alltt} + X_on_c = X when C; + curr_X_on_base = current(X_on_C); +\end{alltt} \end{example} + \section{Operators Priority} The list below shows the relative precedences and associativity of @@ -1633,9 +1671,9 @@ diese and the nor operators : \begin{example}[boolred] \begin{program} -#(a1, ..., an) \evalto boolred(0,1,n)[a1, ..., an] \\ +#(a1, ..., an) \evalto boolred<<0,1,n>>(a1, ..., an) \\ -nor(a1, ..., an) \evalto boolred(0,0,n)[a1, ..., an] +nor(a1, ..., an) \evalto boolred<<0,0,n>>(a1, ..., an) \end{program} \end{example} diff --git a/src/lv6MainArgs.ml b/src/lv6MainArgs.ml index 76515d8113311093890abe43be6cf26dfb45fdd5..72e25be03a733c38968133cd84089d99d81229b5 100644 --- a/src/lv6MainArgs.ml +++ b/src/lv6MainArgs.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 14/09/2016 (at 11:42) by Erwan Jahier> *) +(* Time-stamp: <modified the 07/10/2016 (at 15:44) 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, @@ -62,6 +62,7 @@ type global_opt = { mutable line_num : int; mutable line_start_pos : int; mutable soc2c_no_switch : bool; + mutable soc2c_one_file : bool; mutable soc2c_inline_loops : bool; mutable soc2c_global_ctx : bool; mutable gen_wcet : bool; @@ -84,6 +85,7 @@ let (global_opt:global_opt) = current_file = ""; expand_enums = AsEnum; soc2c_no_switch = false; + soc2c_one_file = true; soc2c_inline_loops = false; soc2c_global_ctx = false; gen_wcet = false; @@ -400,6 +402,11 @@ let mkoptab (opt:t) : unit = ( (Arg.Unit (fun i -> global_opt.soc2c_inline_loops <- true; set_c_options opt)) ["inline loops (that come from array iterators)"] ; + mkopt opt ~doc_level:Advanced + ["-2csf";"--2c-several-files"] + (Arg.Unit (fun i -> global_opt.soc2c_one_file <- false; set_c_options opt)) + ["Generate one .c and one .h file per node"] + ; mkopt opt ~doc_level:Advanced ["-2cgc";"--2c-global-ctx"] (Arg.Unit (fun i -> global_opt.soc2c_global_ctx <- true; set_c_options opt)) diff --git a/src/lv6MainArgs.mli b/src/lv6MainArgs.mli index 0d6a158dfcaadd949a9d37b168a9c63db0fa5a38..2d5951cd20f589e34b20f94e4c0db0b10a1c3fea 100644 --- a/src/lv6MainArgs.mli +++ b/src/lv6MainArgs.mli @@ -64,6 +64,7 @@ type global_opt = { mutable line_num : int; mutable line_start_pos : int; mutable soc2c_no_switch : bool; + mutable soc2c_one_file : bool; mutable soc2c_inline_loops : bool; mutable soc2c_global_ctx : bool; mutable gen_wcet : bool; diff --git a/src/lv6version.ml b/src/lv6version.ml index c4324f7222be7edbc3adbb6e8728016283165a6f..1a43d1d5a226a6cfe7a2714b3cd22f241eef4df7 100644 --- a/src/lv6version.ml +++ b/src/lv6version.ml @@ -1,7 +1,7 @@ (** Automatically generated from Makefile *) let tool = "lus2lic" let branch = "master" -let commit = "665" -let sha_1 = "a0a265539fdde844b8b7861346983e551b62b775" +let commit = "666" +let sha_1 = "aa6d74b5850c0067040e4f1aa41c46ded05e8138" let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")") let maintainer = "jahier@imag.fr" diff --git a/src/soc2c.ml b/src/soc2c.ml index 0bb9328fe5c95bfe13aab09e5de49a720dfd21ed..0a26498745811dcf640543ec65cf821d6eee5e35 100644 --- a/src/soc2c.ml +++ b/src/soc2c.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 16/09/2016 (at 09:55) by Erwan Jahier> *) +(* Time-stamp: <modified the 07/10/2016 (at 15:36) by Erwan Jahier> *) (* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *) @@ -38,8 +38,8 @@ type 'a soc_pp = { soc: Soc.t } -let (string_of_soc_key : Soc.key -> string) = - fun (name,_,_) -> (id2s name) + +let (string_of_soc_key : Soc.key -> string) = Soc2cIdent.get_soc_name let string_of_var_expr = Soc2cDep.string_of_var_expr @@ -105,13 +105,13 @@ let (gao2c : Soc.tbl -> 'a soc_pp -> Soc.gao -> unit) = let (step2c : Soc.tbl -> 'a soc_pp -> Soc.step_method -> unit) = fun stbl sp sm -> - if inlined_soc sp.soc then () (* don't generate code if inlined *) else + if inlined_soc sp.soc.key then () (* don't generate code if inlined *) else (* let sname = Soc2cDep.step_name sp.soc.key sm.name in *) let sname = Soc2cDep.step_name sp.soc.key sm.name in if sm.impl<>Extern then ( let decl, def = Soc2cDep.get_step_prototype sm sp.soc in sp.hput (Printf.sprintf "%s\n" decl); - sp.cput (Printf.sprintf "%s\n" def); + sp.cput (Printf.sprintf "%s" def); (match sm.impl with | Extern -> () | Predef -> sp.cput (Soc2cDep.get_predef_op sp.soc.key) @@ -147,39 +147,98 @@ let (gen_instance_init_call : 'a soc_pp -> Soc.key * int -> unit) = 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 -> - if inlined_soc soc then () (* don't generate code if inlined *) else - let hfmt fmt = Printf.kprintf (fun t -> output_string hfile t) fmt in - let cfmt fmt = Printf.kprintf (fun t -> output_string cfile t) fmt in - let hput str = output_string hfile str in - let cput str = output_string cfile str in - let sp = { hfmt = hfmt; cfmt=cfmt; hput = hput; cput = cput; soc = soc } in +module KeySet = Set.Make(struct type t = Soc.key let compare = compare end) + +let (get_used_soc : Soc.t -> KeySet.t) = + fun soc -> (* dig into the soc for the list of socs it uses *) + let rec get_soc_of_gao acc = function + | Case(_,l) -> + List.fold_left + (fun acc (_,gaol) -> List.fold_left get_soc_of_gao acc gaol) acc l + | Call(_,Assign,_) -> acc + | Call(_,Method((_,sk),_),_) + | Call(_,Procedure sk,_) -> KeySet.add sk acc + in + let get_soc_of_step acc sm = + match sm.impl with + | Gaol(_, gaol) -> List.fold_left get_soc_of_gao acc gaol + | Iterator(_,sk,_) + | Condact(sk,_) -> KeySet.add sk acc + | _ -> acc + in + List.fold_left get_soc_of_step KeySet.empty soc.step + +let one_file() = Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_one_file + +(* soc2c +- creates c and h file(s) +- updates/returns the list of created C files *) +let (soc2c : int -> out_channel -> out_channel -> Soc.tbl -> Soc.key -> + string list -> Soc.t -> string list) = + fun pass hfile cfile stbl msoc_key cfiles_acc soc -> + if inlined_soc soc.key then cfiles_acc (* don't generate code if inlined *) else let ctx_name = get_ctx_name soc.key in - let ctx_name_type = ctx_name^"_type" in + let ctx_name_type = ctx_name^"_type" in if pass=1 then ( - (* Only for ctx of memoryless nodes + main node *) - if SocUtils.ctx_is_global soc then cfmt "%s %s;\n" ctx_name_type ctx_name; + (* Only for ctx of memoryless nodes + main node *) + if SocUtils.ctx_is_global soc then + Printf.kprintf (fun t -> output_string cfile t) "%s %s;\n" ctx_name_type ctx_name; + cfiles_acc ) else ( + let base = string_of_soc_key soc.key in + let cfile,hfile,cfiles_acc = + if one_file() || msoc_key = soc.key then cfile, hfile, cfiles_acc else + let cfile = (base^".c") in + let hfile = (base^".h") in + let cfile_oc = open_out cfile in + let hfile_oc = open_out hfile in + (*open_out (base^".h"), *) + Lv6util.entete cfile_oc "/*" "*/" ; + Lv6util.entete hfile_oc "/*" "*/" ; + Printf.fprintf cfile_oc "#include \"%s\"\n" hfile; + Printf.fprintf hfile_oc "#include \"lustre_types.h\"\n"; + Printf.fprintf hfile_oc "#include \"lustre_consts.h\"\n"; + Printf.fprintf hfile_oc "#ifndef _%s_H_FILE \n" base; + Printf.fprintf hfile_oc "#define _%s_H_FILE \n" base; + flush cfile_oc; + flush hfile_oc; + cfile_oc, hfile_oc, + (if List.mem cfile cfiles_acc then cfiles_acc else cfile::cfiles_acc) + in + let hfmt fmt = Printf.kprintf (fun t -> output_string hfile t) fmt in + let cfmt fmt = Printf.kprintf (fun t -> output_string cfile t) fmt in + let hput str = output_string hfile str in + let cput str = output_string cfile str in + let sp = { hfmt = hfmt; cfmt=cfmt; hput = hput; cput = cput; soc = soc } in + (* include the header files that define the step functions used by the soc *) + if (one_file()) then () else ( + let (used_soc:Soc.key list) = KeySet.elements (get_used_soc soc) in + List.iter + (fun sk -> if inlined_soc sk then () else + hfmt "#include \"%s.h\"\n" (string_of_soc_key sk) + ) + used_soc; + if msoc_key <> soc.key then hfmt "%s\n" (Soc2cDep.typedef_of_soc soc); + ); + if SocUtils.is_memory_less soc then () else ( cfmt "// Memory initialisation for %s\n" ctx_name; 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 *) - if Lv6MainArgs.global_opt.Lv6MainArgs.soc2c_inline_loops then () else + 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)) -> + (* set the parameter fields that have a default value (arrow,fby) *) + | (_,_,MemInit (ve)) -> assert(var_expr_is_not_a_slice ve); cfmt " ctx->_memory = %s;" (string_of_var_expr soc ve) - | _ -> () + | _ -> () ); - cfmt "\n}\n"; + cfmt "\n}\n"; if SocUtils.is_memory_less soc then () (*no ctx at all in this case ! *) @@ -191,29 +250,38 @@ let (soc2c: int -> out_channel -> out_channel -> Soc.tbl -> Soc.t -> unit) = hfmt "void %s_init(%s_type* ctx);\n" ctx_name ctx_name; cfmt "void %s_init(%s_type* ctx){" ctx_name ctx_name; cfmt " - // ctx->client_data = cdata; - %s_reset(ctx); -} + // ctx->client_data = cdata; + %s_reset(ctx); + } " ctx_name ) else ( - cfmt "// Memory allocation for %s\n" ctx_name; - hfmt "%s_type* %s_new_ctx();\n" ctx_name ctx_name; - cfmt "%s_type* %s_new_ctx(){" ctx_name ctx_name; - cfmt " + cfmt "// Memory allocation for %s\n" ctx_name; + hfmt "%s_type* %s_new_ctx();\n" ctx_name ctx_name; + cfmt "%s_type* %s_new_ctx(){" ctx_name ctx_name; + cfmt " %s_type* ctx = (%s_type*)calloc(1, sizeof(%s_type)); // ctx->client_data = cdata; %s_reset(ctx); - return ctx; + return ctx; } " ctx_name ctx_name ctx_name ctx_name) ); cfmt "// Step function(s) for %s\n" ctx_name; List.iter (step2c stbl sp) soc.step; - () - ) + (); + if not (one_file() || msoc_key = soc.key) then ( + hfmt "#endif /* _%s_H_FILE */" base; + close_out hfile; + close_out cfile; + Printf.printf "%s.h has been generated.\n" base; + Printf.printf "%s.c has been generated.\n" base; + flush stdout + ); + cfiles_acc + ) (****************************************************************************) let (type_to_format_string : Data.t -> string) = @@ -232,7 +300,6 @@ let (type_to_format_string : Data.t -> string) = (****************************************************************************) -module KeySet = Set.Make(struct type t = Soc.key let compare = compare end) module ItemKeySet = Set.Make(struct type t = Lic.item_key let compare = compare end) (* To perform the topological sort of typedef. nf stands for "no @@ -257,67 +324,80 @@ let (is_extern_type: Lic.type_ -> bool) = | Lic.External_type_eff _ -> true | _ -> false -let (typedef : LicPrg.t -> Soc.tbl -> Soc.t -> string) = + +(* returns the typedef *) +let user_typedef licprg = + let to_c k t = + Printf.sprintf "typedef %s;\n" (Soc2cUtil.lic_type_to_c t (long2s k)) + in + let rec (typedef_to_string : Lic.item_key -> Lic.type_ -> string * ItemKeySet.t -> + string * ItemKeySet.t) = + fun k t acc -> + (* topological sort according to type dep *) + if is_extern_type t then acc else + if ItemKeySet.mem k (snd acc) then acc else + let type_list = find_typedep_nf t in + let acc = List.fold_left + (fun acc k -> + match LicPrg.find_type licprg k with + | Some t -> typedef_to_string k t acc + | None -> acc (* occurs ? *) + ) + acc type_list + in + ((fst acc)^(to_c k t), ItemKeySet.add k (snd acc)) + in + fst (LicPrg.fold_types typedef_to_string licprg ("",ItemKeySet.empty)) + +let (typedef_all : LicPrg.t -> Soc.tbl -> Soc.t -> string) = fun licprg soc_tbl main_soc -> - (* We need to print the ctx typedef in a good order + (* 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 + the tree of soc instances which root is the main soc. + *) + + (* Soc with memory can be used several times; hence we mark via this set the ones that have already been visited. *) - let rec (soc_with_mem : string * KeySet.t -> Soc.t -> string* KeySet.t) = - fun (acc,visited) soc -> - if KeySet.mem soc.key visited then (acc,visited) else - let visited = KeySet.add soc.key visited in - let acc,visited = - List.fold_left - (fun (acc,visited) (iname, sk) -> - let soc = SocUtils.find_no_exc sk soc_tbl in - soc_with_mem (acc,visited) soc - ) - (acc,visited) soc.instances - in - let acc = acc ^ (Soc2cDep.typedef_of_soc soc) in - acc,visited - in - let soc_ctx_typedef_with = - if SocUtils.ctx_is_global main_soc then "" else fst (soc_with_mem ("",visited) main_soc) - in - (* Then we still have to print memoryless soc that can not appear + let visited = KeySet.empty in + let rec (soc_with_mem : string * KeySet.t -> Soc.t -> string * KeySet.t) = + (* recursively traverse the soc dependancies to define the typedef + in the good order (i.e., define before use) *) + fun (acc,visited) soc -> + if KeySet.mem soc.key visited then (acc,visited) else + let visited = KeySet.add soc.key visited in + let acc,visited = + List.fold_left + (fun (acc,visited) (iname, sk) -> + let soc = SocUtils.find_no_exc sk soc_tbl in + soc_with_mem (acc,visited) soc + ) + (acc,visited) soc.instances + in + let acc = acc ^ ( + if one_file() || soc.key = main_soc.key then + Soc2cDep.typedef_of_soc soc + else + (Printf.sprintf "#include \"%s.h\"\n" (string_of_soc_key soc.key)) + ) + in + acc,visited + in + let soc_ctx_typedef_with_mem = + if SocUtils.ctx_is_global main_soc then "" else + fst (soc_with_mem ("",visited) main_soc) + in + (* Then we still have to print memoryless soc that can not appear as a soc instance *) - let soc_ctx_typedef_without = - let socs = Soc.SocMap.bindings soc_tbl in - let socs = snd (List.split socs) in - let memless_soc_to_string acc soc = - if SocUtils.is_memory_less soc then acc^(Soc2cDep.typedef_of_soc soc) else acc - in - List.fold_left memless_soc_to_string "" socs + let soc_ctx_typedef_without_mem = + let socs = Soc.SocMap.bindings soc_tbl in + let socs = snd (List.split socs) in + let memless_soc_to_string acc soc = + if SocUtils.is_memory_less soc then acc^(Soc2cDep.typedef_of_soc soc) else acc in - let to_c k t = - Printf.sprintf "typedef %s;\n" (Soc2cUtil.lic_type_to_c t (long2s k)) - in - let rec (typedef_to_string : Lic.item_key -> Lic.type_ -> string * ItemKeySet.t -> - string * ItemKeySet.t) = - fun k t acc -> - (* topological sort according to type dep *) - if is_extern_type t then acc else - if ItemKeySet.mem k (snd acc) then acc else - let type_list = find_typedep_nf t in - let acc = List.fold_left - (fun acc k -> - match LicPrg.find_type licprg k with - | Some t -> typedef_to_string k t acc - | None -> acc (* occurs ? *) - ) - acc type_list - in - ((fst acc)^(to_c k t), ItemKeySet.add k (snd acc)) - in - let user_typedef,_ = LicPrg.fold_types typedef_to_string licprg ("",ItemKeySet.empty) in - - "// User typedef \n"^user_typedef - ^"// Memoryless soc ctx typedef \n"^soc_ctx_typedef_without - ^"// Memoryfull soc ctx typedef \n"^soc_ctx_typedef_with + List.fold_left memless_soc_to_string "" socs + in +"// Memoryless soc ctx typedef \n"^soc_ctx_typedef_without_mem + ^"// Memoryfull soc ctx typedef \n"^soc_ctx_typedef_with_mem @@ -368,7 +448,7 @@ let (constdef : LicPrg.t -> string) = let (gen_memoryless_ctx : Soc.tbl -> string) = fun stbl -> let do_soc sk soc acc = - if (SocUtils.ctx_is_global soc) && not (inlined_soc soc) then + if (SocUtils.ctx_is_global soc) && not (inlined_soc soc.key) then let ctx_name = get_ctx_name soc.key in let ctx_name_type = ctx_name^"_type" in Printf.sprintf "%sextern %s %s;\n" acc ctx_name_type ctx_name @@ -768,7 +848,34 @@ let (f : Lv6MainArgs.t -> Soc.key -> Soc.tbl -> LicPrg.t -> unit) = let occ = open_out cfile in let och = open_out hfile in let ocl = open_out loopfile in - try + let types_h_oc = open_out "lustre_types.h" in + let consts_h_oc = open_out "lustre_consts.h" in + let consts_c_oc = open_out "lustre_consts.c" in + let cfiles_acc = ["lustre_consts.c"; cfile] in + Lv6util.entete consts_h_oc "/*" "*/" ; + output_string consts_h_oc (constdef licprg); + Lv6util.entete consts_c_oc "/*" "*/" ; + output_string consts_c_oc "#include \"lustre_consts.h\""; + Lv6util.entete types_h_oc "/*" "*/" ; + output_string types_h_oc (" +#ifndef _SOC2C_PREDEF_TYPES +#define _SOC2C_PREDEF_TYPES +typedef int _boolean; +typedef int _integer; +typedef char* _string; +typedef double _real; +typedef double _double; +typedef float _float; +#define _false 0 +#define _true 1 +#endif +// end of _SOC2C_PREDEF_TYPES +// User typedef +#ifndef _"^base^"_TYPES +#define _"^base^"_TYPES\n"); + output_string types_h_oc (user_typedef licprg); + output_string types_h_oc ("#endif // enf of _"^base^"_TYPES\n"); + try let putc s = output_string occ s in let puth s = output_string och s in let main_soc = Soc.SocMap.find msoc stbl in @@ -789,54 +896,48 @@ let (f : Lv6MainArgs.t -> Soc.key -> Soc.tbl -> LicPrg.t -> unit) = #include <stdlib.h> #include <string.h> -#ifndef _SOC2C_PREDEF_TYPES -#define _SOC2C_PREDEF_TYPES -typedef int _boolean; -typedef int _integer; -typedef char* _string; -typedef double _real; -typedef double _double; -typedef float _float; -#define _false 0 -#define _true 1 -#endif -// end of _SOC2C_PREDEF_TYPES +#include \"lustre_types.h\" "; if needs_hfile then puth (Printf.sprintf "#include \"%s\"\n" ext_hfile); - puth (Printf.sprintf "#ifndef _%s_LUS2LIC_H_HILE\n" base); - puth (Printf.sprintf "#define _%s_LUS2LIC_H_HILE\n" base); + puth (Printf.sprintf "#ifndef _%s_H_FILE\n" base); + puth (Printf.sprintf "#define _%s_H_FILE\n" base); putc (Printf.sprintf "#include \"%s\"\n" hfile); - puth (typedef licprg stbl main_soc ); - putc (constdef licprg); + puth (typedef_all licprg stbl main_soc ); (* putc (Soc2cExtern.cpy_declaration licprg); *) putc (Soc2cExtern.const_declaration licprg); + let cfiles_acc = if io_transmit_mode () = Lv6MainArgs.Heap then ( puth "/////////////////////////////////////////////////\n"; puth "//// Static allocation of memoryless soc ctx\n"; - List.iter (soc2c 1 och occ stbl) socs; - puth "/////////////////////////////////////////////////\n" - ); + let cfiles_acc = List.fold_left (soc2c 1 och occ stbl msoc) cfiles_acc socs in + puth "/////////////////////////////////////////////////\n"; + cfiles_acc + ) else cfiles_acc + in putc "//// Defining step functions\n"; - List.iter (soc2c 2 och occ stbl) socs; + let cfiles_acc = List.fold_left (soc2c 2 och occ stbl msoc) cfiles_acc socs in puth "/////////////////////////////////////////////////\n"; - let l = (Soc2cGenAssign.gen_used_types socs) in - if l <> [] then puth "// Defining array and extern types assignments \n"; - List.iter (fun t -> puth (Soc2cGenAssign.f t)) l; - + let l = (Soc2cGenAssign.gen_used_types socs) in + if l <> [] then ( + output_string types_h_oc "// Defining array and extern types assignments \n"; + List.iter (fun t -> output_string types_h_oc (Soc2cGenAssign.f t)) l + ); puth "#endif\n"; flush occ; close_out occ; flush och; close_out och; flush ocl; close_out ocl; + flush consts_h_oc; close_out consts_h_oc; + flush consts_c_oc; close_out consts_c_oc; Printf.printf "%s has been generated.\n" loopfile; - Printf.printf "%s has been generated.\n" hfile; + Printf.printf "%s has been generated.\n" hfile; Printf.printf "%s has been generated.\n" cfile; flush stdout; let node = args.main_node in - let execfile = if args.Lv6MainArgs.outfile = "" then (node^".out") + let execfile = if args.Lv6MainArgs.outfile = "" then (node^".exec") else args.Lv6MainArgs.outfile in let cflags = try Sys.getenv "CFLAGS" with Not_found -> "" in @@ -847,16 +948,16 @@ typedef float _float; else loopfile, "I am a dead string...", "gcc" in - let ogensim_exe = node^"4ogensim.out" in + let ogensim_exe = node^"4ogensim.exec" in + let cfiles_acc = if needs_cfile then ext_cfile::cfiles_acc else cfiles_acc in + let cfiles = String.concat " " cfiles_acc in let gcc, gcc_ogensim = - if needs_cfile then - Printf.sprintf "%s -o %s \\\n\t%s %s %s %s" gcc execfile cfile cflags ext_cfile main_file, - Printf.sprintf "%s -o %s \\\n\t%s %s %s %s" gcc ogensim_exe cfile cflags - ext_cfile ogensim_main_file - else - Printf.sprintf "%s -o %s \\\n\t%s %s %s" gcc execfile cfile cflags main_file, - Printf.sprintf "%s -o %s \\\n\t%s %s %s" gcc ogensim_exe cfile cflags ogensim_main_file - in let main_step = (string_of_soc_key msoc)^"_step" in + Printf.sprintf "%s -o %s \\\n\t%s %s %s" + gcc execfile cfiles cflags main_file, + Printf.sprintf "%s -o %s \\\n\t%s %s %s" + gcc ogensim_exe cfiles cflags ogensim_main_file + in + let main_step = (string_of_soc_key msoc)^"_step" in let gcc = if Lv6MainArgs.global_opt.Lv6MainArgs.gen_wcet then ("#!/bin/bash set -x @@ -952,6 +1053,7 @@ fi in output_string ocsh (gcc^"\n\n"); flush ocsh; + close_out types_h_oc; close_out ocsh; let call_script = "sh "^node^".sh" in if args.Lv6MainArgs.launch_cc then ( @@ -962,12 +1064,13 @@ fi flush stdout with | Delete_C_files -> - close_out occ; - close_out och; - close_out ocl; - if Sys.file_exists hfile then Sys.remove hfile; - if Sys.file_exists cfile then Sys.remove cfile; - if Sys.file_exists ext_cfile then Sys.remove ext_cfile; - if Sys.file_exists ext_hfile then Sys.remove ext_hfile; - if Sys.file_exists loopfile then Sys.remove loopfile; - exit 2 + close_out types_h_oc; + close_out occ; + close_out och; + close_out ocl; + if Sys.file_exists hfile then Sys.remove hfile; + if Sys.file_exists cfile then Sys.remove cfile; + if Sys.file_exists ext_cfile then Sys.remove ext_cfile; + if Sys.file_exists ext_hfile then Sys.remove ext_hfile; + if Sys.file_exists loopfile then Sys.remove loopfile; + exit 2 diff --git a/src/soc2cDep.mli b/src/soc2cDep.mli index ccb922b35958b3126c43b429f8ba98b5c5545290..6e4aeddd964411da8e53beeb84af665466f071d7 100644 --- a/src/soc2cDep.mli +++ b/src/soc2cDep.mli @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 26/02/2015 (at 13:45) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/10/2016 (at 17:28) by Erwan Jahier> *) (** Choose between the various C code generators (heap-based, Stack @@ -41,7 +41,7 @@ val ctx_var : Soc2cUtil.var_kind -> Soc.t -> Lv6Id.t -> string val gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string -> string -> string -> string (* should this soc be inlined? (depends on Lv6MainArgs.global_opt) *) -val inlined_soc : Soc.t -> bool +val inlined_soc : Soc.key -> bool (** Returns the C code corresponding a soc key *) val get_predef_op: Soc.key -> string diff --git a/src/soc2cHeap.ml b/src/soc2cHeap.ml index d9a79dabbba5d3b73b85f8b9d1bccbc0671dfaee..d3ee948ef022d73d9a12b6654eeef6f071b28089 100644 --- a/src/soc2cHeap.ml +++ b/src/soc2cHeap.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 09/09/2016 (at 11:56) by Erwan Jahier> *) +(* Time-stamp: <modified the 07/10/2016 (at 10:31) by Erwan Jahier> *) open Soc2cUtil open Soc2cIdent @@ -56,9 +56,9 @@ fun soc vi vo -> let (step_name : Soc.key -> string -> string) = - fun sk sm -> - let str = Printf.sprintf "%s_%s" (Soc2cIdent.get_soc_name sk) sm in - id2s str + fun sk sm -> + let str = Printf.sprintf "%s_%s" (Soc2cIdent.get_soc_name sk) sm in + id2s str let (ctx_var : var_kind -> Soc.t -> Lv6Id.t -> string) = fun opt soc id -> @@ -80,11 +80,12 @@ let (list_split : 'a list -> int -> 'a list * 'a list) = let _ = assert (list_split [1;2;3;4;5;6] 3 = ([1;2;3],[4;5;6])) -let (inline_soc : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string option) = +let (inline_soc : + Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string option) = fun soc called_soc vel_out vel_in -> let called_soc_name,_,_ = called_soc.key in match called_soc_name with - (* those soc are inlined. Currently we only inlile ite because + (* those soc are inlined. Currently we only inline ite because of its polymorphism. Maybe simple arith operators (+-,*,/,etc.) should be inlined too. *) | "Lustre::if" -> @@ -102,7 +103,7 @@ let (inline_soc : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> s try if Lv6MainArgs.global_opt.Lv6MainArgs.gen_c_inline_predef - && Soc2cPredef.is_call_supported called_soc_name soc + && Soc2cPredef.is_call_supported called_soc_name then 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 @@ -113,10 +114,10 @@ let (inline_soc : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> s (* Printf.eprintf "won't inline %s\n" called_soc_name; *) None (* exported *) -let (inlined_soc : Soc.t -> bool) = - fun soc -> - let soc_name,_,_ = soc.key in - soc_name = "Lustre::if" || Soc2cPredef.is_call_supported soc_name soc +let (inlined_soc : Soc.key -> bool) = + fun key -> + let soc_name,_,_ = key in + soc_name = "Lustre::if" || Soc2cPredef.is_call_supported soc_name (* exported *) @@ -152,13 +153,14 @@ let (gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> in (String.concat "" l) ^"\n" in - let str = Printf.sprintf " %s(%s); \n" (step_name called_soc.key sname) step_arg in + let str = Printf.sprintf " %s(%s); \n" + (step_name called_soc.key sname) step_arg in (si_str ^ str ^ so_str) (* exported *) let (typedef_of_soc : Soc.t -> string) = fun soc -> - if inlined_soc soc then "" (* don't generate code if inlined *) else + if inlined_soc soc.key then "" (* don't generate code if inlined *) else let ctx_name = get_ctx_name soc.key in let ctx_name_type = ctx_name^"_type" in let il,ol = soc.profile in @@ -170,7 +172,8 @@ let (typedef_of_soc : Soc.t -> string) = (match soc.memory with | No_mem -> "" | Mem t -> - Printf.sprintf " /*Memory cell*/\n %s ;\n" (id2s (Soc2cUtil.data_type_to_c t "_memory")) + Printf.sprintf " /*Memory cell*/\n %s ;\n" + (id2s (Soc2cUtil.data_type_to_c t "_memory")) | Mem_hidden -> "" ) in diff --git a/src/soc2cHeap.mli b/src/soc2cHeap.mli index 777258852de74c2df31569c4e371925ccf1af5d0..5af3a1b4045110f61415db35219854b246ee74b4 100644 --- a/src/soc2cHeap.mli +++ b/src/soc2cHeap.mli @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 26/02/2015 (at 13:46) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/10/2016 (at 17:29) by Erwan Jahier> *) (** Gathers all entities (functions, types) that implement the heap-based C generator. *) @@ -33,6 +33,6 @@ val ctx_var : Soc2cUtil.var_kind -> Soc.t -> Lv6Id.t -> string val gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string -> string -> string -> string (* should this soc be inlined? (depends on Lv6MainArgs.global_opt) *) -val inlined_soc : Soc.t -> bool +val inlined_soc : Soc.key -> bool val typedef_of_soc : Soc.t -> string diff --git a/src/soc2cIdent.ml b/src/soc2cIdent.ml index d088eb84f9bd3493d680c5f8f126a1232e9f8b73..e852593c880bdf446d4c08396cca840d52dc8942 100644 --- a/src/soc2cIdent.ml +++ b/src/soc2cIdent.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 26/02/2015 (at 11:24) by Erwan Jahier> *) +(* Time-stamp: <modified the 07/10/2016 (at 10:48) by Erwan Jahier> *) open Soc let colcol = Str.regexp "::" @@ -87,11 +87,13 @@ let _ = assert (get_base_name ("x", [Data.Int], Soc.Nomore) = "x"); assert (get_base_name ("x", [Data.Real], Soc.Nomore) = "x_3"); assert (get_base_name ("x", [Data.Bool], Soc.Nomore) = "x_2"); - Hashtbl.clear key_table + Hashtbl.clear key_table; + () let (get_ctx_name : Soc.key -> string) = fun sk -> (get_base_name sk) ^ "_ctx" +(* This function is injective *) let (get_soc_name : Soc.key -> string) = fun sk -> (get_base_name sk) diff --git a/src/soc2cPredef.ml b/src/soc2cPredef.ml index 5960ef83e7afd59ec9365819842725ae451faa51..8c4152a8f98a6eb62c678e0ad8a69aac8a682091 100644 --- a/src/soc2cPredef.ml +++ b/src/soc2cPredef.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 21/01/2015 (at 17:48) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/10/2016 (at 17:32) by Erwan Jahier> *) (* A local exception used to check if a predef is supported. The idea is that when gen_call_do is called with empty lists, @@ -30,8 +30,8 @@ let stdimpl ll rl = (* exported *) (* ZZZ code dupl with SocPredef2cHeap.get_predef_op *) -let (gen_call_do : string -> Soc.t -> string list -> string list -> string) = - fun op soc vel_in vel_out -> +let (gen_call_do : string -> string list -> string list -> string) = + fun op vel_in vel_out -> let lstduna str = stduna str vel_in vel_out in let lstdbin str = stdbin str vel_in vel_out in let lstdimpl () = stdimpl vel_in vel_out in @@ -84,11 +84,11 @@ let (gen_call_do : string -> Soc.t -> string list -> string list -> string) = let (gen_call : string -> Soc.t -> string list -> string list -> string) = fun op soc vel_in vel_out -> assert ((vel_in,vel_out) <> ([],[])); - gen_call_do op soc vel_in vel_out + gen_call_do op vel_in vel_out -let (is_call_supported : string -> Soc.t -> bool) = - fun op soc -> - try ignore (gen_call_do op soc [] []); assert false (* sno *) +let (is_call_supported : string -> bool) = + fun op -> + try ignore (gen_call_do op [] []); assert false (* sno *) with | Is_supported -> true | Not_found -> false diff --git a/src/soc2cPredef.mli b/src/soc2cPredef.mli index 16ddfe32d914899d892f30122f7ba36ad35474be..f4aaeef6814182006f55611dd28d5cfea99ef7d8 100644 --- a/src/soc2cPredef.mli +++ b/src/soc2cPredef.mli @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 01/10/2014 (at 10:04) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/10/2016 (at 17:32) by Erwan Jahier> *) (* provides a direct definition to predefined arith operators. @@ -8,4 +8,4 @@ raises Not_found if it is not used with such a predef op val gen_call : string -> Soc.t -> string list -> string list -> string -val is_call_supported : string -> Soc.t -> bool +val is_call_supported : string -> bool diff --git a/src/soc2cStack.ml b/src/soc2cStack.ml index cf75f3d9af8e6a702eb3846b0c520b0f306f14ce..2bd8827746b8f2f4c6bd339160f25dafded8a2c2 100644 --- a/src/soc2cStack.ml +++ b/src/soc2cStack.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 09/09/2016 (at 11:47) by Erwan Jahier> *) +(* Time-stamp: <modified the 07/10/2016 (at 10:55) by Erwan Jahier> *) open Soc2cUtil open Soc2cIdent @@ -95,7 +95,9 @@ fun soc vo vi -> let (step_name : Soc.key -> string -> string) = fun sk sm -> let str = Printf.sprintf "%s_%s" (Soc2cIdent.get_soc_name sk) sm in - id2s str + (* Printf.printf " XXX step_name(%s)=%s\n" (SocUtils.string_of_soc_key sk) str; *) + (* flush stdout; *) + (id2s str) let (ctx_var : var_kind -> Soc.t -> Lv6Id.t -> string) = fun opt soc id -> @@ -138,7 +140,7 @@ let (inline_soc : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> s try if Lv6MainArgs.global_opt.Lv6MainArgs.gen_c_inline_predef - && Soc2cPredef.is_call_supported called_soc_name soc + && Soc2cPredef.is_call_supported called_soc_name then let vel_in_str = List.map (string_of_var_expr soc) vel_in in let vel_in = List.map2 @@ -158,10 +160,10 @@ let (inline_soc : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> s (* Printf.eprintf "won't inline %s\n" called_soc_name; *) None (* exported *) -let (inlined_soc : Soc.t -> bool) = - fun soc -> - let soc_name,_,_ = soc.key in - soc_name = "Lustre::if" || Soc2cPredef.is_call_supported soc_name soc +let (inlined_soc : Soc.key -> bool) = + fun key -> + let soc_name,_,_ = key in + soc_name = "Lustre::if" || Soc2cPredef.is_call_supported soc_name (* exported *) @@ -193,7 +195,7 @@ let (gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> (* exported *) let (typedef_of_soc : Soc.t -> string) = fun soc -> - if inlined_soc soc then "" (* don't generate code if inlined *) else + if inlined_soc soc.key then "" (* don't generate code if inlined *) else if SocUtils.is_memory_less soc then "" else let ctx_name = get_ctx_name soc.key in let ctx_name_type = ctx_name^"_type" in @@ -255,4 +257,4 @@ let (get_step_prototype : Soc.step_method -> Soc.t -> string * string) = let ctx = Printf.sprintf "%s_type* ctx" (get_ctx_name soc.key) in let ctx_decl = Printf.sprintf "%s_type*" (get_ctx_name soc.key) in Printf.sprintf "void %s(%s,%s);\n" sname params_decl ctx_decl, - Printf.sprintf "void %s(%s,%s){\n" sname params ctx + Printf.sprintf "void %s(%s,%s){" sname params ctx diff --git a/src/soc2cStack.mli b/src/soc2cStack.mli index b6ab42c5c3930400d0a6e045bfe486a3a0864f9f..44b7044d57699e1e5b5c89ca927407fccdc34f5e 100644 --- a/src/soc2cStack.mli +++ b/src/soc2cStack.mli @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 26/02/2015 (at 13:46) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/10/2016 (at 17:28) by Erwan Jahier> *) (** Gathers all entities (functions, types) that implement the heap-based C generator. *) @@ -41,6 +41,6 @@ val ctx_var : Soc2cUtil.var_kind -> Soc.t -> Lv6Id.t -> string val gen_step_call : Soc.t -> Soc.t -> Soc.var_expr list -> Soc.var_expr list -> string -> string -> string -> string (* should this soc be inlined? (depends on Lv6MainArgs.global_opt) *) -val inlined_soc : Soc.t -> bool +val inlined_soc : Soc.key -> bool val typedef_of_soc : Soc.t -> string diff --git a/src/socExec.ml b/src/socExec.ml index 6dcb1cd01b79bbce9044e7371dd60f80ce989e21..93df2a19e5ab3e8fb93bb810704d366e89ad31e4 100644 --- a/src/socExec.ml +++ b/src/socExec.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 03/02/2016 (at 15:07) by Erwan Jahier> *) +(* Time-stamp: <modified the 20/09/2016 (at 15:17) by Erwan Jahier> *) open Soc open Data @@ -75,7 +75,10 @@ let rec (soc_step : Soc.step_method -> Soc.tbl -> Soc.t -> SocExecValue.ctx let ctx = { ctx with cpath=inst_name::ctx.cpath } in let ctx = if clk = B true then - let node_step = match node_soc.step with [step] -> step | _ -> assert false in + let node_step = match node_soc.step with + [step] -> step + | _ -> assert false + in let ctx = do_step inst_name node_step ctx soc_tbl node_soc vel_in vel_out in { ctx with cpath=path_saved } else diff --git a/test/lus2lic.sum b/test/lus2lic.sum index 3d1481d34bec94cb31448782b4a8a147773d80a5..434b12e1d9b26445ab016158ab06bb57dde5c58a 100644 --- a/test/lus2lic.sum +++ b/test/lus2lic.sum @@ -1,5 +1,5 @@ ==> lus2lic0.sum <== -Test Run By jahier on Tue Sep 20 14:20:05 +Test Run By jahier on Fri Oct 7 15:46:11 Native configuration is x86_64-unknown-linux-gnu === lus2lic0 tests === @@ -64,7 +64,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 Tue Sep 20 14:20:07 +Test Run By jahier on Fri Oct 7 15:46:11 Native configuration is x86_64-unknown-linux-gnu === lus2lic1 tests === @@ -75,329 +75,327 @@ Schedule of variations: Running target unix Running ./lus2lic.tests/test1.exp ... PASS: ./lus2lic {-2c COUNTER.lus -n COUNTER} -PASS: gcc -o COUNTER.exec COUNTER_COUNTER.c COUNTER_COUNTER_loop.c +PASS: sh COUNTER.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c COUNTER.lus {} PASS: ./lus2lic {-2c CURRENT.lus -n CURRENT} -PASS: gcc -o CURRENT.exec CURRENT_CURRENT.c CURRENT_CURRENT_loop.c +PASS: sh CURRENT.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c CURRENT.lus {} PASS: ./lus2lic {-2c Condact.lus -n Condact} PASS: ./lus2lic {-2c EDGE.lus -n EDGE} -PASS: gcc -o EDGE.exec EDGE_EDGE.c EDGE_EDGE_loop.c +PASS: sh EDGE.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c EDGE.lus {} PASS: ./lus2lic {-2c ELMU.lus -n ELMU} -PASS: gcc -o ELMU.exec ELMU_ELMU.c ELMU_ELMU_loop.c +PASS: sh ELMU.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ELMU.lus {} PASS: ./lus2lic {-2c FALLING_EDGE.lus -n FALLING_EDGE} -PASS: gcc -o FALLING_EDGE.exec FALLING_EDGE_FALLING_EDGE.c FALLING_EDGE_FALLING_EDGE_loop.c +PASS: sh FALLING_EDGE.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c FALLING_EDGE.lus {} PASS: ./lus2lic {-2c FillFollowedByRed.lus -n FillFollowedByRed} -PASS: gcc -o FillFollowedByRed.exec FillFollowedByRed_FillFollowedByRed.c FillFollowedByRed_FillFollowedByRed_loop.c +PASS: sh FillFollowedByRed.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c FillFollowedByRed.lus {} PASS: ./lus2lic {-2c Gyroscope.lus -n Gyroscope} -PASS: gcc -o Gyroscope.exec Gyroscope_Gyroscope.c Gyroscope_Gyroscope_loop.c +PASS: sh Gyroscope.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c Gyroscope.lus {} PASS: ./lus2lic {-2c Gyroscope2.lus -n Gyroscope2} -PASS: gcc -o Gyroscope2.exec Gyroscope2_Gyroscope2.c Gyroscope2_Gyroscope2_loop.c +PASS: sh Gyroscope2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c Gyroscope2.lus {} PASS: ./lus2lic {-2c aa.lus -n aa} -PASS: gcc -o aa.exec aa_aa.c aa_aa_loop.c +PASS: sh aa.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c aa.lus {} PASS: ./lus2lic {-2c access.lus -n access} -PASS: gcc -o access.exec access_access.c access_access_loop.c +PASS: sh access.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c access.lus {} PASS: ./lus2lic --expand-nodes {-2c activation1.lus -n activation1} -PASS: gcc -o activation1.exec activation1_activation1.c activation1_activation1_loop.c +PASS: sh activation1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c activation1.lus { --expand-nodes} PASS: ./lus2lic --expand-nodes {-2c activation2.lus -n activation2} -PASS: gcc -o activation2.exec activation2_activation2.c activation2_activation2_loop.c +PASS: sh activation2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c activation2.lus { --expand-nodes} PASS: ./lus2lic {-2c activation_ec.lus -n activation_ec} -PASS: gcc -o activation_ec.exec activation_ec_activation_ec.c activation_ec_activation_ec_loop.c +PASS: sh activation_ec.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c activation_ec.lus {} PASS: ./lus2lic {-2c after.lus -n after} -PASS: gcc -o after.exec after_after.c after_after_loop.c +PASS: sh after.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c after.lus {} PASS: ./lus2lic {-2c alias.lus -n alias} -PASS: gcc -o alias.exec alias_alias.c alias_alias_loop.c +PASS: sh alias.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c alias.lus {} FAIL: Generate c code : ./lus2lic {-2c amaury.lus -n amaury} PASS: ./lus2lic {-2c arbitre.lus -n arbitre} PASS: ./lus2lic {-2c argos.lus -n argos} -PASS: gcc -o argos.exec argos_argos.c argos_argos_loop.c +PASS: sh argos.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c argos.lus {} PASS: ./lus2lic {-2c array_concat.lus -n array_concat} -PASS: gcc -o array_concat.exec array_concat_array_concat.c array_concat_array_concat_loop.c +PASS: sh array_concat.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c array_concat.lus {} PASS: ./lus2lic {-2c array_concat2.lus -n array_concat2} -PASS: gcc -o array_concat2.exec array_concat2_array_concat2.c array_concat2_array_concat2_loop.c +PASS: sh array_concat2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c array_concat2.lus {} PASS: ./lus2lic {-2c arrays.lus -n arrays} -PASS: gcc -o arrays.exec arrays_arrays.c arrays_arrays_loop.c +PASS: sh arrays.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c arrays.lus {} PASS: ./lus2lic --expand-nodes {-2c asservi.lus -n asservi} PASS: ./lus2lic {-2c bad_call03.lus -n bad_call03} -PASS: gcc -o bad_call03.exec bad_call03_bad_call03.c bad_call03_bad_call03_loop.c +PASS: sh bad_call03.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bad_call03.lus {} PASS: ./lus2lic {-2c bascule.lus -n bascule} -PASS: gcc -o bascule.exec bascule_bascule.c bascule_bascule_loop.c +PASS: sh bascule.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bascule.lus {} PASS: ./lus2lic {-2c bob.lus -n bob} -PASS: gcc -o bob.exec bob_bob.c bob_bob_loop.c +PASS: sh bob.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bob.lus {} PASS: ./lus2lic {-2c bred.lus -n bred} -PASS: gcc -o bred.exec bred_bred.c bred_bred_loop.c +PASS: sh bred.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bred.lus {} PASS: ./lus2lic {-2c bred_lv4.lus -n bred_lv4} -PASS: gcc -o bred_lv4.exec bred_lv4_bred_lv4.c bred_lv4_bred_lv4_loop.c +PASS: sh bred_lv4.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bred_lv4.lus {} PASS: ./lus2lic {-2c bug.lus -n bug} -PASS: gcc -o bug.exec bug_bug.c bug_bug_loop.c +PASS: sh bug.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bug.lus {} PASS: ./lus2lic {-2c bug2.lus -n bug2} -PASS: gcc -o bug2.exec bug2_bug2.c bug2_bug2_loop.c +PASS: sh bug2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c bug2.lus {} PASS: ./lus2lic {-2c calculs_max.lus -n calculs_max} -PASS: gcc -o calculs_max.exec calculs_max_calculs_max.c calculs_max_calculs_max_loop.c +PASS: sh calculs_max.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c calculs_max.lus {} PASS: ./lus2lic {-2c call.lus -n call} PASS: ./lus2lic {-2c call01.lus -n call01} PASS: ./lus2lic {-2c call02.lus -n call02} -PASS: gcc -o call02.exec call02_call02.c call02_call02_loop.c +PASS: sh call02.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c call02.lus {} PASS: ./lus2lic {-2c call03.lus -n call03} PASS: ./lus2lic {-2c call04.lus -n call04} -PASS: gcc -o call04.exec call04_call04.c call04_call04_loop.c +PASS: sh call04.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c call04.lus {} PASS: ./lus2lic {-2c call05.lus -n call05} PASS: ./lus2lic {-2c call06.lus -n call06} PASS: ./lus2lic {-2c call07.lus -n call07} -PASS: gcc -o call07.exec call07_call07.c call07_call07_loop.c +PASS: sh call07.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c call07.lus {} PASS: ./lus2lic {-2c carV2.lus -n carV2} -PASS: gcc -o carV2.exec carV2_carV2.c carV2_carV2_loop.c +PASS: sh carV2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c carV2.lus {} FAIL: Generate c code : ./lus2lic {-2c carligths.lus -n carligths} PASS: ./lus2lic {-2c ck2.lus -n ck2} -PASS: gcc -o ck2.exec ck2_ck2.c ck2_ck2_loop.c +PASS: sh ck2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ck2.lus {} PASS: ./lus2lic {-2c ck3.lus -n ck3} -PASS: gcc -o ck3.exec ck3_ck3.c ck3_ck3_loop.c +PASS: sh ck3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ck3.lus {} PASS: ./lus2lic {-2c ck4.lus -n ck4} -PASS: gcc -o ck4.exec ck4_ck4.c ck4_ck4_loop.c +PASS: sh ck4.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ck4.lus {} PASS: ./lus2lic {-2c ck5.lus -n ck5} -PASS: gcc -o ck5.exec ck5_ck5.c ck5_ck5_loop.c +PASS: sh ck5.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ck5.lus {} PASS: ./lus2lic {-2c ck6.lus -n ck6} PASS: ./lus2lic {-2c ck7.lus -n ck7} -PASS: gcc -o ck7.exec ck7_ck7.c ck7_ck7_loop.c +PASS: sh ck7.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ck7.lus {} PASS: ./lus2lic {-2c clock1_2ms.lus -n clock1_2ms} -PASS: gcc -o clock1_2ms.exec clock1_2ms_clock1_2ms.c clock1_2ms_clock1_2ms_loop.c +PASS: sh clock1_2ms.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c clock1_2ms.lus {} PASS: ./lus2lic {-2c clock_ite.lus -n clock_ite} -PASS: gcc -o clock_ite.exec clock_ite_clock_ite.c clock_ite_clock_ite_loop.c +PASS: sh clock_ite.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c clock_ite.lus {} PASS: ./lus2lic {-2c cminus.lus -n cminus} -PASS: gcc -o cminus.exec cminus_cminus.c cminus_cminus_loop.c +PASS: sh cminus.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c cminus.lus {} PASS: ./lus2lic {-2c complex.lus -n complex} PASS: ./lus2lic {-2c compteur.lus -n compteur} -PASS: gcc -o compteur.exec compteur_compteur.c compteur_compteur_loop.c +PASS: sh compteur.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c compteur.lus {} FAIL: Generate c code : ./lus2lic {-2c cond01.lus -n cond01} PASS: ./lus2lic {-2c consensus.lus -n consensus} -PASS: gcc -o consensus.exec consensus_consensus.c consensus_consensus_loop.c +PASS: sh consensus.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c consensus.lus {} PASS: ./lus2lic {-2c consensus2.lus -n consensus2} -PASS: gcc -o consensus2.exec consensus2_consensus2.c consensus2_consensus2_loop.c +PASS: sh consensus2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c consensus2.lus {} PASS: ./lus2lic {-2c contractForElementSelectionInArray.lus -n contractForElementSelectionInArray} -PASS: gcc -o contractForElementSelectionInArray.exec contractForElementSelectionInArray_contractForElementSelectionInArray.c contractForElementSelectionInArray_contractForElementSelectionInArray_loop.c +PASS: sh contractForElementSelectionInArray.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c contractForElementSelectionInArray.lus {} PASS: ./lus2lic {-2c count.lus -n count} -PASS: gcc -o count.exec count_count.c count_count_loop.c +PASS: sh count.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c count.lus {} PASS: ./lus2lic {-2c cpt.lus -n cpt} -PASS: gcc -o cpt.exec cpt_cpt.c cpt_cpt_loop.c +PASS: sh cpt.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c cpt.lus {} PASS: ./lus2lic {-2c cst.lus -n cst} -PASS: gcc -o cst.exec cst_cst.c cst_cst_loop.c +PASS: sh cst.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c cst.lus {} PASS: ./lus2lic {-2c deSimone.lus -n deSimone} -PASS: gcc -o deSimone.exec deSimone_deSimone.c deSimone_deSimone_loop.c +PASS: sh deSimone.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c deSimone.lus {} PASS: ./lus2lic {-2c decl.lus -n decl} PASS: ./lus2lic {-2c declaration.lus -n declaration} PASS: ./lus2lic {-2c deconne.lus -n deconne} PASS: ./lus2lic {-2c dep.lus -n dep} -PASS: gcc -o dep.exec dep_dep.c dep_dep_loop.c +PASS: sh dep.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c dep.lus {} PASS: ./lus2lic {-2c dependeur.lus -n dependeur} -PASS: gcc -o dependeur.exec dependeur_dependeur.c dependeur_dependeur_loop.c +PASS: sh dependeur.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c dependeur.lus {} PASS: ./lus2lic {-2c dependeur_struct.lus -n dependeur_struct} -PASS: gcc -o dependeur_struct.exec dependeur_struct_dependeur_struct.c dependeur_struct_dependeur_struct_loop.c +PASS: sh dependeur_struct.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c dependeur_struct.lus {} PASS: ./lus2lic {-2c double_delay.lus -n double_delay} -PASS: gcc -o double_delay.exec double_delay_double_delay.c double_delay_double_delay_loop.c +PASS: sh double_delay.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c double_delay.lus {} PASS: ./lus2lic {-2c ec.lus -n ec} -PASS: gcc -o ec.exec ec_ec.c ec_ec_loop.c +PASS: sh ec.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ec.lus {} PASS: ./lus2lic {-2c enum0.lus -n enum0} -PASS: gcc -o enum0.exec enum0_enum0.c enum0_enum0_loop.c -PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c enum0.lus {} +FAIL: Check that the generated C code compiles : sh enum0.sh FAIL: Generate c code : ./lus2lic {-2c enum0_lv4.lus -n enum0_lv4} PASS: ./lus2lic {-2c ex.lus -n ex} -PASS: gcc -o ex.exec ex_ex.c ex_ex_loop.c +PASS: sh ex.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ex.lus {} PASS: ./lus2lic {-2c exclusion.lus -n exclusion} -PASS: gcc -o exclusion.exec exclusion_exclusion.c exclusion_exclusion_loop.c +PASS: sh exclusion.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c exclusion.lus {} PASS: ./lus2lic {-2c filliter.lus -n filliter} -PASS: gcc -o filliter.exec filliter_filliter.c filliter_filliter_loop.c +PASS: sh filliter.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c filliter.lus {} FAIL: Generate c code : ./lus2lic {-2c filter.lus -n filter} PASS: ./lus2lic {-2c flo.lus -n flo} -PASS: gcc -o flo.exec flo_flo.c flo_flo_loop.c +PASS: sh flo.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c flo.lus {} PASS: ./lus2lic {-2c followed_by.lus -n followed_by} -PASS: gcc -o followed_by.exec followed_by_followed_by.c followed_by_followed_by_loop.c +PASS: sh followed_by.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c followed_by.lus {} PASS: ./lus2lic {-2c fresh_name.lus -n fresh_name} -PASS: gcc -o fresh_name.exec fresh_name_fresh_name.c fresh_name_fresh_name_loop.c +PASS: sh fresh_name.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c fresh_name.lus {} PASS: ./lus2lic {-2c func_with_body.lus -n func_with_body} PASS: ./lus2lic {-2c hanane.lus -n hanane} -PASS: gcc -o hanane.exec hanane_hanane.c hanane_hanane_loop.c +PASS: sh hanane.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c hanane.lus {} PASS: ./lus2lic {-2c heater_control.lus -n heater_control} -PASS: gcc -o heater_control.exec heater_control_heater_control.c heater_control_heater_control_loop.c +PASS: sh heater_control.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c heater_control.lus {} PASS: ./lus2lic {-2c impl_priority.lus -n impl_priority} -PASS: gcc -o impl_priority.exec impl_priority_impl_priority.c impl_priority_impl_priority_loop.c +PASS: sh impl_priority.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c impl_priority.lus {} PASS: ./lus2lic {-2c import1.lus -n import1} PASS: ./lus2lic {-2c initial.lus -n initial} -PASS: gcc -o initial.exec initial_initial.c initial_initial_loop.c +PASS: sh initial.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c initial.lus {} PASS: ./lus2lic {-2c integrator.lus -n integrator} -PASS: gcc -o integrator.exec integrator_integrator.c integrator_integrator_loop.c +PASS: sh integrator.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c integrator.lus {} PASS: ./lus2lic {-2c is_stable.lus -n is_stable} -PASS: gcc -o is_stable.exec is_stable_is_stable.c is_stable_is_stable_loop.c +PASS: sh is_stable.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c is_stable.lus {} PASS: ./lus2lic {-2c iter.lus -n iter} -PASS: gcc -o iter.exec iter_iter.c iter_iter_loop.c +PASS: sh iter.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c iter.lus {} PASS: ./lus2lic {-2c iterFibo.lus -n iterFibo} -PASS: gcc -o iterFibo.exec iterFibo_iterFibo.c iterFibo_iterFibo_loop.c +PASS: sh iterFibo.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c iterFibo.lus {} PASS: ./lus2lic {-2c iterate.lus -n iterate} -PASS: gcc -o iterate.exec iterate_iterate.c iterate_iterate_loop.c +PASS: sh iterate.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c iterate.lus {} PASS: ./lus2lic {-2c long_et_stupide_nom_de_noeud.lus -n long_et_stupide_nom_de_noeud} -PASS: gcc -o long_et_stupide_nom_de_noeud.exec long_et_stupide_nom_de_noeud_long_et_stupide_nom_de_noeud.c long_et_stupide_nom_de_noeud_long_et_stupide_nom_de_noeud_loop.c +PASS: sh long_et_stupide_nom_de_noeud.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c long_et_stupide_nom_de_noeud.lus {} PASS: ./lus2lic {-2c lucky.lus -n lucky} -PASS: gcc -o lucky.exec lucky_lucky.c lucky_lucky_loop.c +PASS: sh lucky.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c lucky.lus {} PASS: ./lus2lic {-2c lustre_test1_ok.lus -n lustre_test1_ok} -PASS: gcc -o lustre_test1_ok.exec lustre_test1_ok_lustre_test1_ok.c lustre_test1_ok_lustre_test1_ok_loop.c +PASS: sh lustre_test1_ok.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c lustre_test1_ok.lus {} PASS: ./lus2lic {-2c map.lus -n map} -PASS: gcc -o map.exec map_map.c map_map_loop.c +PASS: sh map.sh FAIL: Try to compare lus2lic -exec and -2c: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c map.lus {} PASS: ./lus2lic {-2c map_red_iter.lus -n map_red_iter} -PASS: gcc -o map_red_iter.exec map_red_iter_map_red_iter.c map_red_iter_map_red_iter_loop.c +PASS: sh map_red_iter.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c map_red_iter.lus {} PASS: ./lus2lic {-2c mapdeRed.lus -n mapdeRed} -PASS: gcc -o mapdeRed.exec mapdeRed_mapdeRed.c mapdeRed_mapdeRed_loop.c +PASS: sh mapdeRed.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mapdeRed.lus {} PASS: ./lus2lic {-2c mapinf.lus -n mapinf} -PASS: gcc -o mapinf.exec mapinf_mapinf.c mapinf_mapinf_loop.c +PASS: sh mapinf.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mapinf.lus {} PASS: ./lus2lic {-2c mapiter.lus -n mapiter} -PASS: gcc -o mapiter.exec mapiter_mapiter.c mapiter_mapiter_loop.c +PASS: sh mapiter.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mapiter.lus {} PASS: ./lus2lic {-2c mappredef.lus -n mappredef} -PASS: gcc -o mappredef.exec mappredef_mappredef.c mappredef_mappredef_loop.c +PASS: sh mappredef.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mappredef.lus {} PASS: ./lus2lic {-2c matrice.lus -n matrice} -PASS: gcc -o matrice.exec matrice_matrice.c matrice_matrice_loop.c +PASS: sh matrice.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c matrice.lus {} PASS: ./lus2lic {-2c matrice2.lus -n matrice2} -PASS: gcc -o matrice2.exec matrice2_matrice2.c matrice2_matrice2_loop.c +PASS: sh matrice2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c matrice2.lus {} PASS: ./lus2lic {-2c minmax1.lus -n minmax1} -PASS: gcc -o minmax1.exec minmax1_minmax1.c minmax1_minmax1_loop.c +PASS: sh minmax1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax1.lus {} PASS: ./lus2lic {-2c minmax2.lus -n minmax2} -PASS: gcc -o minmax2.exec minmax2_minmax2.c minmax2_minmax2_loop.c +PASS: sh minmax2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax2.lus {} PASS: ./lus2lic {-2c minmax3.lus -n minmax3} -PASS: gcc -o minmax3.exec minmax3_minmax3.c minmax3_minmax3_loop.c +PASS: sh minmax3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax3.lus {} PASS: ./lus2lic {-2c minmax4.lus -n minmax4} -PASS: gcc -o minmax4.exec minmax4_minmax4.c minmax4_minmax4_loop.c +PASS: sh minmax4.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax4.lus {} PASS: ./lus2lic {-2c minmax4_bis.lus -n minmax4_bis} -PASS: gcc -o minmax4_bis.exec minmax4_bis_minmax4_bis.c minmax4_bis_minmax4_bis_loop.c +PASS: sh minmax4_bis.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax4_bis.lus {} PASS: ./lus2lic {-2c minmax5.lus -n minmax5} PASS: ./lus2lic {-2c minmax5_random.lus -n minmax5_random} PASS: ./lus2lic {-2c minmax6.lus -n minmax6} -PASS: gcc -o minmax6.exec minmax6_minmax6.c minmax6_minmax6_loop.c +PASS: sh minmax6.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minmax6.lus {} PASS: ./lus2lic {-2c minus.lus -n minus} -PASS: gcc -o minus.exec minus_minus.c minus_minus_loop.c +PASS: sh minus.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c minus.lus {} PASS: ./lus2lic {-2c mm.lus -n mm} -PASS: gcc -o mm.exec mm_mm.c mm_mm_loop.c +PASS: sh mm.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mm.lus {} PASS: ./lus2lic {-2c mm1.lus -n mm1} -PASS: gcc -o mm1.exec mm1_mm1.c mm1_mm1_loop.c +PASS: sh mm1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mm1.lus {} PASS: ./lus2lic {-2c mm22.lus -n mm22} -PASS: gcc -o mm22.exec mm22_mm22.c mm22_mm22_loop.c +PASS: sh mm22.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mm22.lus {} PASS: ./lus2lic {-2c mm3.lus -n mm3} -PASS: gcc -o mm3.exec mm3_mm3.c mm3_mm3_loop.c +PASS: sh mm3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mm3.lus {} PASS: ./lus2lic {-2c modelInst.lus -n modelInst} PASS: ./lus2lic {-2c modes3x2_v2.lus -n modes3x2_v2} -PASS: gcc -o modes3x2_v2.exec modes3x2_v2_modes3x2_v2.c modes3x2_v2_modes3x2_v2_loop.c +PASS: sh modes3x2_v2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c modes3x2_v2.lus {} PASS: ./lus2lic {-2c modes3x2_v3.lus -n modes3x2_v3} -PASS: gcc -o modes3x2_v3.exec modes3x2_v3_modes3x2_v3.c modes3x2_v3_modes3x2_v3_loop.c -PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c modes3x2_v3.lus {} +FAIL: Check that the generated C code compiles : sh modes3x2_v3.sh PASS: ./lus2lic {-2c modes3x2_v4.lus -n modes3x2_v4} PASS: ./lus2lic {-2c mouse.lus -n mouse} -PASS: gcc -o mouse.exec mouse_mouse.c mouse_mouse_loop.c +PASS: sh mouse.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mouse.lus {} PASS: ./lus2lic {-2c mouse1.lus -n mouse1} -PASS: gcc -o mouse1.exec mouse1_mouse1.c mouse1_mouse1_loop.c +PASS: sh mouse1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mouse1.lus {} PASS: ./lus2lic {-2c mouse2.lus -n mouse2} -PASS: gcc -o mouse2.exec mouse2_mouse2.c mouse2_mouse2_loop.c +PASS: sh mouse2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mouse2.lus {} PASS: ./lus2lic {-2c mouse3.lus -n mouse3} -PASS: gcc -o mouse3.exec mouse3_mouse3.c mouse3_mouse3_loop.c +PASS: sh mouse3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c mouse3.lus {} PASS: ./lus2lic {-2c moyenne.lus -n moyenne} -PASS: gcc -o moyenne.exec moyenne_moyenne.c moyenne_moyenne_loop.c +PASS: sh moyenne.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c moyenne.lus {} PASS: ./lus2lic {-2c multiclock.lus -n multiclock} -PASS: gcc -o multiclock.exec multiclock_multiclock.c multiclock_multiclock_loop.c +PASS: sh multiclock.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multiclock.lus {} PASS: ./lus2lic {-2c multipar.lus -n multipar} -PASS: gcc -o multipar.exec multipar_multipar.c multipar_multipar_loop.c +PASS: sh multipar.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {} ==> lus2lic2.sum <== -Test Run By jahier on Tue Sep 20 14:20:36 +Test Run By jahier on Fri Oct 7 15:46:29 Native configuration is x86_64-unknown-linux-gnu === lus2lic2 tests === @@ -408,114 +406,114 @@ Schedule of variations: Running target unix Running ./lus2lic.tests/test2.exp ... PASS: ./lus2lic {-2c PCOND.lus -n PCOND} -PASS: gcc -o PCOND.exec PCOND_PCOND.c PCOND_PCOND_loop.c +PASS: sh PCOND.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c PCOND.lus {} PASS: ./lus2lic {-2c PCOND1.lus -n PCOND1} -PASS: gcc -o PCOND1.exec PCOND1_PCOND1.c PCOND1_PCOND1_loop.c +PASS: sh PCOND1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c PCOND1.lus {} PASS: ./lus2lic {-2c SOURIS.lus -n SOURIS} -PASS: gcc -o SOURIS.exec SOURIS_SOURIS.c SOURIS_SOURIS_loop.c +PASS: sh SOURIS.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c SOURIS.lus {} PASS: ./lus2lic {-2c STABLE.lus -n STABLE} -PASS: gcc -o STABLE.exec STABLE_STABLE.c STABLE_STABLE_loop.c +PASS: sh STABLE.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c STABLE.lus {} PASS: ./lus2lic {-2c SWITCH.lus -n SWITCH} -PASS: gcc -o SWITCH.exec SWITCH_SWITCH.c SWITCH_SWITCH_loop.c +PASS: sh SWITCH.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c SWITCH.lus {} PASS: ./lus2lic {-2c SWITCH1.lus -n SWITCH1} -PASS: gcc -o SWITCH1.exec SWITCH1_SWITCH1.c SWITCH1_SWITCH1_loop.c +PASS: sh SWITCH1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c SWITCH1.lus {} PASS: ./lus2lic {-2c TIME_STABLE.lus -n TIME_STABLE} -PASS: gcc -o TIME_STABLE.exec TIME_STABLE_TIME_STABLE.c TIME_STABLE_TIME_STABLE_loop.c +PASS: sh TIME_STABLE.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c TIME_STABLE.lus {} PASS: ./lus2lic {-2c TIME_STABLE1.lus -n TIME_STABLE1} -PASS: gcc -o TIME_STABLE1.exec TIME_STABLE1_TIME_STABLE1.c TIME_STABLE1_TIME_STABLE1_loop.c +PASS: sh TIME_STABLE1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c TIME_STABLE1.lus {} PASS: ./lus2lic {-2c Watch.lus -n Watch} PASS: ./lus2lic {-2c X.lus -n X} -PASS: gcc -o X.exec X_X.c X_X_loop.c +PASS: sh X.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c X.lus {} PASS: ./lus2lic {-2c X2.lus -n X2} -PASS: gcc -o X2.exec X2_X2.c X2_X2_loop.c +PASS: sh X2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c X2.lus {} PASS: ./lus2lic {-2c X6.lus -n X6} -PASS: gcc -o X6.exec X6_X6.c X6_X6_loop.c +PASS: sh X6.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c X6.lus {} PASS: ./lus2lic {-2c Xr.lus -n Xr} -PASS: gcc -o Xr.exec Xr_Xr.c Xr_Xr_loop.c +PASS: sh Xr.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c Xr.lus {} PASS: ./lus2lic {-2c nc1.lus -n nc1} -PASS: gcc -o nc1.exec nc1_nc1.c nc1_nc1_loop.c +PASS: sh nc1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc1.lus {} PASS: ./lus2lic {-2c nc10.lus -n nc10} -PASS: gcc -o nc10.exec nc10_nc10.c nc10_nc10_loop.c +PASS: sh nc10.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc10.lus {} PASS: ./lus2lic {-2c nc2.lus -n nc2} -PASS: gcc -o nc2.exec nc2_nc2.c nc2_nc2_loop.c +PASS: sh nc2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc2.lus {} PASS: ./lus2lic {-2c nc3.lus -n nc3} -PASS: gcc -o nc3.exec nc3_nc3.c nc3_nc3_loop.c +PASS: sh nc3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc3.lus {} PASS: ./lus2lic {-2c nc4.lus -n nc4} -PASS: gcc -o nc4.exec nc4_nc4.c nc4_nc4_loop.c +PASS: sh nc4.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc4.lus {} PASS: ./lus2lic {-2c nc5.lus -n nc5} -PASS: gcc -o nc5.exec nc5_nc5.c nc5_nc5_loop.c +PASS: sh nc5.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc5.lus {} PASS: ./lus2lic {-2c nc6.lus -n nc6} -PASS: gcc -o nc6.exec nc6_nc6.c nc6_nc6_loop.c +PASS: sh nc6.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc6.lus {} PASS: ./lus2lic {-2c nc7.lus -n nc7} -PASS: gcc -o nc7.exec nc7_nc7.c nc7_nc7_loop.c +PASS: sh nc7.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc7.lus {} PASS: ./lus2lic {-2c nc8.lus -n nc8} -PASS: gcc -o nc8.exec nc8_nc8.c nc8_nc8_loop.c +PASS: sh nc8.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc8.lus {} PASS: ./lus2lic {-2c nc9.lus -n nc9} -PASS: gcc -o nc9.exec nc9_nc9.c nc9_nc9_loop.c +PASS: sh nc9.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nc9.lus {} PASS: ./lus2lic {-2c nested.lus -n nested} -PASS: gcc -o nested.exec nested_nested.c nested_nested_loop.c +PASS: sh nested.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nested.lus {} PASS: ./lus2lic {-2c newpacks.lus -n newpacks} PASS: ./lus2lic {-2c noAlarm.lus -n noAlarm} -PASS: gcc -o noAlarm.exec noAlarm_noAlarm.c noAlarm_noAlarm_loop.c +PASS: sh noAlarm.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c noAlarm.lus {} PASS: ./lus2lic {-2c node_caller1.lus -n node_caller1} -PASS: gcc -o node_caller1.exec node_caller1_node_caller1.c node_caller1_node_caller1_loop.c +PASS: sh node_caller1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c node_caller1.lus {} PASS: ./lus2lic {-2c nodeparam.lus -n nodeparam} -PASS: gcc -o nodeparam.exec nodeparam_nodeparam.c nodeparam_nodeparam_loop.c +PASS: sh nodeparam.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c nodeparam.lus {} PASS: ./lus2lic {-2c noeudsIndependants.lus -n noeudsIndependants} -PASS: gcc -o noeudsIndependants.exec noeudsIndependants_noeudsIndependants.c noeudsIndependants_noeudsIndependants_loop.c +PASS: sh noeudsIndependants.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c noeudsIndependants.lus {} PASS: ./lus2lic {-2c normal.lus -n normal} -PASS: gcc -o normal.exec normal_normal.c normal_normal_loop.c +PASS: sh normal.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c normal.lus {} PASS: ./lus2lic {-2c notTwo.lus -n notTwo} -PASS: gcc -o notTwo.exec notTwo_notTwo.c notTwo_notTwo_loop.c +PASS: sh notTwo.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c notTwo.lus {} PASS: ./lus2lic {-2c o2l_feux_compl.lus -n o2l_feux_compl} -PASS: gcc -o o2l_feux_compl.exec o2l_feux_compl_o2l_feux_compl.c o2l_feux_compl_o2l_feux_compl_loop.c +PASS: sh o2l_feux_compl.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c o2l_feux_compl.lus {} PASS: ./lus2lic {-2c oneq.lus -n oneq} -PASS: gcc -o oneq.exec oneq_oneq.c oneq_oneq_loop.c +PASS: sh oneq.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c oneq.lus {} PASS: ./lus2lic {-2c onlyroll.lus -n onlyroll} -PASS: gcc -o onlyroll.exec onlyroll_onlyroll.c onlyroll_onlyroll_loop.c +PASS: sh onlyroll.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c onlyroll.lus {} PASS: ./lus2lic {-2c onlyroll2.lus -n onlyroll2} -PASS: gcc -o onlyroll2.exec onlyroll2_onlyroll2.c onlyroll2_onlyroll2_loop.c +PASS: sh onlyroll2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c onlyroll2.lus {} PASS: ./lus2lic {-2c over2.lus -n over2} -PASS: gcc -o over2.exec over2_over2.c over2_over2_loop.c +PASS: sh over2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c over2.lus {} PASS: ./lus2lic {-2c over3.lus -n over3} -PASS: gcc -o over3.exec over3_over3.c over3_over3_loop.c +PASS: sh over3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c over3.lus {} PASS: ./lus2lic {-2c overload.lus -n overload} -PASS: gcc -o overload.exec overload_overload.c overload_overload_loop.c +PASS: sh overload.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c overload.lus {} PASS: ./lus2lic {-2c p.lus -n p} PASS: ./lus2lic {-2c pack1.lus -n pack1} @@ -523,227 +521,225 @@ PASS: ./lus2lic {-2c packageTableau.lus -n packageTableau} PASS: ./lus2lic {-2c packed_cst.lus -n packed_cst} PASS: ./lus2lic {-2c packs.lus -n packs} PASS: ./lus2lic {-2c param_node.lus -n param_node} -PASS: gcc -o param_node.exec param_node_param_node.c param_node_param_node_loop.c +PASS: sh param_node.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c param_node.lus {} PASS: ./lus2lic {-2c param_node2.lus -n param_node2} -PASS: gcc -o param_node2.exec param_node2_param_node2.c param_node2_param_node2_loop.c +PASS: sh param_node2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c param_node2.lus {} PASS: ./lus2lic {-2c param_node3.lus -n param_node3} -PASS: gcc -o param_node3.exec param_node3_param_node3.c param_node3_param_node3_loop.c +PASS: sh param_node3.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c param_node3.lus {} PASS: ./lus2lic {-2c param_node4.lus -n param_node4} -PASS: gcc -o param_node4.exec param_node4_param_node4.c param_node4_param_node4_loop.c +PASS: sh param_node4.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c param_node4.lus {} PASS: ./lus2lic {-2c param_struct.lus -n param_struct} -PASS: gcc -o param_struct.exec param_struct_param_struct.c param_struct_param_struct_loop.c +PASS: sh param_struct.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c param_struct.lus {} FAIL: Generate c code : ./lus2lic --expand-nodes {-2c pilote.lus -n pilote} PASS: ./lus2lic {-2c pipeline.lus -n pipeline} -PASS: gcc -o pipeline.exec pipeline_pipeline.c pipeline_pipeline_loop.c +PASS: sh pipeline.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c pipeline.lus {} PASS: ./lus2lic {-2c plus.lus -n plus} -PASS: gcc -o plus.exec plus_plus.c plus_plus_loop.c +PASS: sh plus.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c plus.lus {} PASS: ./lus2lic {-2c ply01.lus -n ply01} -PASS: gcc -o ply01.exec ply01_ply01.c ply01_ply01_loop.c +PASS: sh ply01.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ply01.lus {} PASS: ./lus2lic {-2c ply02.lus -n ply02} -PASS: gcc -o ply02.exec ply02_ply02.c ply02_ply02_loop.c +PASS: sh ply02.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ply02.lus {} PASS: ./lus2lic {-2c ply03.lus -n ply03} -PASS: gcc -o ply03.exec ply03_ply03.c ply03_ply03_loop.c +PASS: sh ply03.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ply03.lus {} PASS: ./lus2lic {-2c polymorphic_pack.lus -n polymorphic_pack} PASS: ./lus2lic {-2c poussoir.lus -n poussoir} -PASS: gcc -o poussoir.exec poussoir_poussoir.c poussoir_poussoir_loop.c +PASS: sh poussoir.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c poussoir.lus {} PASS: ./lus2lic {-2c pplus.lus -n pplus} -PASS: gcc -o pplus.exec pplus_pplus.c pplus_pplus_loop.c +PASS: sh pplus.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c pplus.lus {} PASS: ./lus2lic {-2c pre_x.lus -n pre_x} -PASS: gcc -o pre_x.exec pre_x_pre_x.c pre_x_pre_x_loop.c +PASS: sh pre_x.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c pre_x.lus {} PASS: ./lus2lic {-2c predef01.lus -n predef01} -PASS: gcc -o predef01.exec predef01_predef01.c predef01_predef01_loop.c +PASS: sh predef01.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c predef01.lus {} PASS: ./lus2lic {-2c predef02.lus -n predef02} -PASS: gcc -o predef02.exec predef02_predef02.c predef02_predef02_loop.c +PASS: sh predef02.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c predef02.lus {} PASS: ./lus2lic {-2c predef03.lus -n predef03} -PASS: gcc -o predef03.exec predef03_predef03.c predef03_predef03_loop.c +PASS: sh predef03.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c predef03.lus {} PASS: ./lus2lic {-2c predefOp.lus -n predefOp} -PASS: gcc -o predefOp.exec predefOp_predefOp.c predefOp_predefOp_loop.c +PASS: sh predefOp.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c predefOp.lus {} PASS: ./lus2lic {-2c produitBool.lus -n produitBool} -PASS: gcc -o produitBool.exec produitBool_produitBool.c produitBool_produitBool_loop.c +PASS: sh produitBool.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c produitBool.lus {} PASS: ./lus2lic {-2c real_ex.lus -n real_ex} -PASS: gcc -o real_ex.exec real_ex_real_ex.c real_ex_real_ex_loop.c +PASS: sh real_ex.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c real_ex.lus {} PASS: ./lus2lic {-2c redIf.lus -n redIf} -PASS: gcc -o redIf.exec redIf_redIf.c redIf_redIf_loop.c +PASS: sh redIf.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c redIf.lus {} PASS: ./lus2lic {-2c rediter.lus -n rediter} -PASS: gcc -o rediter.exec rediter_rediter.c rediter_rediter_loop.c +PASS: sh rediter.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c rediter.lus {} PASS: ./lus2lic {-2c redoptest.lus -n redoptest} -PASS: gcc -o redoptest.exec redoptest_redoptest.c redoptest_redoptest_loop.c +PASS: sh redoptest.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c redoptest.lus {} PASS: ./lus2lic {-2c remplissage.lus -n remplissage} PASS: ./lus2lic {-2c rs.lus -n rs} -PASS: gcc -o rs.exec rs_rs.c rs_rs_loop.c +PASS: sh rs.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c rs.lus {} PASS: ./lus2lic {-2c sample_time_change.lus -n sample_time_change} -PASS: gcc -o sample_time_change.exec sample_time_change_sample_time_change.c sample_time_change_sample_time_change_loop.c +PASS: sh sample_time_change.sh FAIL: Try to compare lus2lic -exec and -2c: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c sample_time_change.lus {} PASS: ./lus2lic {-2c sample_time_change_MainNode.lus -n sample_time_change_MainNode} -PASS: gcc -o sample_time_change_MainNode.exec sample_time_change_MainNode_sample_time_change_MainNode.c sample_time_change_MainNode_sample_time_change_MainNode_loop.c +PASS: sh sample_time_change_MainNode.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c sample_time_change_MainNode.lus {} PASS: ./lus2lic {-2c shiftFill_ludic.lus -n shiftFill_ludic} -PASS: gcc -o shiftFill_ludic.exec shiftFill_ludic_shiftFill_ludic.c shiftFill_ludic_shiftFill_ludic_loop.c +PASS: sh shiftFill_ludic.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c shiftFill_ludic.lus {} PASS: ./lus2lic {-2c shift_ludic.lus -n shift_ludic} -PASS: gcc -o shift_ludic.exec shift_ludic_shift_ludic.c shift_ludic_shift_ludic_loop.c +PASS: sh shift_ludic.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c shift_ludic.lus {} PASS: ./lus2lic {-2c simple.lus -n simple} PASS: ./lus2lic {-2c simpleRed.lus -n simpleRed} -PASS: gcc -o simpleRed.exec simpleRed_simpleRed.c simpleRed_simpleRed_loop.c +PASS: sh simpleRed.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c simpleRed.lus {} PASS: ./lus2lic {-2c sincos.lus -n sincos} -PASS: gcc -o sincos.exec sincos_sincos.c sincos_sincos_loop.c +PASS: sh sincos.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c sincos.lus {} PASS: ./lus2lic --expand-nodes {-2c speedcontrol.lus -n speedcontrol} -PASS: gcc -o speedcontrol.exec speedcontrol_speedcontrol.c speedcontrol_speedcontrol_loop.c +PASS: sh speedcontrol.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c speedcontrol.lus { --expand-nodes} PASS: ./lus2lic {-2c sqrt.lus -n sqrt} PASS: ./lus2lic {-2c stopwatch.lus -n stopwatch} -PASS: gcc -o stopwatch.exec stopwatch_stopwatch.c stopwatch_stopwatch_loop.c +PASS: sh stopwatch.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c stopwatch.lus {} PASS: ./lus2lic {-2c struct0.lus -n struct0} -PASS: gcc -o struct0.exec struct0_struct0.c struct0_struct0_loop.c +PASS: sh struct0.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c struct0.lus {} PASS: ./lus2lic {-2c struct_with.lus -n struct_with} -PASS: gcc -o struct_with.exec struct_with_struct_with.c struct_with_struct_with_loop.c +PASS: sh struct_with.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c struct_with.lus {} PASS: ./lus2lic {-2c t0.lus -n t0} PASS: ./lus2lic {-2c t1.lus -n t1} -PASS: gcc -o t1.exec t1_t1.c t1_t1_loop.c +PASS: sh t1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c t1.lus {} PASS: ./lus2lic {-2c t2.lus -n t2} -PASS: gcc -o t2.exec t2_t2.c t2_t2_loop.c +PASS: sh t2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c t2.lus {} PASS: ./lus2lic {-2c test.lus -n test} -PASS: gcc -o test.exec test_test.c test_test_loop.c +PASS: sh test.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test.lus {} PASS: ./lus2lic {-2c testBoite.lus -n testBoite} PASS: ./lus2lic {-2c testCA.lus -n testCA} -PASS: gcc -o testCA.exec testCA_testCA.c testCA_testCA_loop.c +PASS: sh testCA.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c testCA.lus {} PASS: ./lus2lic {-2c testCapt.lus -n testCapt} PASS: ./lus2lic {-2c testPilote.lus -n testPilote} PASS: ./lus2lic {-2c test_Int.lus -n test_Int} PASS: ./lus2lic {-2c test_arrow.lus -n test_arrow} -PASS: gcc -o test_arrow.exec test_arrow_test_arrow.c test_arrow_test_arrow_loop.c +PASS: sh test_arrow.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_arrow.lus {} PASS: ./lus2lic {-2c test_boolred.lus -n test_boolred} -PASS: gcc -o test_boolred.exec test_boolred_test_boolred.c test_boolred_test_boolred_loop.c +PASS: sh test_boolred.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_boolred.lus {} PASS: ./lus2lic {-2c test_clash.lus -n test_clash} PASS: ./lus2lic {-2c test_condact.lus -n test_condact} -PASS: gcc -o test_condact.exec test_condact_test_condact.c test_condact_test_condact_loop.c +PASS: sh test_condact.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_condact.lus {} PASS: ./lus2lic {-2c test_const.lus -n test_const} -PASS: gcc -o test_const.exec test_const_test_const.c test_const_test_const_loop.c +PASS: sh test_const.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_const.lus {} PASS: ./lus2lic {-2c test_diese.lus -n test_diese} -PASS: gcc -o test_diese.exec test_diese_test_diese.c test_diese_test_diese_loop.c +PASS: sh test_diese.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_diese.lus {} PASS: ./lus2lic {-2c test_enum.lus -n test_enum} -PASS: gcc -o test_enum.exec test_enum_test_enum.c test_enum_test_enum_loop.c -PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_enum.lus {} +FAIL: Check that the generated C code compiles : sh test_enum.sh PASS: ./lus2lic {-2c test_extern.lus -n test_extern} PASS: ./lus2lic {-2c test_lustre.lus -n test_lustre} PASS: ./lus2lic {-2c test_map.lus -n test_map} -PASS: gcc -o test_map.exec test_map_test_map.c test_map_test_map_loop.c +PASS: sh test_map.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_map.lus {} PASS: ./lus2lic {-2c test_merge.lus -n test_merge} -PASS: gcc -o test_merge.exec test_merge_test_merge.c test_merge_test_merge_loop.c -PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_merge.lus {} +FAIL: Check that the generated C code compiles : sh test_merge.sh PASS: ./lus2lic {-2c test_model.lus -n test_model} PASS: ./lus2lic {-2c test_node_expand.lus -n test_node_expand} -PASS: gcc -o test_node_expand.exec test_node_expand_test_node_expand.c test_node_expand_test_node_expand_loop.c +PASS: sh test_node_expand.sh FAIL: Try to compare lus2lic -exec and -2c: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_node_expand.lus {} PASS: ./lus2lic {-2c test_node_expand2.lus -n test_node_expand2} -PASS: gcc -o test_node_expand2.exec test_node_expand2_test_node_expand2.c test_node_expand2_test_node_expand2_loop.c +PASS: sh test_node_expand2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_node_expand2.lus {} PASS: ./lus2lic {-2c test_poly.lus -n test_poly} -PASS: gcc -o test_poly.exec test_poly_test_poly.c test_poly_test_poly_loop.c +PASS: sh test_poly.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_poly.lus {} PASS: ./lus2lic {-2c test_struct.lus -n test_struct} -PASS: gcc -o test_struct.exec test_struct_test_struct.c test_struct_test_struct_loop.c +PASS: sh test_struct.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c test_struct.lus {} PASS: ./lus2lic {-2c titi.lus -n titi} -PASS: gcc -o titi.exec titi_titi.c titi_titi_loop.c +PASS: sh titi.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c titi.lus {} PASS: ./lus2lic {-2c toolate.lus -n toolate} -PASS: gcc -o toolate.exec toolate_toolate.c toolate_toolate_loop.c +PASS: sh toolate.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c toolate.lus {} PASS: ./lus2lic {-2c toto.lus -n toto} -PASS: gcc -o toto.exec toto_toto.c toto_toto_loop.c +PASS: sh toto.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c toto.lus {} PASS: ./lus2lic {-2c tri.lus -n tri} -PASS: gcc -o tri.exec tri_tri.c tri_tri_loop.c +PASS: sh tri.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c tri.lus {} PASS: ./lus2lic {-2c triSel.lus -n triSel} -PASS: gcc -o triSel.exec triSel_triSel.c triSel_triSel_loop.c +PASS: sh triSel.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c triSel.lus {} PASS: ./lus2lic {-2c trivial.lus -n trivial} -PASS: gcc -o trivial.exec trivial_trivial.c trivial_trivial_loop.c +PASS: sh trivial.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c trivial.lus {} PASS: ./lus2lic {-2c trivial2.lus -n trivial2} -PASS: gcc -o trivial2.exec trivial2_trivial2.c trivial2_trivial2_loop.c +PASS: sh trivial2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c trivial2.lus {} PASS: ./lus2lic {-2c trivial_array.lus -n trivial_array} -PASS: gcc -o trivial_array.exec trivial_array_trivial_array.c trivial_array_trivial_array_loop.c +PASS: sh trivial_array.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c trivial_array.lus {} PASS: ./lus2lic {-2c ts01.lus -n ts01} -PASS: gcc -o ts01.exec ts01_ts01.c ts01_ts01_loop.c +PASS: sh ts01.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ts01.lus {} PASS: ./lus2lic {-2c ts04.lus -n ts04} -PASS: gcc -o ts04.exec ts04_ts04.c ts04_ts04_loop.c +PASS: sh ts04.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c ts04.lus {} PASS: ./lus2lic {-2c tuple.lus -n tuple} -PASS: gcc -o tuple.exec tuple_tuple.c tuple_tuple_loop.c +PASS: sh tuple.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c tuple.lus {} PASS: ./lus2lic {-2c type_decl.lus -n type_decl} -PASS: gcc -o type_decl.exec type_decl_type_decl.c type_decl_type_decl_loop.c +PASS: sh type_decl.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c type_decl.lus {} PASS: ./lus2lic {-2c uu.lus -n uu} -PASS: gcc -o uu.exec uu_uu.c uu_uu_loop.c +PASS: sh uu.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c uu.lus {} PASS: ./lus2lic {-2c v1.lus -n v1} -PASS: gcc -o v1.exec v1_v1.c v1_v1_loop.c +PASS: sh v1.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c v1.lus {} PASS: ./lus2lic {-2c when_tuple.lus -n when_tuple} PASS: ./lus2lic {-2c xx.lus -n xx} -PASS: gcc -o xx.exec xx_xx.c xx_xx_loop.c +PASS: sh xx.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c xx.lus {} PASS: ./lus2lic {-2c xxx.lus -n xxx} -PASS: gcc -o xxx.exec xxx_xxx.c xxx_xxx_loop.c +PASS: sh xxx.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c xxx.lus {} PASS: ./lus2lic {-2c yyy.lus -n yyy} -PASS: gcc -o yyy.exec yyy_yyy.c yyy_yyy_loop.c +PASS: sh yyy.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c yyy.lus {} PASS: ./lus2lic {-2c zzz.lus -n zzz} -PASS: gcc -o zzz.exec zzz_zzz.c zzz_zzz_loop.c +PASS: sh zzz.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz.lus {} PASS: ./lus2lic {-2c zzz2.lus -n zzz2} -PASS: gcc -o zzz2.exec zzz2_zzz2.c zzz2_zzz2_loop.c +PASS: sh zzz2.sh PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {} ==> lus2lic3.sum <== -Test Run By jahier on Tue Sep 20 14:21:36 +Test Run By jahier on Fri Oct 7 15:47:08 Native configuration is x86_64-unknown-linux-gnu === lus2lic3 tests === @@ -1249,7 +1245,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 Tue Sep 20 14:21:54 +Test Run By jahier on Fri Oct 7 15:47:19 Native configuration is x86_64-unknown-linux-gnu === lus2lic4 tests === @@ -1748,15 +1744,15 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {} === lus2lic1 Summary === -# of expected passes 315 -# of unexpected failures 6 +# of expected passes 311 +# of unexpected failures 8 ==> lus2lic2.sum <== === lus2lic2 Summary === -# of expected passes 331 -# of unexpected failures 3 +# of expected passes 327 +# of unexpected failures 5 ==> lus2lic3.sum <== @@ -1772,15 +1768,15 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {} # of expected passes 474 # of unexpected failures 4 =============================== -# Total number of failures: 26 -lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds -lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 29 seconds -lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 60 seconds -lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 18 seconds -lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 41 seconds +# Total number of failures: 30 +lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 0 seconds +lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 18 seconds +lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 39 seconds +lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 11 seconds +lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 31 seconds * Ref time: -0.05user 0.02system 2:30.57elapsed 0%CPU (0avgtext+0avgdata 5696maxresident)k -64inputs+0outputs (0major+6228minor)pagefaults 0swaps +0.06user 0.02system 1:39.73elapsed 0%CPU (0avgtext+0avgdata 5648maxresident)k +64inputs+0outputs (0major+6104minor)pagefaults 0swaps * Quick time (-j 4): -0.06user 0.01system 1:29.51elapsed 0%CPU (0avgtext+0avgdata 5700maxresident)k -64inputs+0outputs (0major+6239minor)pagefaults 0swaps +0.04user 0.04system 0:47.38elapsed 0%CPU (0avgtext+0avgdata 5664maxresident)k +64inputs+0outputs (0major+6123minor)pagefaults 0swaps diff --git a/test/should_work/sincos.lus b/test/should_work/sincos.lus index 2b113188088a9e8da46b10454cdc7e482f458cb6..f23fda97a3752a4945d972a38e51f4263e0e8068 100644 --- a/test/should_work/sincos.lus +++ b/test/should_work/sincos.lus @@ -2,7 +2,7 @@ node sincos(omega : real) returns (sin, cos: real); var pcos,psin: real; let - pcos = 1.0 fby cos; + pcos = 1.0 fby(cos); psin = 0.0 fby sin; sin = omega * integrator(pcos,0.1,0.0); cos = omega * integrator(-psin,0.1,1.0); diff --git a/test/site.exp b/test/site.exp index 7a101b14e0886e608eb75571f55a293d6cb96dfc..0e031305aab624f158c98ba6221fce0933d52c63 100644 --- a/test/site.exp +++ b/test/site.exp @@ -1,4 +1,4 @@ -# Time-stamp: <modified the 18/09/2015 (at 16:41) by Erwan Jahier> +# Time-stamp: <modified the 07/10/2016 (at 09:22) by Erwan Jahier> # # (nonreg-)test harness main file @@ -244,13 +244,8 @@ proc nonreg_exec_and_2c {files tmp} { wait -i $id1 if { [nonemptyfile "${node}_${node}.c"] && [do_2c "$f"] } { - if { [nonemptyfile "${node}_${node}_ext.c"] } { - set id2 [should_work "Check that the generated C code compiles " \ - "gcc -o ${node}.exec ${node}_${node}.c ${node}_${node}_ext.c ${node}_${node}_loop.c"] - } else { - set id2 [should_work "Check that the generated C code compiles " \ - "gcc -o ${node}.exec ${node}_${node}.c ${node}_${node}_loop.c"] - } + set id2 [should_work "Check that the generated C code compiles " \ + "sh ${node}.sh"] wait -i $id2 catch { exp_close -i $id2 } catch { exp_wait -i $id2 } output