Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
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
Michael Sammler
iris-coq
Commits
b36e009e
Commit
b36e009e
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Small tweak of spin lock.
parent
169532f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
heap_lang/lib/lock.v
+8
-4
8 additions, 4 deletions
heap_lang/lib/lock.v
with
8 additions
and
4 deletions
heap_lang/lib/lock.v
+
8
−
4
View file @
b36e009e
...
@@ -41,6 +41,12 @@ Proof. solve_proper. Qed.
...
@@ -41,6 +41,12 @@ Proof. solve_proper. Qed.
Global
Instance
is_lock_persistent
l
R
:
PersistentP
(
is_lock
l
R
)
.
Global
Instance
is_lock_persistent
l
R
:
PersistentP
(
is_lock
l
R
)
.
Proof
.
apply
_
.
Qed
.
Proof
.
apply
_
.
Qed
.
Lemma
locked_is_lock
l
R
:
locked
l
R
⊢
is_lock
l
R
.
Proof
.
iIntros
"Hl"
;
iDestruct
"Hl"
as
{
N
γ
}
"(?&?&?&_)"
.
iExists
N
,
γ
;
by
repeat
iSplit
.
Qed
.
Lemma
newlock_spec
N
(
R
:
iProp
)
Φ
:
Lemma
newlock_spec
N
(
R
:
iProp
)
Φ
:
heapN
⊥
N
→
heapN
⊥
N
→
(
heap_ctx
heapN
★
R
★
(
∀
l
,
is_lock
l
R
-★
Φ
(
LocV
l
)))
(
heap_ctx
heapN
★
R
★
(
∀
l
,
is_lock
l
R
-★
Φ
(
LocV
l
)))
...
@@ -69,14 +75,12 @@ Proof.
...
@@ -69,14 +75,12 @@ Proof.
Qed
.
Qed
.
Lemma
release_spec
R
l
(
Φ
:
val
→
iProp
)
:
Lemma
release_spec
R
l
(
Φ
:
val
→
iProp
)
:
(
locked
l
R
★
R
★
(
is_lock
l
R
-★
Φ
#
())
)
⊢
WP
release
(
%
l
)
{{
Φ
}}
.
(
locked
l
R
★
R
★
Φ
#
())
⊢
WP
release
(
%
l
)
{{
Φ
}}
.
Proof
.
Proof
.
iIntros
"(Hl&HR&HΦ)"
;
iDestruct
"Hl"
as
{
N
γ
}
"(%&#?&#?&Hγ)"
.
iIntros
"(Hl&HR&HΦ)"
;
iDestruct
"Hl"
as
{
N
γ
}
"(%&#?&#?&Hγ)"
.
rewrite
/
release
.
wp_let
.
rewrite
/
release
.
wp_let
.
iInv
N
as
"Hinv"
.
iDestruct
"Hinv"
as
{
b
}
"[Hl Hγ']"
;
destruct
b
.
iInv
N
as
"Hinv"
.
iDestruct
"Hinv"
as
{
b
}
"[Hl Hγ']"
;
destruct
b
.
-
wp_store
.
iSplitL
"Hl HR Hγ"
.
-
wp_store
.
iFrame
"HΦ"
.
iNext
.
iExists
false
.
by
iFrame
"Hl HR Hγ"
.
+
iNext
.
iExists
false
.
by
iFrame
"Hl HR Hγ"
.
+
iApply
"HΦ"
.
iExists
N
,
γ
.
by
repeat
iSplit
.
-
wp_store
.
iDestruct
"Hγ'"
as
"[Hγ' _]"
.
-
wp_store
.
iDestruct
"Hγ'"
as
"[Hγ' _]"
.
iCombine
"Hγ"
"Hγ'"
as
"Hγ"
.
by
iDestruct
own_valid
"Hγ"
as
"%"
.
iCombine
"Hγ"
"Hγ'"
as
"Hγ"
.
by
iDestruct
own_valid
"Hγ"
as
"%"
.
Qed
.
Qed
.
...
...
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