Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Actris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
tlsomers
Actris
Commits
0cf2bdf7
Commit
0cf2bdf7
authored
4 years ago
by
Jonas Kastberg
Browse files
Options
Downloads
Patches
Plain Diff
Clean-up
parent
4c8002f8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/examples/list_rev.v
+6
-16
6 additions, 16 deletions
theories/examples/list_rev.v
theories/utils/llist.v
+6
-9
6 additions, 9 deletions
theories/utils/llist.v
with
12 additions
and
25 deletions
theories/examples/list_rev.v
+
6
−
16
View file @
0cf2bdf7
...
...
@@ -25,12 +25,8 @@ Section list_rev_example.
{{{
RET
#
();
c
↣
prot
}}}
.
Proof
.
iIntros
(
Φ
)
"Hc HΦ"
.
wp_lam
.
wp_recv
(
l
vs
)
as
"Hl"
.
wp_apply
(
lreverse_spec
with
"Hl"
)
.
iIntros
"Hl"
.
wp_send
with
"[$Hl]"
.
iApply
(
"HΦ"
with
"Hc"
)
.
wp_lam
.
wp_recv
(
l
vs
)
as
"Hl"
.
wp_apply
(
lreverse_spec
with
"Hl"
)
.
iIntros
"Hl"
.
wp_send
with
"[$Hl]"
.
iApply
(
"HΦ"
with
"Hc"
)
.
Qed
.
Lemma
llist_split
{
T
}
(
IT
:
T
→
val
→
iProp
Σ
)
xs
l
:
...
...
@@ -50,8 +46,7 @@ Section list_rev_example.
+
by
iDestruct
(
big_sepL2_nil_inv_l
with
"HIT"
)
as
%->
.
+
iDestruct
(
big_sepL2_cons_inv_l
with
"HIT"
)
as
(
v
vs'
->
)
"[HIT HITs]"
.
iDestruct
"Hvs"
as
(
w
lcons
Heq
)
"[Hl Hvs]"
.
iExists
w
,
lcons
.
iFrame
.
iExists
w
,
lcons
.
iFrame
"Hl"
.
iSplitL
"HIT"
.
{
by
iEval
(
rewrite
-
Heq
)
.
}
iApply
(
"IH"
with
"Hvs HITs"
)
.
...
...
@@ -67,11 +62,8 @@ Section list_rev_example.
iIntros
(
l
xs
)
"Hl"
.
iDestruct
(
llist_split
with
"Hl"
)
as
(
vs
)
"[Hl HI]"
.
iExists
l
,
vs
.
iFrame
"Hl"
.
iModIntro
.
iIntros
"Hl"
.
iSplitL
.
{
rewrite
big_sepL2_reverse_2
.
iApply
llist_split
.
iExists
(
reverse
vs
)
.
iFrame
.
}
iModIntro
.
iIntros
"Hl"
.
iSplitL
.
{
rewrite
big_sepL2_reverse_2
.
iApply
llist_split
.
eauto
with
iFrame
.
}
eauto
.
Qed
.
...
...
@@ -86,9 +78,7 @@ Section list_rev_example.
iApply
(
list_rev_service_spec
with
"Hc"
)
.
eauto
.
-
iDestruct
(
iProto_mapsto_le
_
_
(
list_rev_protI
IT
)
with
"Hc []"
)
as
"Hc"
.
{
iApply
list_rev_subprot
.
}
wp_send
(
l
xs
)
with
"[$Hl]"
.
wp_recv
as
"Hl"
.
by
iApply
"HΦ"
.
wp_send
(
l
xs
)
with
"[$Hl]"
.
wp_recv
as
"Hl"
.
by
iApply
"HΦ"
.
Qed
.
End
list_rev_example
.
This diff is collapsed.
Click to expand it.
theories/utils/llist.v
+
6
−
9
View file @
0cf2bdf7
...
...
@@ -265,15 +265,12 @@ Lemma lreverse_at_spec l xs acc ys :
Proof
.
iIntros
(
Φ
)
"[Hl Hacc] HΦ"
.
iInduction
xs
as
[|
x
xs
]
"IH"
forall
(
l
acc
Φ
ys
)
.
-
wp_lam
.
wp_pures
.
wp_load
.
wp_pures
.
iApply
"HΦ"
.
rewrite
app_nil_l
.
iApply
"Hacc"
.
-
wp_lam
.
wp_pures
.
simpl
.
iDestruct
"Hl"
as
(
v
l'
)
"[HI [Hl Hl']]"
.
wp_load
.
wp_pures
.
wp_apply
(
lcons_spec
with
"[$Hacc $HI]"
)
.
iIntros
"Hacc"
.
wp_pures
.
iApply
(
"IH"
with
"Hl' Hacc"
)
.
iIntros
"!>"
(
l''
)
"Hl''"
.
iApply
"HΦ"
.
rewrite
reverse_cons
-
app_assoc
.
iApply
"Hl''"
.
-
wp_lam
.
wp_load
.
wp_pures
.
iApply
"HΦ"
.
rewrite
app_nil_l
.
iApply
"Hacc"
.
-
wp_lam
.
iDestruct
"Hl"
as
(
v
l'
)
"[HI [Hl Hl']]"
.
wp_load
.
wp_apply
(
lcons_spec
with
"[$Hacc $HI]"
)
.
iIntros
"Hacc"
.
wp_apply
(
"IH"
with
"Hl' Hacc"
)
.
iIntros
(
l''
)
"Hl''"
.
iApply
"HΦ"
.
rewrite
reverse_cons
-
app_assoc
.
iApply
"Hl''"
.
Qed
.
Lemma
lreverse_spec
l
xs
:
...
...
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