Skip to content
GitLab
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
9331a371
Commit
9331a371
authored
Jan 19, 2016
by
Robbert Krebbers
Browse files
Introduce notion of reducible, as in the appendix.
parent
ae972c48
Changes
4
Hide whitespace changes
Inline
Side-by-side
iris/hoare_lifting.v
View file @
9331a371
...
...
@@ -15,7 +15,7 @@ Import uPred.
Lemma
ht_lift_step
E1
E2
(
φ
:
iexpr
Σ
→
istate
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
P
P'
Q1
Q2
R
e1
σ
1
:
E1
⊆
E2
→
to_val
e1
=
None
→
(
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
)
→
reducible
e1
σ
1
→
(
∀
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
→
φ
e2
σ
2
ef
)
→
(
P
>{
E2
,
E1
}>
(
ownP
σ
1
★
▷
P'
)
∧
∀
e2
σ
2
ef
,
(
■
φ
e2
σ
2
ef
★
ownP
σ
2
★
P'
)
>{
E1
,
E2
}>
(
Q1
e2
σ
2
ef
★
Q2
e2
σ
2
ef
)
∧
...
...
@@ -45,7 +45,7 @@ Qed.
Lemma
ht_lift_atomic
E
(
φ
:
iexpr
Σ
→
istate
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
P
e1
σ
1
:
atomic
e1
→
(
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
)
→
reducible
e1
σ
1
→
(
∀
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
→
φ
e2
σ
2
ef
)
→
(
∀
e2
σ
2
ef
,
{{
■
φ
e2
σ
2
ef
★
P
}}
ef
?@
coPset_all
{{
λ
_
,
True
}})
⊑
{{
ownP
σ
1
★
▷
P
}}
e1
@
E
{{
λ
v
,
∃
σ
2
ef
,
ownP
σ
2
★
■
φ
(
of_val
v
)
σ
2
ef
}}.
...
...
@@ -71,7 +71,7 @@ Proof.
Qed
.
Lemma
ht_lift_pure_step
E
(
φ
:
iexpr
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
P
P'
Q
e1
:
to_val
e1
=
None
→
(
∀
σ
1
,
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
)
→
(
∀
σ
1
,
reducible
e1
σ
1
)
→
(
∀
σ
1 e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
→
σ
1
=
σ
2
∧
φ
e2
ef
)
→
(
∀
e2
ef
,
{{
■
φ
e2
ef
★
P
}}
e2
@
E
{{
Q
}}
∧
...
...
@@ -97,7 +97,7 @@ Qed.
Lemma
ht_lift_pure_determistic_step
E
(
φ
:
iexpr
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
P
P'
Q
e1
e2
ef
:
to_val
e1
=
None
→
(
∀
σ
1
,
prim_step
e1
σ
1 e2
σ
1
ef
)
→
(
∀
σ
1
,
reducible
e1
σ
1
)
→
(
∀
σ
1 e2
'
σ
2
ef'
,
prim_step
e1
σ
1 e2
'
σ
2
ef'
→
σ
1
=
σ
2
∧
e2
=
e2'
∧
ef
=
ef'
)
→
({{
P
}}
e2
@
E
{{
Q
}}
∧
{{
P'
}}
ef
?@
coPset_all
{{
λ
_
,
True
}})
⊑
{{
▷
(
P
★
P'
)
}}
e1
@
E
{{
Q
}}.
...
...
iris/language.v
View file @
9331a371
...
...
@@ -18,6 +18,11 @@ Class Language (E V St : Type) := {
Section
language
.
Context
`
{
Language
E
V
St
}.
Definition
reducible
(
e
:
E
)
(
σ
:
St
)
:
=
∃
e'
σ
'
ef
,
prim_step
e
σ
e'
σ
'
ef
.
Lemma
reducible_not_val
e
σ
:
reducible
e
σ
→
to_val
e
=
None
.
Proof
.
intros
(?&?&?&?)
;
eauto
using
values_stuck
.
Qed
.
Lemma
atomic_of_val
v
:
¬
atomic
(
of_val
v
).
Proof
.
by
intros
Hat
;
apply
atomic_not_value
in
Hat
;
rewrite
to_of_val
in
Hat
.
...
...
iris/lifting.v
View file @
9331a371
...
...
@@ -16,7 +16,7 @@ Transparent uPred_holds.
Lemma
wp_lift_step
E1
E2
(
φ
:
iexpr
Σ
→
istate
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
Q
e1
σ
1
:
E1
⊆
E2
→
to_val
e1
=
None
→
(
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
)
→
reducible
e1
σ
1
→
(
∀
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
→
φ
e2
σ
2
ef
)
→
pvs
E2
E1
(
ownP
σ
1
★
▷
∀
e2
σ
2
ef
,
(
■
φ
e2
σ
2
ef
∧
ownP
σ
2
)
-
★
pvs
E1
E2
(
wp
E2
e2
Q
★
default
True
ef
(
flip
(
wp
coPset_all
)
(
λ
_
,
True
))))
...
...
@@ -37,7 +37,7 @@ Proof.
Qed
.
Lemma
wp_lift_pure_step
E
(
φ
:
iexpr
Σ
→
option
(
iexpr
Σ
)
→
Prop
)
Q
e1
:
to_val
e1
=
None
→
(
∀
σ
1
,
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
)
→
(
∀
σ
1
,
reducible
e1
σ
1
)
→
(
∀
σ
1 e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
→
σ
1
=
σ
2
∧
φ
e2
ef
)
→
(
▷
∀
e2
ef
,
■
φ
e2
ef
→
wp
E
e2
Q
★
default
True
ef
(
flip
(
wp
coPset_all
)
(
λ
_
,
True
)))
...
...
iris/weakestpre.v
View file @
9331a371
...
...
@@ -9,7 +9,7 @@ Local Hint Extern 10 (✓{_} _) =>
Record
wp_go
{
Σ
}
(
E
:
coPset
)
(
Q
Qfork
:
iexpr
Σ
→
nat
→
res'
Σ
→
Prop
)
(
k
:
nat
)
(
rf
:
res'
Σ
)
(
e1
:
iexpr
Σ
)
(
σ
1
:
istate
Σ
)
:
=
{
wf_safe
:
∃
e2
σ
2
ef
,
prim_step
e1
σ
1 e2
σ
2
ef
;
wf_safe
:
reducible
e1
σ
1
;
wp_step
e2
σ
2
ef
:
prim_step
e1
σ
1 e2
σ
2
ef
→
∃
r2
r2'
,
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment