Skip to content
Snippets Groups Projects
Commit 14a42a03 authored by erwan's avatar erwan
Browse files

-eeb: Extern nodes interface variables were not expanded.

Also, -eeb is now the default when using -ec.
parent 6f975e9b
No related branches found
No related tags found
No related merge requests found
OASISFormat: 0.4 OASISFormat: 0.4
Name: lustre-v6 Name: lustre-v6
Version: 1.702 Version: 1.703
Synopsis: The Lustre V6 Verimag compiler Synopsis: The Lustre V6 Verimag compiler
Description: This package contains: Description: This package contains:
(1) lus2lic: the (current) name of the compiler (and interpreter via -exec). (1) lus2lic: the (current) name of the compiler (and interpreter via -exec).
......
(* Time-stamp: <modified the 05/07/2017 (at 10:20) by Erwan Jahier> *) (* Time-stamp: <modified the 05/07/2017 (at 15:31) by Erwan Jahier> *)
open Lxm open Lxm
...@@ -137,20 +137,23 @@ let rec (doit : target -> LicPrg.t -> LicPrg.t) = ...@@ -137,20 +137,23 @@ let rec (doit : target -> LicPrg.t -> LicPrg.t) =
{ ve_f with it = ve } { ve_f with it = ve }
and (do_node : Lic.node_exp -> Lic.node_exp) = and (do_node : Lic.node_exp -> Lic.node_exp) =
fun n -> fun n ->
let def_eff =
match n.def_eff with match n.def_eff with
| ExternLic | MetaOpLic | AbstractLic _ -> n | ExternLic | MetaOpLic | AbstractLic _ -> n.def_eff
| BodyLic b -> | BodyLic b ->
let eqs = List.map (fun eq -> do_eq eq) b.eqs_eff in let eqs = List.map (fun eq -> do_eq eq) b.eqs_eff in
let ass = List.map (fun ve -> do_val_exp_flag ve) b.asserts_eff in let ass = List.map (fun ve -> do_val_exp_flag ve) b.asserts_eff in
{ n with BodyLic{asserts_eff=ass; eqs_eff=eqs}
inlist_eff = List.map do_var_info n.inlist_eff; in
outlist_eff = List.map do_var_info n.outlist_eff; { n with
loclist_eff = (match n.loclist_eff with inlist_eff = List.map do_var_info n.inlist_eff;
| None -> None outlist_eff = List.map do_var_info n.outlist_eff;
| Some l -> Some(List.map do_var_info l)); loclist_eff = (match n.loclist_eff with
def_eff = BodyLic{asserts_eff=ass; eqs_eff=eqs}; | None -> None
} | Some l -> Some(List.map do_var_info l));
def_eff = def_eff;
}
in (* back to doit *) in (* back to doit *)
let outprg = LicPrg.empty in let outprg = LicPrg.empty in
......
(* Time-stamp: <modified the 28/06/2017 (at 16:44) by Erwan Jahier> *) (* Time-stamp: <modified the 05/07/2017 (at 15:37) by Erwan Jahier> *)
(* (*
Le manager d'argument adapt de celui de lutin, plus joli Le manager d'argument adapt de celui de lutin, plus joli
N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global, N.B. solution un peu batarde : les options sont stockes, comme avant, dans Global,
...@@ -245,6 +245,9 @@ let set_v4_options opt = ...@@ -245,6 +245,9 @@ let set_v4_options opt =
opt.expand_arrays <- true opt.expand_arrays <- true
let set_ec_options opt = let set_ec_options opt =
(match global_opt.expand_enums with
| AsEnum -> global_opt.expand_enums <- AsBool; (* only override the default *)
| AsInt | AsConst | AsBool -> ());
set_v4_options opt; set_v4_options opt;
global_opt.ec <- true; global_opt.ec <- true;
global_opt.no_when_not <- true; global_opt.no_when_not <- true;
...@@ -393,7 +396,7 @@ let mkoptab (opt:t) : unit = ( ...@@ -393,7 +396,7 @@ let mkoptab (opt:t) : unit = (
mkopt opt mkopt opt
["-ec"; "--expanded-code"] ["-ec"; "--expanded-code"]
(Arg.Unit (fun _ -> set_ec_options opt)) (Arg.Unit (fun _ -> set_ec_options opt))
["Generate ec programs (actually just an alias for '-en -lv4 --no-prefix --no-whe-not')"] ["Generate ec programs (set the following options: '--expand-nodes --no-when-not --expand-enums-as-bool --lustre-v4 --no-prefix')"]
; ;
mkopt opt ~doc_level:Advanced mkopt opt ~doc_level:Advanced
["-np"; "--no-prefix"] ["-np"; "--no-prefix"]
......
(** Automatically generated from Makefile *) (** Automatically generated from Makefile *)
let tool = "lus2lic" let tool = "lus2lic"
let branch = "master" let branch = "master"
let commit = "702" let commit = "703"
let sha_1 = "a6fab49ad78a8446078f410e07c79e7d47bd8e0a" let sha_1 = "6f975e9bc4d6dfff63fcf0ab056956d1bbb018ad"
let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")") let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")")
let maintainer = "jahier@imag.fr" let maintainer = "jahier@imag.fr"
==> lus2lic0.sum <== ==> lus2lic0.sum <==
Test Run By jahier on Wed Jul 5 11:16:43 Test Run By jahier on Wed Jul 5 15:35:50
Native configuration is x86_64-unknown-linux-gnu Native configuration is x86_64-unknown-linux-gnu
=== lus2lic0 tests === === lus2lic0 tests ===
...@@ -64,7 +64,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte ...@@ -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 XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <== ==> lus2lic1.sum <==
Test Run By jahier on Wed Jul 5 11:16:44 Test Run By jahier on Wed Jul 5 15:35:51
Native configuration is x86_64-unknown-linux-gnu Native configuration is x86_64-unknown-linux-gnu
=== lus2lic1 tests === === lus2lic1 tests ===
...@@ -403,7 +403,7 @@ PASS: sh multipar.sh ...@@ -403,7 +403,7 @@ PASS: sh multipar.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {} PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <== ==> lus2lic2.sum <==
Test Run By jahier on Wed Jul 5 11:17:40 Test Run By jahier on Wed Jul 5 15:36:46
Native configuration is x86_64-unknown-linux-gnu Native configuration is x86_64-unknown-linux-gnu
=== lus2lic2 tests === === lus2lic2 tests ===
...@@ -743,7 +743,7 @@ PASS: sh zzz2.sh ...@@ -743,7 +743,7 @@ PASS: sh zzz2.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {} PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <== ==> lus2lic3.sum <==
Test Run By jahier on Wed Jul 5 11:18:55 Test Run By jahier on Wed Jul 5 15:38:02
Native configuration is x86_64-unknown-linux-gnu Native configuration is x86_64-unknown-linux-gnu
=== lus2lic3 tests === === lus2lic3 tests ===
...@@ -1253,7 +1253,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {} ...@@ -1253,7 +1253,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <== ==> lus2lic4.sum <==
Test Run By jahier on Wed Jul 5 11:21:14 Test Run By jahier on Wed Jul 5 15:40:21
Native configuration is x86_64-unknown-linux-gnu Native configuration is x86_64-unknown-linux-gnu
=== lus2lic4 tests === === lus2lic4 tests ===
...@@ -1771,13 +1771,13 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {} ...@@ -1771,13 +1771,13 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
=============================== ===============================
# Total number of failures: 22 # Total number of failures: 22
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 56 seconds lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 55 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 74 seconds lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 75 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 138 seconds lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 139 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 67 seconds lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 67 seconds
* Ref time: * Ref time:
0.05user 0.02system 5:38.56elapsed 0%CPU (0avgtext+0avgdata 5616maxresident)k 0.04user 0.03system 5:38.60elapsed 0%CPU (0avgtext+0avgdata 5684maxresident)k
128inputs+0outputs (0major+6179minor)pagefaults 0swaps 64inputs+0outputs (0major+6208minor)pagefaults 0swaps
* Quick time (-j 4): * Quick time (-j 4):
0.05user 0.02system 2:39.72elapsed 0%CPU (0avgtext+0avgdata 5708maxresident)k 0.04user 0.03system 2:43.10elapsed 0%CPU (0avgtext+0avgdata 5564maxresident)k
32inputs+0outputs (0major+6198minor)pagefaults 0swaps 64inputs+0outputs (0major+6185minor)pagefaults 0swaps
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment