Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
verimag
synchrone
lustre-v6
Commits
6e28a5d6
Commit
6e28a5d6
authored
Sep 04, 2019
by
erwan
Browse files
Fix:
#8
close
#8
parent
7d9d6c38
Changes
3
Hide whitespace changes
Inline
Side-by-side
lib/l2lExpandArrays.ml
View file @
6e28a5d6
(** Time-stamp: <modified the
29
/0
8
/2019 (at 1
5
:4
4
) by Erwan Jahier> *)
(** Time-stamp: <modified the
04
/0
9
/2019 (at 1
4
:4
8
) by Erwan Jahier> *)
(* Replace structures and arrays by as many variables as necessary.
Since structures can be nested, it migth be a lot of new variables...
...
...
@@ -417,7 +417,7 @@ and (break_tuple : Lxm.t -> left list -> val_exp -> Lic.eq_info srcflagged list)
(
String
.
concat
", "
(
List
.
map
(
LicDump
.
string_of_val_exp_eff
false
)
vel
))
in
let
msg
=
Printf
.
sprintf
"error: expression
\n
%s
\n
cannot be broken
\n
%s (%d)
"error: expression
\n
%s
\n
cannot be broken
\n
%s (%d)
should have the same arity as
\n
%s(%d)"
(
LicDump
.
string_of_val_exp_eff
false
ve
)
(
vel2str
ve1l
)
l1
(
vel2str
ve2l
)
l2
...
...
@@ -426,10 +426,11 @@ and (break_tuple : Lxm.t -> left list -> val_exp -> Lic.eq_info srcflagged list)
else
List
.
map2
(
fun
ve1
ve2
->
{
ve
with
ve_core
=
CallByPosLic
({
it
=
PREDEF_CALL
({
src
=
if_lxm
;
it
=
(
"Lustre"
,
"if"
)
,
[]
});
src
=
lxm
}
,
[
cond
;
ve1
;
ve2
])}
{
ve
with
ve_core
=
CallByPosLic
({
it
=
PREDEF_CALL
({
src
=
if_lxm
;
it
=
(
"Lustre"
,
"if"
)
,
[]
});
src
=
lxm
}
,
[
cond
;
ve1
;
ve2
])}
)
ve1l
ve2l
...
...
@@ -478,7 +479,12 @@ and (build_and_eq: Lic.node_key srcflagged -> val_exp list -> val_exp list -> va
fun
op
vel1
vel2
->
(* transform "[(x1;x2] = [y1;y2]" into "x1=y1 and x2=y2" *)
assert
(
op
.
it
=
((
"Lustre"
,
"eq"
)
,
[]
)
||
op
.
it
=
((
"Lustre"
,
"neq"
)
,
[]
));
let
and_op
=
{
src
=
op
.
src
;
it
=
((
"Lustre"
,
"and"
)
,
[]
)
}
in
let
conj_op
=
if
op
.
it
=
((
"Lustre"
,
"eq"
)
,
[]
)
then
{
src
=
op
.
src
;
it
=
((
"Lustre"
,
"and"
)
,
[]
)
}
else
(* t<>t1 iff t[0]<>t'[0] OR t[1]<>t'[2] OR ... *)
{
src
=
op
.
src
;
it
=
((
"Lustre"
,
"or"
)
,
[]
)
}
in
let
make_eq
ve1
ve2
=
let
lxm
=
op
.
src
in
{
ve_core
=
CallByPosLic
({
src
=
lxm
;
it
=
PREDEF_CALL
(
op
)}
,
[
ve1
;
ve2
]);
...
...
@@ -489,7 +495,7 @@ and (build_and_eq: Lic.node_key srcflagged -> val_exp list -> val_exp list -> va
let
make_and
acc
ve1
ve2
=
let
eq
=
make_eq
ve1
ve2
in
let
lxm
=
op
.
src
in
{
ve_core
=
CallByPosLic
({
src
=
lxm
;
it
=
PREDEF_CALL
(
and
_op
)}
,
[
acc
;
eq
]);
{
ve_core
=
CallByPosLic
({
src
=
lxm
;
it
=
PREDEF_CALL
(
conj
_op
)}
,
[
acc
;
eq
]);
ve_typ
=
[
Bool_type_eff
];
ve_clk
=
ve1
.
ve_clk
;
ve_src
=
lxm
}
...
...
lv6-ref-man/lv6-ref-man.pdf
View file @
6e28a5d6
No preview for this file type
test/lus2lic.sum
View file @
6e28a5d6
==> lus2lic0.sum <==
Test run by jahier on
Mon
Sep
2 09:20:18
Test run by jahier on
Wed
Sep
4 15:05:25
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
Mon
Sep
2 09:20:19
Test run by jahier on
Wed
Sep
4 15:05:26
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
Mon
Sep
2 09:20:43
Test run by jahier on
Wed
Sep
4 15:05:55
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
Mon
Sep
2 09:21:12
Test run by jahier on
Wed
Sep
4 15:06:25
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
Mon
Sep
2 09:21:54
Test run by jahier on
Wed
Sep
4 15:07:07
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
...
...
@@ -1776,14 +1776,14 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
# of unexpected failures 18
===============================
# Total number of failures: 69
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in
0
seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 2
4
seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in
29
seconds
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in
1
seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 2
9
seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in
30
seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 42 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 1
7
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 1
8
seconds
* Ref time:
59.94
user 2
3.36
system 1:5
3.07
elapsed 73%CPU (0avgtext+0avgdata 2834
9
2maxresident)k
0inputs+139
360
outputs (0major+1535
2444
minor)pagefaults 0swaps
63.26
user 2
5.22
system 1:5
9.59
elapsed 73%CPU (0avgtext+0avgdata 2834
7
2maxresident)k
0inputs+139
504
outputs (0major+1535
4836
minor)pagefaults 0swaps
* Quick time (-j 4):
68.5
1user 26.
31
system 1:
09.99
elapsed 135%CPU (0avgtext+0avgdata 2834
12
maxresident)k
0inputs+13
6864
outputs (0major+15
153120
minor)pagefaults 0swaps
70.8
1user 26.
56
system 1:
11.65
elapsed 135%CPU (0avgtext+0avgdata 2834
76
maxresident)k
0inputs+13
8528
outputs (0major+15
273199
minor)pagefaults 0swaps
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment