Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
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
Model registry
Operate
Environments
Monitor
Service Desk
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
lambda-rust
Commits
d7d27fb7
There was a problem fetching the pipeline summary.
Commit
d7d27fb7
authored
7 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Cancellable invariants are not need for lock.
parent
21a5a9ee
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/lang/lib/lock.v
+3
-4
3 additions, 4 deletions
theories/lang/lib/lock.v
with
3 additions
and
4 deletions
theories/lang/lib/lock.v
+
3
−
4
View file @
d7d27fb7
From
iris
.
program_logic
Require
Import
weakestpre
.
From
iris
.
base_logic
.
lib
Require
Import
cancelable_invariants
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
algebra
Require
Import
excl
.
From
lrust
.
lang
Require
Import
lang
proofmode
notation
.
...
...
@@ -14,14 +13,14 @@ Definition release : val := λ: ["l"], "l" <-ˢᶜ #false.
(** The CMRA we need. *)
(* Not bundling heapG, as it may be shared with other users. *)
Class
lockG
Σ
:=
LockG
{
lock_tokG
:>
inG
Σ
(
exclR
unitC
)
;
lock_cinvG
:>
cinvG
Σ
}
.
Definition
lockΣ
:
gFunctors
:=
#
[
GFunctor
(
exclR
unitC
)
;
cinvΣ
]
.
Class
lockG
Σ
:=
LockG
{
lock_tokG
:>
inG
Σ
(
exclR
unitC
)
}
.
Definition
lockΣ
:
gFunctors
:=
#
[
GFunctor
(
exclR
unitC
)]
.
Instance
subG_lockΣ
{
Σ
}
:
subG
lockΣ
Σ
→
lockG
Σ
.
Proof
.
solve_inG
.
Qed
.
Section
proof
.
Context
`{
!
lrustG
Σ
,
!
lockG
Σ
}
(
N
:
namespace
)
.
Context
`{
!
lrustG
Σ
,
!
lockG
Σ
}
.
Definition
lock_proto
(
γ
:
gname
)
(
l
:
loc
)
(
R
:
iProp
Σ
)
:
iProp
Σ
:=
(
∃
b
:
bool
,
l
↦
#
b
∗
if
b
then
True
else
own
γ
(
Excl
())
∗
R
)
%
I
.
...
...
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