Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
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
sasa
Commits
68416ad3
Commit
68416ad3
authored
5 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Fix: the computation of the round in lustre was wrong
parent
60123cdd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/lustre/round.lus
+11
-3
11 additions, 3 deletions
test/lustre/round.lus
with
11 additions
and
3 deletions
test/lustre/round.lus
+
11
−
3
View file @
68416ad3
-- -- Time-stamp: <modified the
1
8/0
9
/2019 (at
14:29
) by Erwan Jahier>
-- -- Time-stamp: <modified the
0
8/
1
0/2019 (at
21:36
) by Erwan Jahier>
--
-- Computing rounds in Lustre
-- The inputs are 2 arrays Enab and Acti, where:
...
...
@@ -9,6 +9,8 @@
-- m holds the number of actions per process
node
round
<<
const
an
:
int
;
const
pn
:
int
>>
(
Enab
,
Acti
:
bool
^
an
^
pn
)
returns
(
res
:
bool
);
var
-- mask[i] is true iff pi should be activated or stop being enabled
-- when forall i mask[i] is false, we have a round.
mask
:
bool
^
pn
;
pres
:
bool
;
psilent
:
bool
;
...
...
@@ -35,13 +37,19 @@ let
res
=
not
(
a
=>
b
);
tel
function
mask_update_one
(
Ei
,
Ai
,
pmaski
:
bool
)
returns
(
maski
:
bool
);
let
maski
=
pmaski
and
Ei
and
not
Ai
;
tel
function
mask_update
<<
const
an
:
int
;
const
pn
:
int
>>
(
E
,
A
:
bool
^
an
^
pn
;
pmask
:
bool
^
pn
)
returns
(
res
:
bool
^
pn
);
var
acti
:
bool
^
pn
;
-- at least one action is active
enab
,
acti
:
bool
^
pn
;
-- at least one action is active
let
acti
=
map
<<
red
<<
or
,
an
>>,
pn
>>
(
false
^
pn
,
A
);
res
=
map
<<
and
,
pn
>>
(
pmask
,
acti
);
enab
=
map
<<
red
<<
or
,
an
>>,
pn
>>
(
false
^
pn
,
E
);
-- res = map<<and, pn>>(pmask,acti);
res
=
map
<<
mask_update_one
,
pn
>>
(
enab
,
acti
,
pmask
);
tel
node
test53
=
round
<<
5
,
3
>>
...
...
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