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
Jonas Kastberg
iris
Commits
59ebd81e
Commit
59ebd81e
authored
Jun 13, 2018
by
Jacques-Henri Jourdan
Browse files
Mask-changing updates that take a step.
parent
2d0e1f3e
Changes
5
Hide whitespace changes
Inline
Side-by-side
theories/bi/notation.v
View file @
59ebd81e
...
...
@@ -69,6 +69,12 @@ Reserved Notation "P ={ E }=∗ Q"
(
at
level
99
,
E
at
level
50
,
Q
at
level
200
,
format
"'[' P '/' ={ E }=∗ Q ']'"
).
Reserved
Notation
"|={ E1 , E2 , E3 }▷=> Q"
(
at
level
99
,
E1
,
E2
at
level
50
,
Q
at
level
200
,
format
"|={ E1 , E2 , E3 }▷=> Q"
).
Reserved
Notation
"P ={ E1 , E2 , E3 }▷=∗ Q"
(
at
level
99
,
E1
,
E2
at
level
50
,
Q
at
level
200
,
format
"'[' P '/' ={ E1 , E2 , E3 }▷=∗ Q ']'"
).
Reserved
Notation
"|={ E1 , E2 }▷=> Q"
(
at
level
99
,
E1
,
E2
at
level
50
,
Q
at
level
200
,
format
"|={ E1 , E2 }▷=> Q"
).
...
...
theories/bi/updates.v
View file @
59ebd81e
...
...
@@ -25,11 +25,15 @@ Notation "P ={ E }=∗ Q" := (P -∗ |={E}=> Q)%I : bi_scope.
Notation
"P ={ E }=∗ Q"
:
=
(
P
-
∗
|={
E
}=>
Q
)
:
stdpp_scope
.
(** Fancy updates that take a step. *)
Notation
"|={ E1 , E2 }▷=> Q"
:
=
(|={
E1
,
E2
}=>
(
▷
|={
E2
,
E1
}=>
Q
))%
I
:
bi_scope
.
Notation
"P ={ E1 , E2 }▷=∗ Q"
:
=
(
P
-
∗
|={
E1
,
E2
}
▷
=>
Q
)%
I
:
bi_scope
.
Notation
"|={ E1 , E2 , E3 }▷=> Q"
:
=
(|={
E1
,
E2
}=>
(
▷
|={
E2
,
E3
}=>
Q
))%
I
:
bi_scope
.
Notation
"P ={ E1 , E2 , E3 }▷=∗ Q"
:
=
(
P
-
∗
|={
E1
,
E2
,
E3
}
▷
=>
Q
)%
I
:
bi_scope
.
Notation
"|={ E1 , E2 }▷=> Q"
:
=
(|={
E1
,
E2
,
E1
}
▷
=>
Q
)%
I
:
bi_scope
.
Notation
"P ={ E1 , E2 }▷=∗ Q"
:
=
(
P
-
∗
|={
E1
,
E2
,
E1
}
▷
=>
Q
)%
I
:
bi_scope
.
Notation
"|={ E }▷=> Q"
:
=
(|={
E
,
E
}
▷
=>
Q
)%
I
:
bi_scope
.
Notation
"P ={ E }▷=∗ Q"
:
=
(
P
={
E
,
E
}
▷
=
∗
Q
)%
I
:
bi_scope
.
(** Bundled versions *)
(* Mixins allow us to create instances easily without having to use Program *)
Record
BiBUpdMixin
(
PROP
:
bi
)
`
(
BUpd
PROP
)
:
=
{
...
...
@@ -277,15 +281,15 @@ Section fupd_derived.
Qed
.
(** Fancy updates that take a step derived rules. *)
Lemma
step_fupd_wand
E1
E2
P
Q
:
(|={
E1
,
E2
}
▷
=>
P
)
-
∗
(
P
-
∗
Q
)
-
∗
|={
E1
,
E2
}
▷
=>
Q
.
Lemma
step_fupd_wand
E1
E2
E3
P
Q
:
(|={
E1
,
E2
,
E3
}
▷
=>
P
)
-
∗
(
P
-
∗
Q
)
-
∗
|={
E1
,
E2
,
E3
}
▷
=>
Q
.
Proof
.
apply
wand_intro_l
.
by
rewrite
(
later_intro
(
P
-
∗
Q
)%
I
)
fupd_frame_l
-
later_sep
fupd_frame_l
wand_elim_l
.
Qed
.
Lemma
step_fupd_mask_frame_r
E1
E2
Ef
P
:
E1
##
Ef
→
E2
##
Ef
→
(|={
E1
,
E2
}
▷
=>
P
)
⊢
|={
E1
∪
Ef
,
E2
∪
Ef
}
▷
=>
P
.
Lemma
step_fupd_mask_frame_r
E1
E2
E3
Ef
P
:
E1
##
Ef
→
E2
##
Ef
→
(|={
E1
,
E2
,
E3
}
▷
=>
P
)
⊢
|={
E1
∪
Ef
,
E2
∪
Ef
,
E3
∪
Ef
}
▷
=>
P
.
Proof
.
intros
.
rewrite
-
fupd_mask_frame_r
//.
do
2
f_equiv
.
by
apply
fupd_mask_frame_r
.
Qed
.
...
...
theories/program_logic/ectx_lifting.v
View file @
59ebd81e
...
...
@@ -18,7 +18,7 @@ Lemma wp_lift_head_step_fupd {s E Φ} e1 :
to_val
e1
=
None
→
(
∀
σ
1
,
state_interp
σ
1
={
E
,
∅
}=
∗
⌜
head_reducible
e1
σ
1
⌝
∗
∀
e2
σ
2
efs
,
⌜
head_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
}=
∗
▷
|={
∅
,
E
}
=>
∀
e2
σ
2
efs
,
⌜
head_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
,
∅
,
E
}
▷
=
∗
state_interp
σ
2
∗
WP
e2
@
s
;
E
{{
Φ
}}
∗
[
∗
list
]
ef
∈
efs
,
WP
ef
@
s
;
⊤
{{
_
,
True
}})
⊢
WP
e1
@
s
;
E
{{
Φ
}}.
Proof
.
...
...
theories/program_logic/lifting.v
View file @
59ebd81e
...
...
@@ -15,7 +15,7 @@ Lemma wp_lift_step_fupd s E Φ e1 :
to_val
e1
=
None
→
(
∀
σ
1
,
state_interp
σ
1
={
E
,
∅
}=
∗
⌜
if
s
is
NotStuck
then
reducible
e1
σ
1
else
True
⌝
∗
∀
e2
σ
2
efs
,
⌜
prim_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
}=
∗
▷
|={
∅
,
E
}
=>
∀
e2
σ
2
efs
,
⌜
prim_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
,
∅
,
E
}
▷
=
∗
state_interp
σ
2
∗
WP
e2
@
s
;
E
{{
Φ
}}
∗
[
∗
list
]
ef
∈
efs
,
WP
ef
@
s
;
⊤
{{
_
,
True
}})
⊢
WP
e1
@
s
;
E
{{
Φ
}}.
Proof
.
...
...
theories/program_logic/weakestpre.v
View file @
59ebd81e
...
...
@@ -32,7 +32,7 @@ Definition wp_pre `{irisG Λ Σ} (s : stuckness)
|
Some
v
=>
|={
E
}=>
Φ
v
|
None
=>
∀
σ
1
,
state_interp
σ
1
={
E
,
∅
}=
∗
⌜
if
s
is
NotStuck
then
reducible
e1
σ
1
else
True
⌝
∗
∀
e2
σ
2
efs
,
⌜
prim_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
}=
∗
▷
|={
∅
,
E
}
=>
∀
e2
σ
2
efs
,
⌜
prim_step
e1
σ
1 e2
σ
2
efs
⌝
={
∅
,
∅
,
E
}
▷
=
∗
state_interp
σ
2
∗
wp
E
e2
Φ
∗
[
∗
list
]
ef
∈
efs
,
wp
⊤
ef
(
λ
_
,
True
)
end
%
I
.
...
...
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