Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rodolphe Lepigre
Iris
Commits
cd0ae810
Commit
cd0ae810
authored
Nov 24, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify wp_invariance.
parent
fd89aa52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
program_logic/adequacy.v
program_logic/adequacy.v
+9
-10
No files found.
program_logic/adequacy.v
View file @
cd0ae810
...
@@ -151,17 +151,17 @@ Proof.
...
@@ -151,17 +151,17 @@ Proof.
iApply
wp_safe
.
iFrame
"Hw"
.
by
iApply
(
big_sepL_elem_of
with
"Htp"
).
iApply
wp_safe
.
iFrame
"Hw"
.
by
iApply
(
big_sepL_elem_of
with
"Htp"
).
Qed
.
Qed
.
Lemma
wptp_invariance
I
n
e1
e2
t1
t2
σ
1
σ
2
φ
Φ
:
Lemma
wptp_invariance
n
e1
e2
t1
t2
σ
1
σ
2
φ
Φ
:
nsteps
step
n
(
e1
::
t1
,
σ
1
)
(
t2
,
σ
2
)
→
nsteps
step
n
(
e1
::
t1
,
σ
1
)
(
t2
,
σ
2
)
→
I
∗
(
state_interp
σ
2
-
∗
I
={
⊤
,
∅
}=
∗
⌜φ⌝
)
∗
world
σ
1
∗
WP
e1
{{
Φ
}}
∗
wptp
t1
(
state_interp
σ
2
={
⊤
,
∅
}=
∗
⌜φ⌝
)
∗
world
σ
1
∗
WP
e1
{{
Φ
}}
∗
wptp
t1
⊢
Nat
.
iter
(
S
(
S
n
))
(
λ
P
,
|==>
▷
P
)
⌜φ⌝
.
⊢
Nat
.
iter
(
S
(
S
n
))
(
λ
P
,
|==>
▷
P
)
⌜φ⌝
.
Proof
.
Proof
.
intros
?.
rewrite
wptp_steps
//.
intros
?.
rewrite
wptp_steps
//.
rewrite
(
Nat_iter_S_r
(
S
n
))
!
bupd_iter_frame_l
.
apply
bupd_iter_mono
.
rewrite
(
Nat_iter_S_r
(
S
n
))
!
bupd_iter_frame_l
.
apply
bupd_iter_mono
.
iIntros
"
(HI & Hback & H)
"
.
iIntros
"
[Hback H]
"
.
iDestruct
"H"
as
(
e2'
t2'
)
"(% & (Hw&HE&Hσ) & _)"
;
subst
.
iDestruct
"H"
as
(
e2'
t2'
)
"(% & (Hw&HE&Hσ) & _)"
;
subst
.
rewrite
fupd_eq
.
rewrite
fupd_eq
.
iMod
(
"Hback"
with
"Hσ
HI
[$Hw $HE]"
)
as
"> (_ & _ & $)"
;
auto
.
iMod
(
"Hback"
with
"Hσ [$Hw $HE]"
)
as
"> (_ & _ & $)"
;
auto
.
Qed
.
Qed
.
End
adequacy
.
End
adequacy
.
...
@@ -189,12 +189,11 @@ Proof.
...
@@ -189,12 +189,11 @@ Proof.
iFrame
.
by
iApply
big_sepL_nil
.
iFrame
.
by
iApply
big_sepL_nil
.
Qed
.
Qed
.
Theorem
wp_invariance
{
Λ
}
`
{
invPreG
Σ
}
e
σ
1
t2
σ
2
I
φ
Φ
:
Theorem
wp_invariance
{
Λ
}
`
{
invPreG
Σ
}
e
σ
1
t2
σ
2
φ
Φ
:
(
∀
`
{
Hinv
:
invG
Σ
},
(
∀
`
{
Hinv
:
invG
Σ
},
True
={
⊤
}=
∗
∃
stateI
:
state
Λ
→
iProp
Σ
,
True
={
⊤
}=
∗
∃
stateI
:
state
Λ
→
iProp
Σ
,
let
_
:
irisG
Λ
Σ
:
=
IrisG
_
_
Hinv
stateI
in
let
_
:
irisG
Λ
Σ
:
=
IrisG
_
_
Hinv
stateI
in
stateI
σ
1
∗
I
∗
WP
e
{{
Φ
}}
∗
stateI
σ
1
∗
WP
e
{{
Φ
}}
∗
(
stateI
σ
2
={
⊤
,
∅
}=
∗
⌜φ⌝
))
→
(
stateI
σ
2
-
∗
I
={
⊤
,
∅
}=
∗
⌜φ⌝
))
→
rtc
step
([
e
],
σ
1
)
(
t2
,
σ
2
)
→
rtc
step
([
e
],
σ
1
)
(
t2
,
σ
2
)
→
φ
.
φ
.
Proof
.
Proof
.
...
@@ -202,7 +201,7 @@ Proof.
...
@@ -202,7 +201,7 @@ Proof.
eapply
(
soundness
(
M
:
=
iResUR
Σ
)
_
(
S
(
S
(
S
n
))))
;
iIntros
""
.
eapply
(
soundness
(
M
:
=
iResUR
Σ
)
_
(
S
(
S
(
S
n
))))
;
iIntros
""
.
rewrite
Nat_iter_S
.
iMod
wsat_alloc
as
(
Hinv
)
"[Hw HE]"
.
rewrite
Nat_iter_S
.
iMod
wsat_alloc
as
(
Hinv
)
"[Hw HE]"
.
rewrite
{
1
}
fupd_eq
in
Hwp
;
iMod
(
Hwp
with
"[$Hw $HE]"
)
as
">(Hw & HE & Hwp)"
.
rewrite
{
1
}
fupd_eq
in
Hwp
;
iMod
(
Hwp
with
"[$Hw $HE]"
)
as
">(Hw & HE & Hwp)"
.
iDestruct
"Hwp"
as
(
Istate
)
"(HIstate & H
I & H
wp & Hclose)"
.
iDestruct
"Hwp"
as
(
Istate
)
"(HIstate & Hwp & Hclose)"
.
iModIntro
.
iNext
.
iApply
(@
wptp_invariance
_
_
(
IrisG
_
_
Hinv
Istate
)
I
)
;
eauto
.
iModIntro
.
iNext
.
iApply
(@
wptp_invariance
_
_
(
IrisG
_
_
Hinv
Istate
))
;
eauto
.
iFrame
"H
I H
w HE Hwp HIstate Hclose"
.
by
iApply
big_sepL_nil
.
iFrame
"Hw HE Hwp HIstate Hclose"
.
by
iApply
big_sepL_nil
.
Qed
.
Qed
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment