Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
gpfsl
Commits
f20de0eb
Commit
f20de0eb
authored
Oct 11, 2021
by
Hai Dang
Browse files
more cleanup
parent
0ba83527
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/examples/queue/proof_hw_graph.v
View file @
f20de0eb
...
...
@@ -33,8 +33,8 @@ Definition hwqN (N: namespace) (q : loc) := N .@ q.
(* Ghost Construction we need *)
Definition
backUR
:
=
mono_natUR
.
(* a persistent map
of
from enqueued event ids to slots. *)
Definition
emapUR
:
=
authUR
$
gmapU
R
event_id
(
agreeR
(
leibnizO
nat
))
.
(* a persistent map from enqueued event ids to slots. *)
Definition
emapUR
:
=
authUR
$
agreeM
R
event_id
nat
.
Definition
prod2UR
A
B
C
:
=
prodUR
(
prodUR
A
B
)
C
.
Definition
prod3UR
A
B
C
D
:
=
prodUR
(
prod2UR
A
B
C
)
D
.
...
...
@@ -133,7 +133,9 @@ Proof.
Qed
.
(* Slot states *)
(* TODO: we can do better than Z *)
(* We can do better than Z, but our language doesn't have comparison for
arbitrary literals, and comparison is needed to check for failures.
So we restrict the usage of the queue to Z, for now. *)
Definition
enqueue_info
:
Type
:
=
(
Z
*
logView
)
*
(
view
*
event_id
).
Definition
einf_val
(
ei
:
enqueue_info
)
:
Z
:
=
ei
.
1
.
1
.
Definition
einf_lview
(
ei
:
enqueue_info
)
:
logView
:
=
ei
.
1
.
2
.
...
...
@@ -1051,20 +1053,17 @@ Lemma to_enq_slots_fork T e i :
to_enq_slots
T
~~>
to_enq_slots
T
⋅
◯
{[
e
:
=
to_agree
i
]}.
Proof
.
intros
Eqe
.
apply
auth_update_alloc
.
etrans
;
first
apply
core_id_local_update
;
last
(
rewrite
left_id
;
by
eauto
)
;
[
apply
_
|].
apply
singleton_included_l
.
exists
(
to_agree
i
).
split
;
[|
done
].
by
rewrite
lookup_fmap
Eqe
.
etrans
;
first
by
apply
to_agreeM_local_update_fork_singleton
.
by
rewrite
{
2
}/
to_agreeM
fmap_insert
fmap_empty
.
Qed
.
Lemma
to_enq_slots_insert
T
e
i
:
T
!!
e
=
None
→
to_enq_slots
T
~~>
to_enq_slots
(<[
e
:
=
i
]>
T
)
⋅
◯
{[
e
:
=
to_agree
i
]}.
Proof
.
intros
FRe
.
apply
auth_update_alloc
.
(* TODO: another lemma for to_agreeM *)
rewrite
/
to_agreeM
fmap_insert
.
apply
alloc_singleton_local_update
.
-
by
rewrite
lookup_fmap
FRe
.
-
done
.
intros
.
apply
auth_update_alloc
.
etrans
;
first
by
apply
to_agreeM_local_update_insert_singleton
.
by
rewrite
{
2
}/
to_agreeM
fmap_insert
fmap_empty
.
Qed
.
Lemma
slots_master_set_enqueued
{
γ
q
slots
T
i
γ
v
M
}
e
V
:
...
...
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