diff --git a/release-lv6/Makefile b/release-lv6/Makefile index d961e4cca7837f01c5d3ef23d213be37be70dd27..38742fdeb42e860582556d14de00100bf2944303 100644 --- a/release-lv6/Makefile +++ b/release-lv6/Makefile @@ -1,10 +1,9 @@ -OBJDIR=./obj$(HOSTTYPE) LIC2CDIR=~/lic2loc LUS2LICDIR=~/lus2lic -LUS2LIC=$(LUS2LICDIR)/$(OBJDIR)/lus2lic +LUS2LIC=$(LUS2LICDIR)/$(HOSTTYPE)/bin/lus2lic WWW_DIR=/import/www/DIST-TOOLS/SYNCHRONE/lustre-v6 ifeq ($(HOSTTYPE),cygwin) @@ -37,7 +36,7 @@ doc: cp $(LUS2LICDIR)/utils/lustre.el $(RELNAME)/utils lus2lic: - cd $(LUS2LICDIR)/ ; make nc + cd $(LUS2LICDIR)/ ; make cp $(LUS2LIC) $(RELNAME)/bin/ lus2licbc: diff --git a/src/lv6MainArgs.ml b/src/lv6MainArgs.ml index 3580ca4d04e4a043e076f0a352c88c7021f563d2..ef6b8f4167be142f5eefb2a25c88a7a65852f82d 100644 --- a/src/lv6MainArgs.ml +++ b/src/lv6MainArgs.ml @@ -30,6 +30,7 @@ type t = { mutable oc : Pervasives.out_channel; mutable tlex : bool; mutable exec : bool; + mutable rif : bool; mutable precision : int option; } @@ -79,6 +80,7 @@ let (make_opt : unit -> t) = oc = Pervasives.stdout; tlex = false; exec = false; + rif = false; precision = None; } @@ -187,18 +189,14 @@ let set_ec_options opt = (*** USER OPTIONS TAB **) let mkoptab (opt:t) : unit = ( mkopt opt - ["-n";"-node"] - ~arg:" <string>" + ["-n";"-node"] ~arg:" <string>" (Arg.String(function x -> opt.main_node <- x; opt.compile_all_items <- false)) ["Set the main node (all items are compiled if unset)"] ; - mkopt opt - ["-o";"--output-file"] - ~arg:" <string>" - (Arg.String(function x -> - opt.outfile <- x)) + mkopt opt ["-o";"--output-file"] ~arg:" <string>" + (Arg.String(function x -> opt.outfile <- x)) ["Set the output file name"] ; mkopt opt @@ -206,6 +204,11 @@ let mkoptab (opt:t) : unit = ( (Arg.Unit (fun _ -> opt.exec <- true)) ["interpret the program using RIF conventions for I/O (experimental)."] ; + mkopt opt + ["-rif"] + (Arg.Unit(function s -> opt.rif <- true)) + ["behave as a rif input file (meaningless without -exec)"] + ; mkopt opt ["-knc"; "--keep-nested-calls"] diff --git a/src/lv6MainArgs.mli b/src/lv6MainArgs.mli index c83301abec664ab53aa4d5c2320482c14f7bcc36..3dfed43541abf5e3bb3668bc10b7afeb0bb8a96e 100644 --- a/src/lv6MainArgs.mli +++ b/src/lv6MainArgs.mli @@ -27,6 +27,7 @@ type t = { mutable oc : Pervasives.out_channel; mutable tlex : bool; mutable exec : bool; + mutable rif : bool; mutable precision : int option; } diff --git a/src/lv6version.ml b/src/lv6version.ml index 7f6e37f5104cc3f64bd197213b25ccd6b610ff9e..9b5f4959f318676c211c90982f87e497336a9094 100644 --- a/src/lv6version.ml +++ b/src/lv6version.ml @@ -1,7 +1,7 @@ (** Automatically generated from Makefile *) let tool = "lus2lic" let branch = "(no" -let commit = "425" -let sha_1 = "e6fe13d2abd86d47e2be0c3b12fd8d4532d9c52f" +let commit = "426" +let sha_1 = "e67cfc5de92f1e2a7fb6321d00d6e3c8a9686547" let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")") let maintainer = "jahier@imag.fr" diff --git a/src/socExec.ml b/src/socExec.ml index 524776c6536f99c996fdc4c500c786beb0380574..42b7e2db53ca0d03342f689ba2c18bc5eeb26c5e 100644 --- a/src/socExec.ml +++ b/src/socExec.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 29/11/2013 (at 15:31) by Erwan Jahier> *) +(* Time-stamp: <modified the 04/12/2013 (at 09:45) by Erwan Jahier> *) open Soc open Data @@ -302,7 +302,7 @@ let (read_soc_input : var list -> Data.vntl -> out_channel -> substs -> substs) let rec (loop_step : Lv6MainArgs.t -> Soc.tbl -> Soc.var list -> Data.vntl -> Data.vntl -> Soc.t -> SocExecValue.ctx -> int -> out_channel -> unit) = fun opt soc_tbl vntl_i exp_vntl_i_str exp_vntl_o_str soc ctx step_nb oc -> - RifIO.write oc ("\n#step " ^ (string_of_int step_nb)^"\n"); + if not opt.rif then RifIO.write oc ("\n#step " ^ (string_of_int step_nb)^"\n"); let ctx = { ctx with s = read_soc_input vntl_i exp_vntl_i_str oc ctx.s } in let step = match soc.step with [step] -> step | _ -> assert false in let ctx = soc_step step soc_tbl soc ctx in @@ -310,8 +310,9 @@ let rec (loop_step : Lv6MainArgs.t -> Soc.tbl -> Soc.var list -> Data.vntl -> Da let s = SocExecValue.filter_top_subst ctx.s in let s = List.flatten(List.map expand_subst s) in let f2s = SocUtils.my_string_of_float_precision opt.Lv6MainArgs.precision in - RifIO.write oc " #outs "; + if not opt.rif then RifIO.write oc " #outs "; RifIO.write_outputs oc f2s exp_vntl_o_str s; + RifIO.write oc "\n"; RifIO.flush oc; Verbose.exe ~flag:dbg (fun () -> dump_substs ctx.s; flush stdout); loop_step opt soc_tbl vntl_i exp_vntl_i_str exp_vntl_o_str soc ctx (step_nb+1) oc diff --git a/test/lus2lic.sum b/test/lus2lic.sum index 6287198edfe78811f33d8fd7214c01459eb85d28..f43b16c970864a5764463b9e3751b10c4a2026c2 100644 --- a/test/lus2lic.sum +++ b/test/lus2lic.sum @@ -1,4 +1,4 @@ -Test Run By jahier on Fri Nov 29 17:05:42 2013 +Test Run By jahier on Wed Dec 4 10:05:40 2013 Native configuration is i686-pc-linux-gnu === lus2lic tests === @@ -1028,3 +1028,5 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman # of unexpected failures 76 # of unexpected successes 21 # of expected failures 37 +testcase ./lus2lic.tests/non-reg.exp completed in 100 seconds +testcase ./lus2lic.tests/progression.exp completed in 0 seconds diff --git a/test/lus2lic.time b/test/lus2lic.time index 0f5df5f1440b3e292964858ab3b3a5a855758d3b..a2bbd31c45a4452b288c44c9c6c43f6ee0a2b987 100644 --- a/test/lus2lic.time +++ b/test/lus2lic.time @@ -1,2 +1,2 @@ -testcase ./lus2lic.tests/non-reg.exp completed in 104 seconds +testcase ./lus2lic.tests/non-reg.exp completed in 100 seconds testcase ./lus2lic.tests/progression.exp completed in 0 seconds