Commit eee02be9 authored by erwan's avatar erwan

Fix: enum constants now works in -exec mode (fixes #7)

parent 52f682a7
Pipeline #24144 passed with stages
in 5 minutes and 5 seconds
(* Time-stamp: <modified the 25/03/2018 (at 22:07) by Erwan Jahier> *)
(* Time-stamp: <modified the 22/05/2019 (at 16:44) by Erwan Jahier> *)
(** Define the Data Structure representing Compiled programs. By
compiled we mean that constant are propagated, packages are
......@@ -227,7 +227,7 @@ and const =
true.
*)
| Enum_const_eff of (Lv6Id.long * type_)
(* type_ structure : liste (champ,valeur) + type_ structure *)
(* type_ tructure : liste (champ,valeur) + type_ structure *)
| Struct_const_eff of ((Lv6Id.t * const) list * type_)
(* type_ tableau : liste des valeurs + type_ des elts + taille
Is it really a good idea to live both with
......
This diff is collapsed.
(* Time-stamp: <modified the 03/03/2015 (at 10:42) by Erwan Jahier> *)
(* Time-stamp: <modified the 22/05/2019 (at 16:39) by Erwan Jahier> *)
(** The data structure resulting from the compilation process *)
......
(* Time-stamp: <modified the 21/07/2017 (at 15:59) by Erwan Jahier> *)
(* Time-stamp: <modified the 22/05/2019 (at 15:44) by Erwan Jahier> *)
(* J'ai appele ca symbol (mais ca remplace le ident) :
c'est juste une couche qui garantit l'unicite en memoire
......@@ -65,20 +65,20 @@ let (pack_name_to_string : pack_name -> string) =
let (string_of_long: bool -> long -> string) =
fun forprint (pn, id) ->
if forprint then
let sep =
if Lv6MainArgs.global_opt.Lv6MainArgs.ec || Lv6MainArgs.global_opt.Lv6MainArgs.lv4
then "__" else "::"
in
match pn,id with
if forprint then
let sep =
if Lv6MainArgs.global_opt.Lv6MainArgs.ec || Lv6MainArgs.global_opt.Lv6MainArgs.lv4
then "__" else "::"
in
match pn,id with
| "",id -> id
| "Lustre","true" -> "true"
| "Lustre","false" -> "false"
| _,_ ->
(* if Lv6MainArgs.global_opt.Lv6MainArgs.no_prefix then id else *)
Printf.sprintf "%s%s%s" pn sep id
else if pn = "" then id else
Printf.sprintf "%s::%s" pn id
(* if Lv6MainArgs.global_opt.Lv6MainArgs.no_prefix then id else *)
Printf.sprintf "%s%s%s" pn sep id
else if pn = "" then id else
Printf.sprintf "%s::%s" pn id
let (no_pack_string_of_long : long -> string) =
......
==> lus2lic0.sum <==
Test run by jahier on Fri May 17 10:42:29
Test run by jahier on Wed May 22 17:16:22
Native configuration is x86_64-pc-linux-gnu
=== lus2lic0 tests ===
......@@ -66,7 +66,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 Fri May 17 10:42:30
Test run by jahier on Wed May 22 17:16:22
Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests ===
......@@ -409,7 +409,7 @@ PASS: sh multipar.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <==
Test run by jahier on Fri May 17 10:42:52
Test run by jahier on Wed May 22 17:16:45
Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests ===
......@@ -749,7 +749,7 @@ PASS: sh zzz2.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <==
Test run by jahier on Fri May 17 10:43:19
Test run by jahier on Wed May 22 17:17:11
Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests ===
......@@ -1259,7 +1259,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test run by jahier on Fri May 17 10:43:58
Test run by jahier on Wed May 22 17:17:50
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
......@@ -1777,13 +1777,13 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
===============================
# Total number of failures: 15
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 0 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 22 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 27 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 23 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 26 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 39 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 15 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 13 seconds
* Ref time:
53.58user 18.93system 1:43.77elapsed 69%CPU (0avgtext+0avgdata 276760maxresident)k
32inputs+143296outputs (0major+11000415minor)pagefaults 0swaps
51.94user 18.17system 1:41.67elapsed 68%CPU (0avgtext+0avgdata 273712maxresident)k
0inputs+143240outputs (0major+11004706minor)pagefaults 0swaps
* Quick time (-j 4):
60.95user 19.78system 1:06.88elapsed 120%CPU (0avgtext+0avgdata 276748maxresident)k
2128inputs+141352outputs (0major+10869510minor)pagefaults 0swaps
58.56user 19.69system 1:07.46elapsed 116%CPU (0avgtext+0avgdata 273796maxresident)k
0inputs+142736outputs (0major+10967172minor)pagefaults 0swaps
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment