Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
verimag
synchrone
lustre-v6
Commits
3300825b
Commit
3300825b
authored
Jun 28, 2021
by
erwan
Browse files
Update: enhance some error messages
parent
db127044
Pipeline
#70318
passed with stages
in 4 minutes and 21 seconds
Changes
9
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
bin/main.ml
View file @
3300825b
(* Time-stamp: <modified the 15/03/2021 (at
12:28
) by Erwan Jahier> *)
(* Time-stamp: <modified the 15/03/2021 (at
23:50
) by Erwan Jahier> *)
open
AstV6
open
Lxm
...
...
@@ -340,7 +340,7 @@ could try one the options: -2c, -2c-exec, -exec, -ec, -lic, or -h for more optio
print_runtime_error
lxm
"An assertion is violated in the Lustre program"
;
my_exit
opt
1
|
Failure
msg
->
Printf
.
eprintf
"
\n
Runtime
Error: %s
\n
"
msg
;
Printf
.
eprintf
"
\n
Error: %s
\n
"
msg
;
my_exit
opt
1
|
Assert_failure
(
file
,
line
,
col
)
->
prerr_string
(
...
...
lib/l2lExpandNodes.ml
View file @
3300825b
(* Time-stamp: <modified the 2
9
/0
8
/201
9
(at 1
5:4
7) by Erwan Jahier> *)
(* Time-stamp: <modified the 2
2
/0
3
/20
2
1 (at 1
6:3
7) by Erwan Jahier> *)
open
Lxm
...
...
@@ -222,7 +222,7 @@ let (mk_output_subst : local_ctx -> Lxm.t -> subst -> var_info list -> Lic.left
we create
- a fresh var "_v"
- define the equation "x.field = _v;"
- create the substition n_output_par/_v
- create the substit
ut
ion n_output_par/_v
*)
let
(
aa
,
ae
,
av
)
=
acc
in
let
new_base
=
get_new_base
(
Lic
.
clock_of_left
left
)
(
snd
v
.
var_clock_eff
)
in
...
...
@@ -239,7 +239,9 @@ let (mk_output_subst : local_ctx -> Lxm.t -> subst -> var_info list -> Lic.left
in
let
new_base
=
match
new_base_opt
with
|
Some
x
->
x
|
None
->
assert
false
(* a node outgth to have at least an input or an output *)
|
None
->
raise
(
Lv6errors
.
Compile_error
(
lxm
,
"a node ought to have at least one input or one output"
))
in
s
,
acc
,
new_base
...
...
lib/lv6MainArgs.ml
View file @
3300825b
(* Time-stamp: <modified the 0
3
/0
3
/202
0
(at 1
5:28
) by Erwan Jahier> *)
(* Time-stamp: <modified the 0
7
/0
5
/202
1
(at 1
0:11
) by Erwan Jahier> *)
(*
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,
...
...
@@ -203,13 +203,13 @@ let dev_help opt ()= (
)
let
unexpected
s
opt
=
(
prerr_string
(
"unexpected argument
\"
"
^
s
^
"
\"
"
);
prerr_string
(
"
Error:
unexpected argument
\"
"
^
s
^
"
\"
"
);
prerr_newline
()
;
usage
stderr
opt
;
exit
1
)
let
file_notfound
f
opt
=
(
prerr_string
(
"
F
ile not found:
\"
"
^
f
^
"
\"
"
);
prerr_string
(
"
Error: f
ile not found:
\"
"
^
f
^
"
\"
"
);
prerr_newline
()
;
usage
stderr
opt
;
exit
1
...
...
test/lus2lic.sum
View file @
3300825b
==> lus2lic0.sum <==
Test run by jahier on
Mon Mar 15 23:09:3
3
Test run by jahier on
Thu Jul 1 10:56:4
3
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 Mar 15 23:09:34
Test run by jahier on
Thu Jul 1 10:56:43
Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests ===
...
...
@@ -238,6 +238,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c cpt.lus {}
PASS: ./lus2lic {-2c cst.lus -n cst}
PASS: sh cst.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c cst.lus {}
PASS: ./lus2lic {-2c dadic.lus -n dadic}
PASS: ./lus2lic {-2c deSimone.lus -n deSimone}
PASS: sh deSimone.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c deSimone.lus {}
...
...
@@ -413,7 +414,7 @@ PASS: ./lus2lic {-2c multipar.lus -n multipar}
PASS: sh multipar.sh
==> lus2lic2.sum <==
Test run by jahier on
Mon Mar 15 23:10:02
Test run by jahier on
Thu Jul 1 10:57:07
Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests ===
...
...
@@ -753,7 +754,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 Mar 15 23:10:38
Test run by jahier on
Thu Jul 1 10:57:39
Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests ===
...
...
@@ -994,9 +995,10 @@ PASS: ./lus2lic {} {-lic -o cst.lic cst.lus -n cst}
PASS: ./lus2lic {-ec -o cst.ec cst.lus -n cst}
PASS: ./myec2c {-o cst.c cst.ec}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node cst.lus {}
PASS: ./lus2lic { dadic.lv6} {-lic -o dadic_x5_a.lic dadic_x5_a.lus -n dadic_x5_a}
PASS: ./lus2lic { dadic.lv6} {-lic -o dadic_x5_b.lic dadic_x5_b.lus -n dadic_x5_b}
FAIL: without any option: ./lus2lic {} {-lic -o dadic_x5_c.lic dadic_x5_c.lus -n dadic_x5_c}
PASS: ./lus2lic {} {-lic -o dadic.lic dadic.lus -n dadic}
PASS: ./lus2lic {-ec -o dadic.ec dadic.lus -n dadic}
PASS: ./myec2c {-o dadic.c dadic.ec}
FAIL: without any option: ./lus2lic { dadic.lus} {-lic -o dadic_x5_c.lic dadic_x5_c.lus -n dadic_x5_c}
PASS: ./lus2lic {} {-lic -o deSimone.lic deSimone.lus -n deSimone}
PASS: ./lus2lic {-ec -o deSimone.ec deSimone.lus -n deSimone}
PASS: ./myec2c {-o deSimone.c deSimone.ec}
...
...
@@ -1267,7 +1269,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test run by jahier on
Mon Mar 15 23:11
:2
3
Test run by jahier on
Thu Jul 1 10:58
:2
1
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
...
...
@@ -1759,11 +1761,11 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
# of expected failures 54
==> lus2lic1.sum <==
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 3
4133
{}
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 3
9847
{}
=== lus2lic1 Summary ===
# of expected passes 33
6
# of expected passes 33
7
==> lus2lic2.sum <==
...
...
@@ -1775,7 +1777,7 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 34133
==> lus2lic3.sum <==
=== lus2lic3 Summary ===
# of expected passes 49
7
# of expected passes 49
8
# of unexpected failures 3
# of unresolved testcases 1
...
...
@@ -1787,14 +1789,14 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 34133
# of unexpected failures 6
===============================
# Total number of failures: 10
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in
1
seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 2
8
seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 3
6
seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 4
5
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 2
6
seconds
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 3
2
seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 4
1
seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 2
3
seconds
* Ref time:
85.81
user 1
8.64
system 2:
16.24
elapsed 7
6
%CPU (0avgtext+0avgdata 42
376
maxresident)k
0inputs+1
50784
outputs (0major+8
408425
minor)pagefaults 0swaps
72.65
user 1
6.39
system 2:
01.61
elapsed 7
3
%CPU (0avgtext+0avgdata 42
048
maxresident)k
0inputs+1
42488
outputs (0major+8
285622
minor)pagefaults 0swaps
* Quick time (-j 4):
83.16
user 1
6
.2
5
system
1:22.5
7elapsed
120
%CPU (0avgtext+0avgdata 42
428
maxresident)k
6000
inputs+1
48480
outputs (
8
major+
8310354
minor)pagefaults 0swaps
94.72
user 1
9
.2
3
system
0:48.7
7elapsed
233
%CPU (0avgtext+0avgdata 42
156
maxresident)k
8
inputs+1
20384
outputs (
1
major+
7050488
minor)pagefaults 0swaps
test/should_work/bug_map_fby.lus
View file @
3300825b
...
...
@@ -27,7 +27,7 @@ let
else
state
{
idy
=
ps
.
idy
;
leader
=
ps
.
leader
;
level
=
ps
.
level
};
tel
node
simu
(
ck
:
bool
^
5
)
returns
(
s
:
state
^
n
);
node
bug_map_fby
(
ck
:
bool
^
5
)
returns
(
s
:
state
^
n
);
var
ps
:
state
^
n
;
let
ps
=
map
<<
fby
,
5
>>
(
inits
,
s
);
...
...
test/should_work/dadic.l
v6
→
test/should_work/dadic.l
us
View file @
3300825b
...
...
@@ -2,7 +2,7 @@
dadic.lv6 version 1.00
******************************************************)
package
D
adic
package
d
adic
provides
(* O : x -> 2*x *)
node
O
(
x
:
bool
)
returns
(
y
:
bool
);
...
...
@@ -15,6 +15,9 @@ provides
(* Mult : const n, x -> n*x *)
node
Mult
<<
const
n
:
int
>>
(
x
:
bool
)
returns
(
y
:
bool
);
(* OfInt : const n -> x *)
(* for the nonreg test *)
node
dadic
(
x
:
bool
)
returns
(
y
:
bool
);
body
node
O
(
x
:
bool
)
returns
(
y
:
bool
);
...
...
@@ -68,5 +71,6 @@ let
I
(
OfInt
<<
(
n
-
1
)
div
2
>>
(
true
));
tel
node
dadic
=
Mult
<<
42
>>
;
end
test/should_work/dadic_x5_a.lus
deleted
100644 → 0
View file @
db127044
-- nonreg: dadic.lv6
node
dadic_x5_a
=
Dadic
::
Mult
<<
5
>>
;
test/should_work/dadic_x5_b.lus
deleted
100644 → 0
View file @
db127044
-- nonreg: dadic.lv6
package
Toto1
provides
node
x5
(
x
:
bool
)
returns
(
y
:
bool
);
body
node
x5
=
Dadic
::
Mult
<<
5
>>
;
end
test/should_work/dadic_x5_c.lus
View file @
3300825b
-- nonreg: dadic.lus
package
Toto2
uses
Dadic
;
provides
...
...
Write
Preview
Markdown
is supported
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