Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-atomic
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
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
FP
iris-atomic
Commits
697ac29a
Commit
697ac29a
authored
8 years ago
by
Zhen Zhang
Browse files
Options
Downloads
Patches
Plain Diff
improve proof
parent
4ee578f6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sync.v
+15
-13
15 additions, 13 deletions
sync.v
with
15 additions
and
13 deletions
sync.v
+
15
−
13
View file @
697ac29a
...
@@ -108,14 +108,14 @@ Section generic.
...
@@ -108,14 +108,14 @@ Section generic.
(
β
:
A
→
A
→
val
→
iProp
Σ
)
(
β
:
A
→
A
→
val
→
iProp
Σ
)
(
Ei
Eo
:
coPset
)
(
Ei
Eo
:
coPset
)
(
e
:
expr
)
γ
:
iProp
Σ
:=
(
e
:
expr
)
γ
:
iProp
Σ
:=
(
∀
Q
,
(
∀
g
g
'
r
,
(
True
={
Eo
,
Ei
}=>
gFrag
γ
g
)
★
(
∀
P
Q
,
(
∀
g
g
'
r
,
(
P
={
Eo
,
Ei
}=>
gFrag
γ
g
)
★
(
gFrag
γ
g
'
★
β
g
g
'
r
={
Ei
,
Eo
}=>
Q
r
))
-
★
WP
e
{{
Q
}}
)
%
I
.
(
gFrag
γ
g
'
★
β
g
g
'
r
={
Ei
,
Eo
}=>
Q
r
))
-
★
{{
P
}}
e
{{
Q
}}
)
%
I
.
(
*
Definition
atomic_spec
γ
(
f
:
val
)
:
iProp
Σ
:=
*
)
Lemma
update_a
:
∀
x
x
'
:
A
,
(
gFullR
x
⋅
gFragR
x
)
~~>
(
gFullR
x
'
⋅
gFragR
x
'
).
(
*
(
∀
a
b
:
val
,
atomic_triple
'
(
β
a
b
)
heapN
(
⊤
∖
nclose
N
)
(
f
a
b
)
γ
)
%
I
.
*
)
Proof
.
intros
x
x
'
.
(
*
Lemma
pcas_atomic_spec
(
x10
x20
:
val
)
:
*
)
Admitted
.
(
*
heapN
⊥
N
→
heap_ctx
⊢
WP
mk_pcas
x10
x20
{{
f
,
∃
γ
,
□
is_pcas
γ
f
}}
*
)
End
triple
.
End
triple
.
End
generic
.
End
generic
.
...
@@ -201,7 +201,8 @@ Section atomic_pair.
...
@@ -201,7 +201,8 @@ Section atomic_pair.
iClear
"Hfrag"
.
(
*
HFrag
should
be
handled
to
user
?
*
)
iClear
"Hfrag"
.
(
*
HFrag
should
be
handled
to
user
?
*
)
iVsIntro
.
iExists
γ
.
iAlways
.
iVsIntro
.
iExists
γ
.
iAlways
.
rewrite
/
is_pcas
.
rewrite
/
is_pcas
.
iIntros
(
a
b
Q
)
"H"
.
iIntros
(
a
b
P
Q
)
"#H"
.
iAlways
.
iIntros
"HP"
.
repeat
wp_let
.
repeat
wp_let
.
wp_bind
(
acquire
_
).
wp_bind
(
acquire
_
).
iApply
acquire_spec
.
iApply
acquire_spec
.
...
@@ -221,14 +222,15 @@ Section atomic_pair.
...
@@ -221,14 +222,15 @@ Section atomic_pair.
rewrite
/
is_lock
.
rewrite
/
is_lock
.
iDestruct
"Hlk"
as
(
l
)
"(% & _ & % & Hinv)"
.
iDestruct
"Hlk"
as
(
l
)
"(% & _ & % & Hinv)"
.
iInv
N
as
([])
">[Hl _]"
"Hclose"
.
iInv
N
as
([])
">[Hl _]"
"Hclose"
.
*
iVs
(
"Hvs1"
with
"[]"
)
as
"Hfraga"
;
first
by
auto
.
*
iVs
(
"Hvs1"
with
"[
HP
]"
)
as
"Hfraga"
;
first
by
auto
.
subst
.
wp_store
.
subst
.
wp_store
.
iAssert
(
β
a
b
(
a
,
a
)
(
b
,
b
)
#
true
)
as
"Hβ"
.
iAssert
(
β
a
b
(
a
,
a
)
(
b
,
b
)
#
true
)
as
"Hβ"
.
{
iPureIntro
.
left
.
eauto
.
}
{
iPureIntro
.
left
.
eauto
.
}
iAssert
(
gFrag
γ
(
a
,
a
)
★
gFull
γ
(
a
,
a
)
-
★
gFrag
γ
(
b
,
b
)
★
gFull
γ
(
b
,
b
))
%
I
as
"H"
.
iCombine
"HFulla"
"Hfraga"
as
"Ha"
.
{
admit
.
}
iVs
(
own_update
with
"Ha"
)
as
"Hb"
.
iDestruct
(
"H"
with
"[Hfraga HFulla]"
)
as
"[HFragb HFullb]"
;
first
by
iFrame
.
{
instantiate
(
H4
:=
(
gFullR
(
b
,
b
)
⋅
gFragR
(
b
,
b
))).
apply
update_a
.
eauto
.
}
iDestruct
(
own_op
with
"Hb"
)
as
"[HFullb HFragb]"
.
iVs
(
"Hvs2"
with
"[HFragb Hβ]"
);
first
by
iFrame
.
iVs
(
"Hvs2"
with
"[HFragb Hβ]"
);
first
by
iFrame
.
rewrite
/
lock_inv
.
rewrite
/
lock_inv
.
iVsIntro
.
iVs
(
"Hclose"
with
"[-~]"
).
iVsIntro
.
iVs
(
"Hclose"
with
"[-~]"
).
...
...
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