Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
Iris
Commits
e3cdf16b
Commit
e3cdf16b
authored
Jun 06, 2019
by
Ralf Jung
Browse files
all-value adequacy: fix the list of observations in advance
parent
9fc80517
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/program_logic/adequacy.v
View file @
e3cdf16b
...
@@ -212,8 +212,11 @@ Proof.
...
@@ -212,8 +212,11 @@ Proof.
iIntros
"_"
.
by
iApply
fupd_mask_weaken
.
iIntros
"_"
.
by
iApply
fupd_mask_weaken
.
Qed
.
Qed
.
Theorem
wp_strong_all_adequacy
Σ
Λ
`
{!
invPreG
Σ
}
s
e
σ
1
v
vs
σ
2
φ
:
(* Special adequacy for when *all threads* evaluate to a value. Here we let the
(
∀
`
{
Hinv
:
!
invG
Σ
}
κ
s
,
user pick the one list of observations for which the proof needs to apply. If
you just got an [rtc erased_step], use [erased_steps_nsteps]. *)
Theorem
wp_strong_all_adequacy
Σ
Λ
`
{!
invPreG
Σ
}
s
e
σ
1
n
κ
s
v
vs
σ
2
φ
:
(
∀
`
{
Hinv
:
!
invG
Σ
},
(|={
⊤
}=>
∃
(|={
⊤
}=>
∃
(
stateI
:
state
Λ
→
list
(
observation
Λ
)
→
nat
→
iProp
Σ
)
(
stateI
:
state
Λ
→
list
(
observation
Λ
)
→
nat
→
iProp
Σ
)
(
fork_post
:
val
Λ
→
iProp
Σ
),
(
fork_post
:
val
Λ
→
iProp
Σ
),
...
@@ -221,10 +224,10 @@ Theorem wp_strong_all_adequacy Σ Λ `{!invPreG Σ} s e σ1 v vs σ2 φ :
...
@@ -221,10 +224,10 @@ Theorem wp_strong_all_adequacy Σ Λ `{!invPreG Σ} s e σ1 v vs σ2 φ :
stateI
σ
1
κ
s
0
∗
WP
e
@
s
;
⊤
{{
v
,
stateI
σ
1
κ
s
0
∗
WP
e
@
s
;
⊤
{{
v
,
stateI
σ
2
[]
(
length
vs
)
-
∗
stateI
σ
2
[]
(
length
vs
)
-
∗
([
∗
list
]
v
∈
vs
,
fork_post
v
)
={
⊤
,
∅
}=
∗
⌜
φ
v
⌝
}})%
I
)
→
([
∗
list
]
v
∈
vs
,
fork_post
v
)
={
⊤
,
∅
}=
∗
⌜
φ
v
⌝
}})%
I
)
→
rtc
erased_
step
([
e
],
σ
1
)
(
of_val
<$>
v
::
vs
,
σ
2
)
→
n
step
s
n
([
e
],
σ
1
)
κ
s
(
of_val
<$>
v
::
vs
,
σ
2
)
→
φ
v
.
φ
v
.
Proof
.
Proof
.
intros
Hwp
[
n
[
κ
s
?]]%
erased_steps_nsteps
.
intros
Hwp
?
.
eapply
(
step_fupdN_soundness'
_
(
S
(
S
n
)))=>
Hinv
.
rewrite
Nat_iter_S
.
eapply
(
step_fupdN_soundness'
_
(
S
(
S
n
)))=>
Hinv
.
rewrite
Nat_iter_S
.
iMod
Hwp
as
(
stateI
fork_post
)
"[Hσ Hwp]"
.
iMod
Hwp
as
(
stateI
fork_post
)
"[Hσ Hwp]"
.
iApply
step_fupd_intro
;
first
done
.
iModIntro
.
iApply
step_fupd_intro
;
first
done
.
iModIntro
.
...
...
Write
Preview
Supports
Markdown
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