Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lustre-v6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
lustre-v6
Commits
6e28a5d6
Commit
6e28a5d6
authored
5 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Fix:
#8
close
#8
parent
7d9d6c38
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/l2lExpandArrays.ml
+14
-8
14 additions, 8 deletions
lib/l2lExpandArrays.ml
lv6-ref-man/lv6-ref-man.pdf
+0
-0
0 additions, 0 deletions
lv6-ref-man/lv6-ref-man.pdf
test/lus2lic.sum
+13
-13
13 additions, 13 deletions
test/lus2lic.sum
with
27 additions
and
21 deletions
lib/l2lExpandArrays.ml
+
14
−
8
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
}
...
...
This diff is collapsed.
Click to expand it.
lv6-ref-man/lv6-ref-man.pdf
+
0
−
0
View file @
6e28a5d6
No preview for this file type
This diff is collapsed.
Click to expand it.
test/lus2lic.sum
+
13
−
13
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment