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
b7eaa299
Commit
b7eaa299
authored
Oct 11, 2021
by
Hai Dang
Browse files
Add some comments
parent
4ba397e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/examples/stack/proof_treiber_gps.v
View file @
b7eaa299
...
...
@@ -17,7 +17,11 @@ Local Notation data := 1%nat (only parsing).
memory.
Furthermore, this implementation uses 0 and -1 as flags for EMPTY and
FAIL_RACE repsectively, so if the client should not push elements with those
values, otherwise they'll lose resources. *)
values, otherwise they'll lose resources.
In order to support reclamation, we will need to track the freeable resources
more closely, and abandon [ReachableD] (see below). That may mean abandoning
GPS protocol altogether. *)
(** The CMRA & functor we need. *)
Class
tstackG
Σ
:
=
TreiberStackG
{
tstack_gpsG
:
>
gpsIPG
Σ
unitProtocol
;
}.
...
...
@@ -42,7 +46,9 @@ Definition Reachable'
match
A
with
|
nil
=>
⌜
l
=
0
⌝
|
v
::
A'
=>
∃
l'
,
⌜
l
=
(
LitLoc
l'
)
⌝
∗
(* not strictly needed *)
⎡
†
l'
…
2
⎤
∗
(* freeable resource is only needed for reclamation, which
is not done yet *)
⎡
†
l'
…
2
⎤
∗
(
l'
>>
data
)
↦
#
v
∗
P
v
∗
∃
q
(
n'
:
lit
),
(
l'
>>
next
)
↦
{
q
}
#
n'
∗
▷
F
n'
A'
end
)%
I
.
...
...
@@ -346,7 +352,7 @@ Proof.
(* From HD we know s' is alive. *)
iDestruct
"HD"
as
(
s1
?
q
)
"[Hs1 HD]"
.
subst
s'
.
(* we are leaking fractions of s1 ("Hs1") and others ("HD") here.
A non-leaking algorithm should have some way to retrieve this fraction.
A non-leaking algorithm should have some way to retrieve
/avoid
this fraction.
Then the setup in this proof will not work any more. *)
rewrite
shift_0
.
wp_apply
(
GPS_iPP_CAS_live_loc
(
tstackN
s
)
(
Head
P
)
_
_
_
s
_
s1
#
n
_
...
...
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