diff --git a/src/lv6MainArgs.ml b/src/lv6MainArgs.ml index 583b83fb0f8dbb25652228a76f2db0b0337b17d9..16a64dc50f6f0c1438cc271ea8f9ff93ecdfba3d 100644 --- a/src/lv6MainArgs.ml +++ b/src/lv6MainArgs.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 13/02/2015 (at 15:50) by Erwan Jahier> *) +(* Time-stamp: <modified the 13/02/2015 (at 17:04) by Erwan Jahier> *) (* Le manager d'argument adapté de celui de lutin, plus joli N.B. solution un peu batarde : les options sont stockées, comme avant, dans Global, @@ -71,7 +71,7 @@ let (global_opt:global_opt) = current_file = ""; expand_enums = AsInt; soc2c_no_switch = false; - io_transmit_mode = Heap; + io_transmit_mode = Stack; } let (make_opt : unit -> t) = fun () -> diff --git a/src/socPredef2cHeap.ml b/src/socPredef2cHeap.ml index 2bcbd65e55f998a2d5386484ea57f4fbb3ca0d5b..a1549a534515f2c96d04281bde8e052460a19c80 100644 --- a/src/socPredef2cHeap.ml +++ b/src/socPredef2cHeap.ml @@ -1,5 +1,5 @@ -(* Time-stamp: <modified the 13/02/2015 (at 16:09) by Erwan Jahier> *) +(* Time-stamp: <modified the 13/02/2015 (at 17:24) by Erwan Jahier> *) open Data open Soc @@ -85,7 +85,7 @@ let (lustre_concat: Soc.key -> string) = and t2_type = Soc2cUtil.data_type_to_c (Data.Array(t,s2)) "" in (Printf.sprintf " memcpy(&%s, &%s, sizeof(%s));\n" t12 t1 t1_type)^ - (Printf.sprintf " memcpy(&%s[%d], &%s, sizeof(%s));\n" t12 s1 t2 t2_type) + (Printf.sprintf " memcpy(&%s+%d, &%s, sizeof(%s));\n" t12 s1 t2 t2_type) (* Both seems to work *) (* let buff = ref "" in *) (* for j=0 to s1-1 do *) diff --git a/src/socPredef2cStack.ml b/src/socPredef2cStack.ml index d3c2569a5f97c7bed3658515cf66f12e67e05163..8e3c856c227c8529f2e137baf5a71c33f7162c88 100644 --- a/src/socPredef2cStack.ml +++ b/src/socPredef2cStack.ml @@ -1,5 +1,5 @@ -(* Time-stamp: <modified the 13/02/2015 (at 16:10) by Erwan Jahier> *) +(* Time-stamp: <modified the 13/02/2015 (at 17:24) by Erwan Jahier> *) open Data open Soc @@ -83,8 +83,8 @@ let (lustre_concat: Soc.key -> string) = and t1_type = Soc2cUtil.data_type_to_c (Data.Array(t,s1)) "" and t2_type = Soc2cUtil.data_type_to_c (Data.Array(t,s2)) "" in - (Printf.sprintf " memcpy(%s, &%s, sizeof(%s));\n" t12 t1 t1_type)^ - (Printf.sprintf " memcpy(%s[%d], &%s, sizeof(%s));\n" t12 s1 t2 t2_type) + (Printf.sprintf " memcpy(%s, %s, sizeof(%s));\n" t12 t1 t1_type)^ + (Printf.sprintf " memcpy(%s+%d, %s, sizeof(%s));\n" t12 s1 t2 t2_type) (* Both seems to work *) (* let buff = ref "" in *) (* for j=0 to s1-1 do *) diff --git a/test/lus2lic.sum b/test/lus2lic.sum index 4417d58c12eb6e7f508113bb47b7684fc8727601..d8fb9ebaec8b50698fd1516172ece83b1516cf6c 100644 --- a/test/lus2lic.sum +++ b/test/lus2lic.sum @@ -1,5 +1,5 @@ ==> lus2lic0.sum <== -Test Run By jahier on Fri Feb 13 16:11:32 +Test Run By jahier on Fri Feb 13 17:28:15 Native configuration is x86_64-unknown-linux-gnu === lus2lic0 tests === @@ -63,7 +63,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus ==> lus2lic1.sum <== -Test Run By jahier on Fri Feb 13 16:11:34 +Test Run By jahier on Fri Feb 13 17:28:22 Native configuration is x86_64-unknown-linux-gnu === lus2lic1 tests === @@ -397,7 +397,7 @@ PASS: gcc -o multipar.exec multipar_multipar.c multipar_multipar_loop.c PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {} ==> lus2lic2.sum <== -Test Run By jahier on Fri Feb 13 16:11:26 +Test Run By jahier on Fri Feb 13 17:29:49 Native configuration is x86_64-unknown-linux-gnu === lus2lic2 tests === @@ -727,7 +727,7 @@ PASS: gcc -o zzz2.exec zzz2_zzz2.c zzz2_zzz2_loop.c PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {} ==> lus2lic3.sum <== -Test Run By jahier on Fri Feb 13 16:11:30 +Test Run By jahier on Fri Feb 13 17:30:51 Native configuration is x86_64-unknown-linux-gnu === lus2lic3 tests === @@ -1230,7 +1230,7 @@ PASS: ./myec2c {-o multipar.c multipar.ec} PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {} ==> lus2lic4.sum <== -Test Run By jahier on Fri Feb 13 16:11:28 +Test Run By jahier on Fri Feb 13 17:31:28 Native configuration is x86_64-unknown-linux-gnu === lus2lic4 tests === @@ -1726,12 +1726,14 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {} # of unexpected failures 3 =============================== # Total number of failures: 14 -lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 7 seconds -lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 53 seconds -lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 77 seconds -lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 57 seconds -lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 90 seconds +lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 6 seconds +lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 36 seconds +lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 62 seconds +lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 37 seconds +lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 71 seconds * Ref time: +0.07user 0.02system 4:23.87elapsed 0%CPU (0avgtext+0avgdata 5132maxresident)k +160inputs+0outputs (0major+5542minor)pagefaults 0swaps * Quick time (-j 4): -0.04user 0.01system 1:32.86elapsed 0%CPU (0avgtext+0avgdata 5080maxresident)k -160inputs+0outputs (0major+5541minor)pagefaults 0swaps +0.04user 0.02system 1:24.98elapsed 0%CPU (0avgtext+0avgdata 5116maxresident)k +160inputs+0outputs (0major+5581minor)pagefaults 0swaps diff --git a/test/lus2lic.time b/test/lus2lic.time index 52f0b05061c75d21899a4f01b4b03d07274ad85e..728e22386a078926708b0f1497fd0410ac315342 100644 --- a/test/lus2lic.time +++ b/test/lus2lic.time @@ -1,9 +1,11 @@ -lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 7 seconds -lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 53 seconds -lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 77 seconds -lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 57 seconds -lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 90 seconds +lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 6 seconds +lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 36 seconds +lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 62 seconds +lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 37 seconds +lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 71 seconds * Ref time: +0.07user 0.02system 4:23.87elapsed 0%CPU (0avgtext+0avgdata 5132maxresident)k +160inputs+0outputs (0major+5542minor)pagefaults 0swaps * Quick time (-j 4): -0.04user 0.01system 1:32.86elapsed 0%CPU (0avgtext+0avgdata 5080maxresident)k -160inputs+0outputs (0major+5541minor)pagefaults 0swaps +0.04user 0.02system 1:24.98elapsed 0%CPU (0avgtext+0avgdata 5116maxresident)k +160inputs+0outputs (0major+5581minor)pagefaults 0swaps diff --git a/test/should_work/array_concat.lus b/test/should_work/array_concat.lus index 4ebaf3c4b63802a78b7be9f36322c3159c348f15..ba201957cd561044a2fb2b82c723dbdbcbb4c34d 100644 --- a/test/should_work/array_concat.lus +++ b/test/should_work/array_concat.lus @@ -1,8 +1,8 @@ -node array_concat(x:bool) returns (y: bool^2); +function array_concat(x:bool) returns (y: bool^2); let y = [x]|[x]; tel -node array_concat_bis(x:bool^1) returns (y: bool^2); +function array_concat_bis(x:bool^1) returns (y: bool^2); let y = x|x; tel