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
71be71b2
Commit
71be71b2
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add wp proof rule for recursive functions
parent
64bed0ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/heap_lang/lifting.v
+15
-1
15 additions, 1 deletion
theories/heap_lang/lifting.v
with
15 additions
and
1 deletion
theories/heap_lang/lifting.v
+
15
−
1
View file @
71be71b2
...
...
@@ -213,12 +213,26 @@ Proof. solve_pure_exec. Qed.
Section
lifting
.
Context
`{
!
heapG
Σ
}
.
Implicit
Types
P
Q
:
iProp
Σ
.
Implicit
Types
Φ
:
val
→
iProp
Σ
.
Implicit
Types
Φ
Ψ
:
val
→
iProp
Σ
.
Implicit
Types
efs
:
list
expr
.
Implicit
Types
σ
:
state
.
Implicit
Types
v
:
val
.
Implicit
Types
l
:
loc
.
(** Recursive functions: we do not use this lemmas as it is easier to use Löb
induction directly, but this demonstrates that we can state the expected
reasoning principle for recursive functions, without any visible ▷. *)
Lemma
wp_rec_löb
s
E
f
x
e
Φ
Ψ
:
□
((
∀
v
,
Ψ
v
-∗
WP
(
rec
:
f
x
:=
e
)
%
V
v
@
s
;
E
{{
Φ
}})
-∗
∀
v
,
Ψ
v
-∗
WP
(
subst'
x
v
(
subst'
f
(
rec
:
f
x
:=
e
)
e
))
@
s
;
E
{{
Φ
}})
-∗
∀
v
,
Ψ
v
-∗
WP
(
rec
:
f
x
:=
e
)
%
V
v
@
s
;
E
{{
Φ
}}
.
Proof
.
iIntros
"#Hrec"
.
iLöb
as
"IH"
.
iIntros
(
v
)
"HΨ"
.
iApply
lifting
.
wp_pure_step_later
;
first
done
.
iNext
.
iApply
(
"Hrec"
with
"[] HΨ"
)
.
iIntros
(
w
)
"HΨ"
.
iApply
(
"IH"
with
"HΨ"
)
.
Qed
.
(** Fork: Not using Texan triples to avoid some unnecessary [True] *)
Lemma
wp_fork
s
E
e
Φ
:
▷
WP
e
@
s
;
⊤
{{
_,
True
}}
-∗
▷
Φ
(
LitV
LitUnit
)
-∗
WP
Fork
e
@
s
;
E
{{
Φ
}}
.
...
...
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