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
26416abd
Commit
26416abd
authored
10 years ago
by
Erwan Jahier
Browse files
Options
Downloads
Patches
Plain Diff
SocExec : Fix a bug affecting iterators on nodes with memory
parent
ecc8a594
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
src/socExec.ml
+8
-6
8 additions, 6 deletions
src/socExec.ml
test/lus2lic.sum
+7
-7
7 additions, 7 deletions
test/lus2lic.sum
test/lus2lic.time
+1
-1
1 addition, 1 deletion
test/lus2lic.time
with
16 additions
and
14 deletions
src/socExec.ml
+
8
−
6
View file @
26416abd
(* Time-stamp: <modified the 1
0
/06/2014 (at 1
0
:4
7
) by Erwan Jahier> *)
(* Time-stamp: <modified the 1
6
/06/2014 (at 1
1
:4
8
) by Erwan Jahier> *)
open
Soc
open
Soc
open
Data
open
Data
...
@@ -114,10 +114,11 @@ let rec (soc_step : Soc.step_method -> Soc.tbl -> Soc.t -> SocExecValue.ctx
...
@@ -114,10 +114,11 @@ let rec (soc_step : Soc.step_method -> Soc.tbl -> Soc.t -> SocExecValue.ctx
|
_
->
assert
false
(* should not occur *)
|
_
->
assert
false
(* should not occur *)
in
in
rctx
:=
do_step
inst_name
.
(
i
)
node_step
!
rctx
soc_tbl
node_soc
vel_in
vel_out
;
rctx
:=
do_step
inst_name
.
(
i
)
node_step
!
rctx
soc_tbl
node_soc
vel_in
vel_out
;
rctx
:=
{
!
rctx
with
s
=
sadd
!
rctx
.
s
(
"$first_step"
::!
rctx
.
cpath
)
(
B
false
)
};
rctx
:=
{
!
rctx
with
cpath
=
List
.
tl
!
rctx
.
cpath
};
rctx
:=
{
!
rctx
with
cpath
=
List
.
tl
!
rctx
.
cpath
};
done
;
done
;
if
iter
<>
"map"
then
(
if
iter
<>
"map"
then
(
let
a_in
=
Var
(
List
.
hd
iter_inputs
)
in
let
a_in
=
Var
(
List
.
hd
iter_inputs
)
in
let
a_out
=
Var
(
List
.
hd
iter_outputs
)
in
let
a_out
=
Var
(
List
.
hd
iter_outputs
)
in
rctx
:=
assign_expr
!
rctx
a_in
a_out
);
(* a_out=a_n *)
rctx
:=
assign_expr
!
rctx
a_in
a_out
);
(* a_out=a_n *)
!
rctx
;
!
rctx
;
...
@@ -147,7 +148,9 @@ and (do_gao : Lxm.t -> Soc.tbl -> SocExecValue.ctx -> gao -> SocExecValue.ctx)
...
@@ -147,7 +148,9 @@ and (do_gao : Lxm.t -> Soc.tbl -> SocExecValue.ctx -> gao -> SocExecValue.ctx)
let
soc
=
SocUtils
.
find
lxm
sk
soc_tbl
in
let
soc
=
SocUtils
.
find
lxm
sk
soc_tbl
in
let
step
=
match
soc
.
step
with
[
step
]
->
step
|
_
->
assert
false
in
let
step
=
match
soc
.
step
with
[
step
]
->
step
|
_
->
assert
false
in
let
ctx
=
do_step
proc_name
step
ctx
soc_tbl
soc
vel_in
vel_out
in
let
ctx
=
do_step
proc_name
step
ctx
soc_tbl
soc
vel_in
vel_out
in
{
ctx
with
cpath
=
path_saved
}
{
ctx
with
cpath
=
path_saved
}
)
)
|
Call
(
vel_out
,
Method
((
inst_name
,
sk
)
,
step_name
)
,
vel_in
)
->
(
|
Call
(
vel_out
,
Method
((
inst_name
,
sk
)
,
step_name
)
,
vel_in
)
->
(
let
path_saved
=
ctx
.
cpath
in
let
path_saved
=
ctx
.
cpath
in
...
@@ -157,9 +160,7 @@ and (do_gao : Lxm.t -> Soc.tbl -> SocExecValue.ctx -> gao -> SocExecValue.ctx)
...
@@ -157,9 +160,7 @@ and (do_gao : Lxm.t -> Soc.tbl -> SocExecValue.ctx -> gao -> SocExecValue.ctx)
with
Not_found
->
assert
false
with
Not_found
->
assert
false
in
in
let
ctx
=
do_step
inst_name
step
ctx
soc_tbl
soc
vel_in
vel_out
in
let
ctx
=
do_step
inst_name
step
ctx
soc_tbl
soc
vel_in
vel_out
in
let
ctx
=
{
s
=
sadd
ctx
.
s
(
"$first_step"
::
ctx
.
cpath
)
(
B
false
);
let
ctx
=
{
ctx
with
cpath
=
path_saved
}
in
cpath
=
path_saved
}
in
ctx
ctx
)
)
and
(
do_step
:
Ident
.
t
->
step_method
->
SocExecValue
.
ctx
->
Soc
.
tbl
->
Soc
.
t
->
and
(
do_step
:
Ident
.
t
->
step_method
->
SocExecValue
.
ctx
->
Soc
.
tbl
->
Soc
.
t
->
...
@@ -171,6 +172,7 @@ and (do_step : Ident.t -> step_method -> SocExecValue.ctx -> Soc.tbl -> Soc.t ->
...
@@ -171,6 +172,7 @@ and (do_step : Ident.t -> step_method -> SocExecValue.ctx -> Soc.tbl -> Soc.t ->
let
new_s
=
substitute_args_and_params
vel_in
step_in_vars
ctx
in
let
new_s
=
substitute_args_and_params
vel_in
step_in_vars
ctx
in
let
ctx
=
soc_step
step
soc_tbl
soc
{
ctx
with
s
=
new_s
}
in
let
ctx
=
soc_step
step
soc_tbl
soc
{
ctx
with
s
=
new_s
}
in
let
s_out
=
substitute_params_and_args
step_out_vars
vel_out
ctx
in
let
s_out
=
substitute_params_and_args
step_out_vars
vel_out
ctx
in
let
s_out
=
sadd
s_out
(
"$first_step"
::
ctx
.
cpath
)
(
B
false
)
in
{
ctx
with
s
=
s_out
}
{
ctx
with
s
=
s_out
}
(* get the step params from its soc params *)
(* get the step params from its soc params *)
...
...
This diff is collapsed.
Click to expand it.
test/lus2lic.sum
+
7
−
7
View file @
26416abd
Test Run By jahier on
Fri
Jun 1
3
1
7
:0
1
:2
2
2014
Test Run By jahier on
Mon
Jun 1
6
1
6
:0
8
:2
5
2014
Native configuration is i686-pc-linux-gnu
Native configuration is i686-pc-linux-gnu
=== lus2lic tests ===
=== lus2lic tests ===
...
@@ -157,7 +157,7 @@ FAIL: Generate c code : ./lus2lic {-2c should_work/call06.lus -n call06}
...
@@ -157,7 +157,7 @@ FAIL: Generate c code : ./lus2lic {-2c should_work/call06.lus -n call06}
PASS: ./lus2lic {-o /tmp/deSimone.lic should_work/deSimone.lus}
PASS: ./lus2lic {-o /tmp/deSimone.lic should_work/deSimone.lus}
PASS: ./lus2lic {-ec -o /tmp/deSimone.ec should_work/deSimone.lus}
PASS: ./lus2lic {-ec -o /tmp/deSimone.ec should_work/deSimone.lus}
PASS: ./myec2c {-o /tmp/deSimone.c /tmp/deSimone.ec}
PASS: ./myec2c {-o /tmp/deSimone.c /tmp/deSimone.ec}
FAIL: Try to compare lus2lic -exec and ecexe
: ../utils/test_lus2lic_no_node should_work/deSimone.lus
PASS
: ../utils/test_lus2lic_no_node should_work/deSimone.lus
PASS: ./lus2lic {-2c should_work/deSimone.lus -n deSimone}
PASS: ./lus2lic {-2c should_work/deSimone.lus -n deSimone}
FAIL: Check that the generated C code compiles : gcc deSimone_deSimone.c deSimone_deSimone_loop.c
FAIL: Check that the generated C code compiles : gcc deSimone_deSimone.c deSimone_deSimone_loop.c
PASS: ./lus2lic {-o /tmp/bug2.lic should_work/bug2.lus}
PASS: ./lus2lic {-o /tmp/bug2.lic should_work/bug2.lus}
...
@@ -280,7 +280,7 @@ PASS: gcc test_node_expand2_test_node_expand2.c test_node_expand2_test_node_expa
...
@@ -280,7 +280,7 @@ PASS: gcc test_node_expand2_test_node_expand2.c test_node_expand2_test_node_expa
PASS: ./lus2lic {-o /tmp/test.lic should_work/test.lus}
PASS: ./lus2lic {-o /tmp/test.lic should_work/test.lus}
PASS: ./lus2lic {-ec -o /tmp/test.ec should_work/test.lus}
PASS: ./lus2lic {-ec -o /tmp/test.ec should_work/test.lus}
PASS: ./myec2c {-o /tmp/test.c /tmp/test.ec}
PASS: ./myec2c {-o /tmp/test.c /tmp/test.ec}
FAIL: Try to compare lus2lic -exec and ecexe
: ../utils/test_lus2lic_no_node should_work/test.lus
PASS
: ../utils/test_lus2lic_no_node should_work/test.lus
PASS: ./lus2lic {-2c should_work/test.lus -n test}
PASS: ./lus2lic {-2c should_work/test.lus -n test}
PASS: gcc test_test.c test_test_loop.c
PASS: gcc test_test.c test_test_loop.c
PASS: ./lus2lic {-o /tmp/FALLING_EDGE.lic should_work/FALLING_EDGE.lus}
PASS: ./lus2lic {-o /tmp/FALLING_EDGE.lic should_work/FALLING_EDGE.lus}
...
@@ -618,7 +618,7 @@ PASS: gcc param_node3_param_node3.c param_node3_param_node3_loop.c
...
@@ -618,7 +618,7 @@ PASS: gcc param_node3_param_node3.c param_node3_param_node3_loop.c
PASS: ./lus2lic {-o /tmp/pipeline.lic should_work/pipeline.lus}
PASS: ./lus2lic {-o /tmp/pipeline.lic should_work/pipeline.lus}
PASS: ./lus2lic {-ec -o /tmp/pipeline.ec should_work/pipeline.lus}
PASS: ./lus2lic {-ec -o /tmp/pipeline.ec should_work/pipeline.lus}
PASS: ./myec2c {-o /tmp/pipeline.c /tmp/pipeline.ec}
PASS: ./myec2c {-o /tmp/pipeline.c /tmp/pipeline.ec}
FAIL: Try to compare lus2lic -exec and ecexe
: ../utils/test_lus2lic_no_node should_work/pipeline.lus
PASS
: ../utils/test_lus2lic_no_node should_work/pipeline.lus
PASS: ./lus2lic {-2c should_work/pipeline.lus -n pipeline}
PASS: ./lus2lic {-2c should_work/pipeline.lus -n pipeline}
FAIL: Check that the generated C code compiles : gcc pipeline_pipeline.c pipeline_pipeline_loop.c
FAIL: Check that the generated C code compiles : gcc pipeline_pipeline.c pipeline_pipeline_loop.c
PASS: ./lus2lic {-o /tmp/mapinf.lic should_work/mapinf.lus}
PASS: ./lus2lic {-o /tmp/mapinf.lic should_work/mapinf.lus}
...
@@ -1479,9 +1479,9 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman
...
@@ -1479,9 +1479,9 @@ XPASS: Test bad programs (semantics): lus2lic {-o /tmp/bug.lic should_fail/seman
=== lus2lic Summary ===
=== lus2lic Summary ===
# of expected passes 121
1
# of expected passes 121
4
# of unexpected failures 19
8
# of unexpected failures 19
5
# of unexpected successes 21
# of unexpected successes 21
# of expected failures 37
# of expected failures 37
testcase ./lus2lic.tests/non-reg.exp completed in 1
18
seconds
testcase ./lus2lic.tests/non-reg.exp completed in 1
33
seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
This diff is collapsed.
Click to expand it.
test/lus2lic.time
+
1
−
1
View file @
26416abd
testcase ./lus2lic.tests/non-reg.exp completed in 1
18
seconds
testcase ./lus2lic.tests/non-reg.exp completed in 1
33
seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
testcase ./lus2lic.tests/progression.exp completed in 0 seconds
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