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
a600f732
Commit
a600f732
authored
6 years ago
by
Hai Dang
Browse files
Options
Downloads
Patches
Plain Diff
WIP: mortal SW protocols
parent
256b1de3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/lifetime/gps.v
+44
-2
44 additions, 2 deletions
theories/lifetime/gps.v
with
44 additions
and
2 deletions
theories/lifetime/gps.v
+
44
−
2
View file @
a600f732
...
@@ -3,7 +3,26 @@ From lrust.lang Require Import notation.
...
@@ -3,7 +3,26 @@ From lrust.lang Require Import notation.
From
lrust
.
lifetime
Require
Import
at_borrow
.
From
lrust
.
lifetime
Require
Import
at_borrow
.
From
gpfsl
.
gps
Require
Import
middleware
.
From
gpfsl
.
gps
Require
Import
middleware
.
Section
gps_at_bor
.
Section
gps_at_bor_SW
.
Context
`{
!
noprolG
Σ
,
!
gpsG
Σ
Prtcl
,
!
lftG
view_Lat
(
↑
histN
)
Σ
}
(
N
:
namespace
)
.
Local
Notation
vProp
:=
(
vProp
Σ
)
.
Implicit
Types
(
IP
:
interpC
Σ
Prtcl
)
(
l
:
loc
)
(
s
:
pr_stateT
Prtcl
)
(
t
:
time
)
(
v
:
val
)
(
E
:
coPset
)
(
q
:
Qp
)
(
κ
:
lft
)
(
γ
:
gname
)
.
Definition
GPS_aSP_Reader
IP
IPC
l
κ
t
s
v
γ
:
vProp
:=
(
GPS_SWReader
l
t
s
v
γ
∗
&
at
{
κ
,
N
}
(
GPS_INV
IP
l
IPC
γ
))
%
I
.
Definition
GPS_aSP_Writer
IP
IPC
l
κ
t
s
v
γ
:
vProp
:=
(
GPS_SWWriter
l
t
s
v
γ
∗
&
at
{
κ
,
N
}
(
GPS_INV
IP
l
IPC
γ
))
%
I
.
Definition
GPS_aSP_SharedReader
IP
IPC
l
κ
t
s
v
q
γ
:
vProp
:=
(
GPS_SWSharedReader
l
t
s
v
q
γ
∗
&
at
{
κ
,
N
}
(
GPS_INV
IP
l
IPC
γ
))
%
I
.
Definition
GPS_aSP_SharedWriter
IP
IPC
l
κ
t
s
v
γ
:
vProp
:=
(
GPS_SWSharedWriter
l
t
s
v
γ
∗
&
at
{
κ
,
N
}
(
GPS_INV
IP
l
IPC
γ
))
%
I
.
End
gps_at_bor_SW
.
Section
gps_at_bor_PP
.
Context
`{
!
noprolG
Σ
,
!
gpsG
Σ
Prtcl
,
!
gpsExAgG
Σ
,
!
lftG
view_Lat
(
↑
histN
)
Σ
}
Context
`{
!
noprolG
Σ
,
!
gpsG
Σ
Prtcl
,
!
gpsExAgG
Σ
,
!
lftG
view_Lat
(
↑
histN
)
Σ
}
(
N
:
namespace
)
.
(
N
:
namespace
)
.
Local
Notation
vProp
:=
(
vProp
Σ
)
.
Local
Notation
vProp
:=
(
vProp
Σ
)
.
...
@@ -45,6 +64,29 @@ Proof.
...
@@ -45,6 +64,29 @@ Proof.
iFrame
"Htok"
.
iExists
γ
,
t
,
v
.
by
iFrame
"PP Hl"
.
iFrame
"Htok"
.
iExists
γ
,
t
,
v
.
by
iFrame
"PP Hl"
.
Qed
.
Qed
.
Lemma
GPS_PP_Read
IP
l
κ
q
R
(
o
:
memOrder
)
t
s
v
γ
tid
E
(
DISJ
:
histN
##
N
)
(
SUB1
:
↑
lftN
⊆
E
)
(
SUB2
:
↑
histN
⊆
E
)
(
SUB3
:
↑
N
⊆
E
):
o
=
Relaxed
∨
o
=
AcqRel
→
{{{
⎡
lft_ctx
⎤
∗
(
q
).[
κ
]
∗
GPS_PP
IP
l
κ
t
s
v
γ
∗
(
▷
∀
t'
s'
v'
,
⌜
s
⊑
s'
∧
t
⊑
t'
⌝
-∗
<
obj
>
((
IP
false
l
γ
t'
s'
v'
=
{
E
∖
↑
N
}
=∗
IP
false
l
γ
t'
s'
v'
∗
R
t'
s'
v'
)
∧
(
IP
true
l
γ
t'
s'
v'
=
{
E
∖
↑
N
}
=∗
IP
true
l
γ
t'
s'
v'
∗
R
t'
s'
v'
)))
}}}
Read
o
#
l
in
tid
@
E
{{{
t'
s'
v'
,
RET
v'
;
⌜
s
⊑
s'
∧
t
⊑
t'
⌝
∗
GPS_PP
IP
l
κ
t'
s'
v'
γ
∗
(
q
).[
κ
]
∗
if
decide
(
AcqRel
⊑
o
)
%
stdpp
then
R
t'
s'
v'
else
▽
{
tid
}
R
t'
s'
v'
}}}
.
Proof
.
iIntros
(
RLX
Φ
)
"(#LFT & Htok & #[Hlc Hshr] & VS) Post"
.
iMod
(
at_bor_acc
with
"LFT Hshr Htok"
)
as
(
Vb
)
"[Hproto Hclose1]"
;
[
done
..|]
.
iApply
(
GPS_PPRaw_Local_Read
IP
l
R
o
t
s
v
γ
tid
Vb
with
"[$Hlc $Hproto $VS]"
);
[
solve_ndisj
|
done
|..]
.
iNext
.
iIntros
(
t'
s'
v'
)
"(Ext & Hlc' & Hproto & R)"
.
iMod
(
"Hclose1"
with
"Hproto"
)
as
"Htok"
.
iApply
(
"Post"
$!
t'
s'
v'
with
"[$Ext $Hlc' $Hshr $Htok $R]"
)
.
Qed
.
Lemma
GPS_PP_Write
IP
l
κ
q
(
o
:
memOrder
)
t
v
v'
s
s'
γ
tid
E
Lemma
GPS_PP_Write
IP
l
κ
q
(
o
:
memOrder
)
t
v
v'
s
s'
γ
tid
E
(
FIN
:
model
.
final_st
s'
)
(
FIN
:
model
.
final_st
s'
)
(
DISJ
:
histN
##
N
)
(
SUB1
:
↑
lftN
⊆
E
)
(
SUB2
:
↑
histN
⊆
E
)
(
SUB3
:
↑
N
⊆
E
):
(
DISJ
:
histN
##
N
)
(
SUB1
:
↑
lftN
⊆
E
)
(
SUB2
:
↑
histN
⊆
E
)
(
SUB3
:
↑
N
⊆
E
):
...
@@ -114,4 +156,4 @@ Proof.
...
@@ -114,4 +156,4 @@ Proof.
iDestruct
"CASE"
as
"[?|?]"
;
[
iLeft
|
iRight
];
by
iFrame
"Hshr"
.
iDestruct
"CASE"
as
"[?|?]"
;
[
iLeft
|
iRight
];
by
iFrame
"Hshr"
.
Qed
.
Qed
.
End
gps_at_bor
.
End
gps_at_bor
_PP
.
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