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
FP
semantics-course
Commits
9367ffd0
Commit
9367ffd0
authored
Jan 14, 2022
by
Lennard Gäher
Browse files
upd template
parent
ffda248f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
_CoqProject
View file @
9367ffd0
...
...
@@ -100,6 +100,9 @@ theories/axiomatic/hoare_lib.v
theories/axiomatic/hoare.v
theories/axiomatic/ipm.v
theories/axiomatic/later_löb.v
theories/axiomatic/ipm_sol.v
theories/axiomatic/hoare_sol.v
...
...
theories/axiomatic/hoare_lib.v
View file @
9367ffd0
...
...
@@ -679,13 +679,13 @@ Module hoare.
Qed
.
Lemma
ent_later_wp_load
l
v
Φ
:
▷
l
↦
v
∗
▷
(
l
↦
v
-
∗
Φ
v
)
⊢
WP
!
#
l
{{
Φ
}}.
l
↦
v
∗
▷
(
l
↦
v
-
∗
Φ
v
)
⊢
WP
!
#
l
{{
Φ
}}.
Proof
.
iIntros
"[Hl Hp]"
.
wp_load
.
iApply
wp_value
.
by
iApply
"Hp"
.
Qed
.
Lemma
ent_later_wp_store
l
v
w
Φ
:
▷
l
↦
v
∗
▷
(
l
↦
w
-
∗
Φ
#())
⊢
WP
#
l
<-
w
{{
Φ
}}.
l
↦
v
∗
▷
(
l
↦
w
-
∗
Φ
#())
⊢
WP
#
l
<-
w
{{
Φ
}}.
Proof
.
iIntros
"[Hl Hp]"
.
wp_store
.
iApply
wp_value
.
by
iApply
"Hp"
.
Qed
.
...
...
theories/axiomatic/hoare_sol.v
View file @
9367ffd0
From
iris
.
prelude
Require
Import
options
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
heap_lang
Require
Import
lang
notation
.
From
semantics
.
axiomatic
_semantics
Require
Export
hoare_lib
.
From
semantics
.
axiomatic
Require
Export
hoare_lib
.
Import
hoare
.
Implicit
Types
...
...
theories/axiomatic/ipm_sol.v
0 → 100644
View file @
9367ffd0
This diff is collapsed.
Click to expand it.
theories/axiomatic/later_löb.v
View file @
9367ffd0
...
...
@@ -104,7 +104,7 @@ Proof.
Restart
.
iIntros
"($ & $)"
.
Abort
.
Qed
.
Lemma
ipm_later_exists_commuting
(
Φ
:
nat
→
iProp
)
:
▷
(
∃
n
:
nat
,
Φ
n
)
-
∗
∃
n
:
nat
,
▷
Φ
n
.
...
...
@@ -112,8 +112,8 @@ Proof.
(* automatically commutes the later around the existential *)
(* note: in general, this relies on the type that is existentially quantified over
to be [Inhabited]. The IPM tactics will fail if an instance for that cannot be found. *)
iIntros
"(%n & Hn)"
.
Abort
.
iIntros
"(%n & Hn)"
.
eauto
with
iFrame
.
Qed
.
Lemma
ipm_later_or_commuting
P
Q
:
▷
(
P
∨
Q
)
-
∗
▷
P
∨
▷
Q
.
...
...
@@ -123,7 +123,7 @@ Proof.
Restart
.
iIntros
"[ $ | $ ]"
.
Abort
.
Qed
.
Lemma
ipm_later_next_1
P
Q
R
`
{!
Persistent
P
}
:
▷
P
-
∗
▷
R
-
∗
▷
Q
.
...
...
@@ -138,11 +138,8 @@ Lemma ent_wp_rec v Φ (Ψ : val → val → iProp) e :
(
∀
v
,
(
Φ
v
∗
(
∀
u
,
{{
Φ
u
}}
(
rec
:
"f"
"x"
:
=
e
)
u
{{
Ψ
u
}})
⊢
WP
subst
"x"
v
(
subst
"f"
(
rec
:
"f"
"x"
:
=
e
)
e
)
{{
Ψ
v
}}))
→
(
Φ
v
⊢
WP
(
rec
:
"f"
"x"
:
=
e
)
v
{{
Ψ
v
}}).
Proof
.
iIntros
(
Hs
).
iL
ö
b
as
"IH"
forall
(
v
).
iIntros
"Hv"
.
wp_pures
.
iApply
Hs
.
iFrame
"Hv"
.
iIntros
(
v'
)
"!> Hv'"
.
by
iApply
"IH"
.
iIntros
(
Hs
).
iL
ö
b
as
"IH"
forall
(
v
).
iIntros
"Hv"
.
wp_pures
.
iApply
Hs
.
iFrame
"Hv"
.
eauto
.
Qed
.
Section
Z
.
...
...
@@ -199,7 +196,7 @@ Lemma infinite_exec_Omega :
⊢
infinite_exec
Omega
.
Proof
.
iL
ö
b
as
"IH"
.
rewrite
{
2
}
infinite_exec_unfold
/
infinite_exec_pre
/=.
rewrite
{
2
}
infinite_exec_unfold
/
infinite_exec_pre
/=.
iExists
Omega
.
iSplitR
;
last
done
.
iPureIntro
.
apply
pure_step_beta
.
Qed
.
...
...
@@ -245,7 +242,7 @@ Proof.
(* FIXME: exercise *)
Admitted
.
(** * Impredicate invariants *)
(** * Impredicat
iv
e invariants *)
Import
impred_invariants
.
(* [ent_inv_pers] and [ent_inv_alloc] hold unchanged *)
(* The opening rules that support impredicative invariants put a later ▷ around the contents [F]. *)
...
...
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