Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
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
Model registry
Operate
Environments
Monitor
Service Desk
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
Iris
lambda-rust
Commits
4ef23f59
There was a problem fetching the pipeline mini graph.
Commit
4ef23f59
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
also show wp_app for lists
parent
889ac80b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/lang/derived.v
+14
-1
14 additions, 1 deletion
theories/lang/derived.v
theories/typing/function.v
+1
-1
1 addition, 1 deletion
theories/typing/function.v
with
15 additions
and
2 deletions
theories/lang/derived.v
+
14
−
1
View file @
4ef23f59
...
...
@@ -44,7 +44,7 @@ Proof.
rewrite
big_sepL_cons
.
iFrame
.
Qed
.
Lemma
wp_app
{
n
}
(
Q
:
nat
→
val
→
iProp
Σ
)
E
f
(
el
:
vec
expr
n
)
Φ
:
Lemma
wp_app
_vec
{
n
}
(
Q
:
nat
→
val
→
iProp
Σ
)
E
f
(
el
:
vec
expr
n
)
Φ
:
is_Some
(
to_val
f
)
→
([
∗
list
]
k
↦
e
∈
el
,
WP
e
@
E
{{
Q
k
}})
-∗
(
∀
vl
:
vec
val
n
,
([
∗
list
]
k
↦
v
∈
vl
,
Q
k
v
)
-∗
...
...
@@ -54,6 +54,19 @@ Proof.
iIntros
(
Hf
)
.
iApply
(
wp_app_ind
_
_
_
_
[])
.
done
.
Qed
.
Lemma
wp_app
(
Q
:
nat
→
val
→
iProp
Σ
)
E
f
el
Φ
:
is_Some
(
to_val
f
)
→
([
∗
list
]
k
↦
e
∈
el
,
WP
e
@
E
{{
Q
k
}})
-∗
(
∀
vl
:
list
val
,
⌜
length
vl
=
length
el
⌝
-∗
([
∗
list
]
k
↦
v
∈
vl
,
Q
k
v
)
-∗
WP
App
f
(
of_val
<$>
(
vl
:
list
val
))
@
E
{{
Φ
}})
-∗
WP
App
f
el
@
E
{{
Φ
}}
.
Proof
.
iIntros
(
Hf
)
"Hel HΦ"
.
rewrite
-
(
vec_to_list_of_list
el
)
.
iApply
(
wp_app_vec
with
"* Hel"
);
first
done
.
iIntros
(
vl
)
.
iApply
(
"HΦ"
$!
(
vec_to_list
vl
))
.
rewrite
vec_to_list_length
vec_to_list_of_list
.
done
.
Qed
.
(** Proof rules for the sugar *)
Lemma
wp_lam
E
xl
e
e'
el
Φ
:
Forall
(
λ
ei
,
is_Some
(
to_val
ei
))
el
→
...
...
This diff is collapsed.
Click to expand it.
theories/typing/function.v
+
1
−
1
View file @
4ef23f59
...
...
@@ -102,7 +102,7 @@ Section fn.
wp_bind
p
.
iApply
(
wp_hasty
with
"Hf"
)
.
iIntros
(
v
)
"[% Hf]"
.
iMod
(
HTsat
with
"LFT HE HL HT"
)
as
"(HE & HL & HT)"
.
rewrite
tctx_interp_app
.
iDestruct
"HT"
as
"[Hargs HT']"
.
clear
HTsat
.
rewrite
-
vec_to_list_cons
.
iApply
(
wp_app
(
λ
i
v
,
match
i
with
O
=>
⌜
v
=
k
⌝
∗
_
|
S
i
=>
iApply
(
wp_app
_vec
(
λ
i
v
,
match
i
with
O
=>
⌜
v
=
k
⌝
∗
_
|
S
i
=>
∀
ty
,
⌜
(
tys
x
:
list
type
)
!!
i
=
Some
ty
⌝
→
tctx_elt_interp
tid
(
TCtx_hasty
v
ty
)
end
)
%
I
with
"* [Hargs HC]"
);
first
wp_done
.
...
...
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