Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
Actris
Commits
06e771ee
You need to sign in or sign up before continuing.
Commit
06e771ee
authored
1 year ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring
parent
7b2259ff
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
multi_actris/examples/leader_election.v
+14
-14
14 additions, 14 deletions
multi_actris/examples/leader_election.v
with
14 additions
and
14 deletions
multi_actris/examples/leader_election.v
+
14
−
14
View file @
06e771ee
...
...
@@ -143,6 +143,20 @@ Section ring_leader_election_example.
wp_pures
.
by
iApply
(
process_spec
with
"Hc HΦ"
)
.
Qed
.
Definition
leader_election_prot
(
ps
:
gmap
nat
(
nat
→
iProto
Σ
))
:
gmap
nat
(
iProto
Σ
)
:=
<
[
0
:=
(
ps
!!!
0
)
0
]
>
(
<
[
1
:=
rle_preprot
3
1
2
(
ps
!!!
1
)
]
>
(
<
[
2
:=
rle_prot
1
2
3
(
ps
!!!
2
)
false
2
]
>
(
<
[
3
:=
rle_preprot
2
3
1
(
ps
!!!
3
)
]
>
∅
)))
.
(* TODO: iProto_consistent tactics not strong enough *)
(* It does not work with abstract protocols *)
Lemma
leader_election_prot_consistent
ps
:
(
∀
id_max
,
iProto_consistent
((
λ
p
,
p
id_max
)
<$>
ps
))
-∗
iProto_consistent
(
leader_election_prot
ps
)
.
Proof
.
Admitted
.
Definition
prot_tail
(
i_max
:
nat
)
:
iProto
Σ
:=
(
<
(
Send
,
0
)
>
MSG
#
i_max
;
END
)
%
proto
.
...
...
@@ -163,20 +177,6 @@ Section ring_leader_election_example.
iProto_consistent_take_steps
.
Qed
.
Definition
leader_election_prot
(
ps
:
gmap
nat
(
nat
→
iProto
Σ
))
:
gmap
nat
(
iProto
Σ
)
:=
<
[
0
:=
(
ps
!!!
0
)
0
]
>
(
<
[
1
:=
rle_preprot
3
1
2
(
ps
!!!
1
)
]
>
(
<
[
2
:=
rle_prot
1
2
3
(
ps
!!!
2
)
false
2
]
>
(
<
[
3
:=
rle_preprot
2
3
1
(
ps
!!!
3
)
]
>
∅
)))
.
(* TODO: iProto_consistent tactics not strong enough *)
(* It does not work with abstract protocols *)
Lemma
leader_election_prot_consistent
ps
:
(
∀
id_max
,
iProto_consistent
((
λ
p
,
p
id_max
)
<$>
ps
))
-∗
iProto_consistent
(
leader_election_prot
ps
)
.
Proof
.
Admitted
.
Lemma
leader_election_safety_prot_consistent
:
⊢
iProto_consistent
(
leader_election_prot
safety_prot
)
.
Proof
.
...
...
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