Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
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
Package Registry
Model registry
Operate
Terraform modules
Monitor
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
William Mansky
Iris
Commits
cd0ae810
Commit
cd0ae810
authored
8 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Simplify wp_invariance.
parent
fd89aa52
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
program_logic/adequacy.v
+9
-10
9 additions, 10 deletions
program_logic/adequacy.v
with
9 additions
and
10 deletions
program_logic/adequacy.v
+
9
−
10
View file @
cd0ae810
...
...
@@ -151,17 +151,17 @@ Proof.
iApply
wp_safe
.
iFrame
"Hw"
.
by
iApply
(
big_sepL_elem_of
with
"Htp"
)
.
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
)
→
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
)
⌜
φ
⌝.
Proof
.
intros
?
.
rewrite
wptp_steps
//.
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
.
rewrite
fupd_eq
.
iMod
(
"Hback"
with
"Hσ
HI
[$Hw $HE]"
)
as
"> (_ & _ & $)"
;
auto
.
iMod
(
"Hback"
with
"Hσ [$Hw $HE]"
)
as
"> (_ & _ & $)"
;
auto
.
Qed
.
End
adequacy
.
...
...
@@ -189,12 +189,11 @@ Proof.
iFrame
.
by
iApply
big_sepL_nil
.
Qed
.
Theorem
wp_invariance
{
Λ
}
`{
invPreG
Σ
}
e
σ1
t2
σ2
I
φ
Φ
:
Theorem
wp_invariance
{
Λ
}
`{
invPreG
Σ
}
e
σ1
t2
σ2
φ
Φ
:
(
∀
`{
Hinv
:
invG
Σ
},
True
=
{
⊤
}
=∗
∃
stateI
:
state
Λ
→
iProp
Σ
,
let
_
:
irisG
Λ
Σ
:=
IrisG
_
_
Hinv
stateI
in
stateI
σ1
∗
I
∗
WP
e
{{
Φ
}}
∗
(
stateI
σ2
-∗
I
=
{
⊤
,
∅
}
=∗
⌜
φ
⌝
))
→
stateI
σ1
∗
WP
e
{{
Φ
}}
∗
(
stateI
σ2
=
{
⊤
,
∅
}
=∗
⌜
φ
⌝
))
→
rtc
step
([
e
],
σ1
)
(
t2
,
σ2
)
→
φ
.
Proof
.
...
...
@@ -202,7 +201,7 @@ Proof.
eapply
(
soundness
(
M
:=
iResUR
Σ
)
_
(
S
(
S
(
S
n
))));
iIntros
""
.
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)"
.
iDestruct
"Hwp"
as
(
Istate
)
"(HIstate &
HI &
Hwp & Hclose)"
.
iModIntro
.
iNext
.
iApply
(
@
wptp_invariance
_
_
(
IrisG
_
_
Hinv
Istate
)
I
);
eauto
.
iFrame
"
HI
Hw HE Hwp HIstate Hclose"
.
by
iApply
big_sepL_nil
.
iDestruct
"Hwp"
as
(
Istate
)
"(HIstate & Hwp & Hclose)"
.
iModIntro
.
iNext
.
iApply
(
@
wptp_invariance
_
_
(
IrisG
_
_
Hinv
Istate
));
eauto
.
iFrame
"Hw HE Hwp HIstate Hclose"
.
by
iApply
big_sepL_nil
.
Qed
.
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