Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
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
Yixuan Chen
Iris
Commits
92eaf4f9
Commit
92eaf4f9
authored
5 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Prove that `is_lock` is contractive.
parent
ae0b5798
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/heap_lang/lib/lock.v
+1
-1
1 addition, 1 deletion
theories/heap_lang/lib/lock.v
theories/heap_lang/lib/spin_lock.v
+2
-2
2 additions, 2 deletions
theories/heap_lang/lib/spin_lock.v
theories/heap_lang/lib/ticket_lock.v
+3
-4
3 additions, 4 deletions
theories/heap_lang/lib/ticket_lock.v
with
6 additions
and
7 deletions
theories/heap_lang/lib/lock.v
+
1
−
1
View file @
92eaf4f9
...
@@ -13,7 +13,7 @@ Structure lock Σ `{!heapG Σ} := Lock {
...
@@ -13,7 +13,7 @@ Structure lock Σ `{!heapG Σ} := Lock {
is_lock
(
N
:
namespace
)
(
γ
:
name
)
(
lock
:
val
)
(
R
:
iProp
Σ
)
:
iProp
Σ
;
is_lock
(
N
:
namespace
)
(
γ
:
name
)
(
lock
:
val
)
(
R
:
iProp
Σ
)
:
iProp
Σ
;
locked
(
γ
:
name
)
:
iProp
Σ
;
locked
(
γ
:
name
)
:
iProp
Σ
;
(* -- general properties -- *)
(* -- general properties -- *)
is_lock_ne
N
γ
lk
:
N
on
Expans
ive
(
is_lock
N
γ
lk
);
is_lock_ne
N
γ
lk
:
C
on
tract
ive
(
is_lock
N
γ
lk
);
is_lock_persistent
N
γ
lk
R
:
Persistent
(
is_lock
N
γ
lk
R
);
is_lock_persistent
N
γ
lk
R
:
Persistent
(
is_lock
N
γ
lk
R
);
locked_timeless
γ
:
Timeless
(
locked
γ
);
locked_timeless
γ
:
Timeless
(
locked
γ
);
locked_exclusive
γ
:
locked
γ
-∗
locked
γ
-∗
False
;
locked_exclusive
γ
:
locked
γ
-∗
locked
γ
-∗
False
;
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lib/spin_lock.v
+
2
−
2
View file @
92eaf4f9
...
@@ -36,8 +36,8 @@ Section proof.
...
@@ -36,8 +36,8 @@ Section proof.
Global
Instance
lock_inv_ne
γ
l
:
NonExpansive
(
lock_inv
γ
l
)
.
Global
Instance
lock_inv_ne
γ
l
:
NonExpansive
(
lock_inv
γ
l
)
.
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
is_lock_
n
e
γ
l
:
N
on
Expans
ive
(
is_lock
γ
l
)
.
Global
Instance
is_lock_
contractiv
e
γ
l
:
C
on
tract
ive
(
is_lock
γ
l
)
.
Proof
.
solve_
proper
.
Qed
.
Proof
.
solve_
contractive
.
Qed
.
(** The main proofs. *)
(** The main proofs. *)
Global
Instance
is_lock_persistent
γ
l
R
:
Persistent
(
is_lock
γ
l
R
)
.
Global
Instance
is_lock_persistent
γ
l
R
:
Persistent
(
is_lock
γ
l
R
)
.
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lib/ticket_lock.v
+
3
−
4
View file @
92eaf4f9
...
@@ -54,11 +54,10 @@ Section proof.
...
@@ -54,11 +54,10 @@ Section proof.
Definition
locked
(
γ
:
gname
)
:
iProp
Σ
:=
(
∃
o
,
own
γ
(
◯
(
Excl'
o
,
GSet
∅
)))
%
I
.
Definition
locked
(
γ
:
gname
)
:
iProp
Σ
:=
(
∃
o
,
own
γ
(
◯
(
Excl'
o
,
GSet
∅
)))
%
I
.
Global
Instance
lock_inv_ne
γ
lo
ln
:
Global
Instance
lock_inv_ne
γ
lo
ln
:
NonExpansive
(
lock_inv
γ
lo
ln
)
.
NonExpansive
(
lock_inv
γ
lo
ln
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
is_lock_ne
γ
lk
:
NonExpansive
(
is_lock
γ
lk
)
.
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
is_lock_contractive
γ
lk
:
Contractive
(
is_lock
γ
lk
)
.
Proof
.
solve_contractive
.
Qed
.
Global
Instance
is_lock_persistent
γ
lk
R
:
Persistent
(
is_lock
γ
lk
R
)
.
Global
Instance
is_lock_persistent
γ
lk
R
:
Persistent
(
is_lock
γ
lk
R
)
.
Proof
.
apply
_
.
Qed
.
Proof
.
apply
_
.
Qed
.
Global
Instance
locked_timeless
γ
:
Timeless
(
locked
γ
)
.
Global
Instance
locked_timeless
γ
:
Timeless
(
locked
γ
)
.
...
...
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