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
fc6ca1fe
There was a problem fetching the pipeline summary.
Commit
fc6ca1fe
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
Mutex non-expansive, MutexGuard contractive
parent
56d13a1d
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/lang/lib/lock.v
+1
-1
1 addition, 1 deletion
theories/lang/lib/lock.v
theories/typing/lib/mutex/mutex.v
+13
-1
13 additions, 1 deletion
theories/typing/lib/mutex/mutex.v
theories/typing/lib/mutex/mutexguard.v
+10
-1
10 additions, 1 deletion
theories/typing/lib/mutex/mutexguard.v
with
24 additions
and
3 deletions
theories/lang/lib/lock.v
+
1
−
1
View file @
fc6ca1fe
...
...
@@ -27,7 +27,7 @@ Section proof.
Definition
locked
(
γ
:
gname
):
iProp
Σ
:=
own
γ
(
Excl
())
.
Global
Instance
lock_
inv
_ne
γ
l
:
NonExpansive
(
lock_proto
γ
l
)
.
Global
Instance
lock_
proto
_ne
γ
l
:
NonExpansive
(
lock_proto
γ
l
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
locked_timeless
γ
:
TimelessP
(
locked
γ
)
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/mutex/mutex.v
+
13
−
1
View file @
fc6ca1fe
...
...
@@ -87,7 +87,19 @@ Section mutex.
Global
Instance
mutex_wf
ty
`{
!
TyWf
ty
}
:
TyWf
(
mutex
ty
)
:=
{
ty_lfts
:=
ty
.(
ty_lfts
);
ty_wf_E
:=
ty
.(
ty_wf_E
)
}
.
(* TODO: Non-expansiveness, compat with eqtype, Send+Sync if ty is Send. *)
Global
Instance
mutex_type_ne
:
TypeNonExpansive
mutex
.
Proof
.
constructor
;
solve_proper_core
ltac
:(
fun
_
=>
exact
:
type_dist2_S
||
f_type_equiv
||
f_contractive
||
f_equiv
)
.
Qed
.
Global
Instance
mutex_ne
:
NonExpansive
mutex
.
Proof
.
constructor
;
solve_proper_core
ltac
:(
fun
_
=>
(
eapply
ty_size_ne
;
try
reflexivity
)
||
f_equiv
)
.
Qed
.
(* TODO: compat with eqtype, Send+Sync if ty is Send. *)
End
mutex
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/mutex/mutexguard.v
+
10
−
1
View file @
fc6ca1fe
...
...
@@ -79,7 +79,16 @@ Section mguard.
Global
Instance
mutexguard_wf
α
ty
`{
!
TyWf
ty
}
:
TyWf
(
mutexguard
α
ty
)
:=
{
ty_lfts
:=
[
α
];
ty_wf_E
:=
ty
.(
ty_wf_E
)
++
ty
.(
ty_outlives_E
)
α
}
.
(* TODO: Contractivity, compat with lft_incl and eqtype.
Global
Instance
mutexguard_type_contractive
α
:
TypeContractive
(
mutexguard
α
)
.
Proof
.
constructor
;
solve_proper_core
ltac
:(
fun
_
=>
f_type_equiv
||
f_contractive
||
f_equiv
||
exact
:
type_dist2_S
)
.
Qed
.
Global
Instance
mutexguard_ne
α
:
NonExpansive
(
mutexguard
α
)
.
Proof
.
apply
type_contractive_ne
,
_
.
Qed
.
(* TODO: compat with lft_incl and eqtype.
MutexGuard is Sync if T is Send. *)
End
mguard
.
...
...
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