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
b3de22f7
Commit
b3de22f7
authored
3 years ago
by
Yusuke Matsushita
Browse files
Options
Downloads
Patches
Plain Diff
Minor fix
parent
aa76daa6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/lib/smallvec/smallvec_basic.v
+3
-4
3 additions, 4 deletions
theories/typing/lib/smallvec/smallvec_basic.v
theories/typing/lib/vec/vec_basic.v
+5
-6
5 additions, 6 deletions
theories/typing/lib/vec/vec_basic.v
with
8 additions
and
10 deletions
theories/typing/lib/smallvec/smallvec_basic.v
+
3
−
4
View file @
b3de22f7
...
@@ -109,9 +109,8 @@ Section smallvec_basic.
...
@@ -109,9 +109,8 @@ Section smallvec_basic.
typed_val
(
smallvec_new
n
ty
)
(
fn
(
∅
)
→
smallvec
n
ty
)
(
λ
post
_,
post
[])
.
typed_val
(
smallvec_new
n
ty
)
(
fn
(
∅
)
→
smallvec
n
ty
)
(
λ
post
_,
post
[])
.
Proof
.
Proof
.
eapply
type_fn
;
[
apply
_|]=>
_
???
.
simpl_subst
.
eapply
type_fn
;
[
apply
_|]=>
_
???
.
simpl_subst
.
iIntros
(???)
"_ #TIME _ _ _ Na L C _ Obs"
.
iIntros
(???)
"_ #TIME _ _ _ Na L C _ Obs"
.
iMod
persistent_time_receipt_0
as
"⧖"
.
iMod
persistent_time_receipt_0
as
"⧖"
.
wp_bind
(
new
_)
.
wp_bind
(
new
_)
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
iApply
wp_new
;
[
done
..|]
.
iIntros
"!>"
(
r
)
.
iApply
wp_new
;
[
done
..|]
.
iIntros
"!>"
(
r
)
.
rewrite
!
Nat2Z
.
id
/=
!
heap_mapsto_vec_cons
!
shift_loc_assoc
.
rewrite
!
Nat2Z
.
id
/=
!
heap_mapsto_vec_cons
!
shift_loc_assoc
.
iIntros
"[† (↦₀ & ↦₁ & ↦₂ & ↦₃ & ↦ex)] ⧖"
.
wp_seq
.
wp_write
.
iIntros
"[† (↦₀ & ↦₁ & ↦₂ & ↦₃ & ↦ex)] ⧖"
.
wp_seq
.
wp_write
.
...
@@ -120,7 +119,7 @@ Section smallvec_basic.
...
@@ -120,7 +119,7 @@ Section smallvec_basic.
iExists
_,
_
.
do
2
(
iSplit
;
[
done
|])
.
rewrite
/=
freeable_sz_full
.
iExists
_,
_
.
do
2
(
iSplit
;
[
done
|])
.
rewrite
/=
freeable_sz_full
.
iFrame
"†"
.
iNext
.
rewrite
split_mt_smallvec
.
iExists
true
,
_,
0
,
0
,
[
#
]
.
iFrame
"†"
.
iNext
.
rewrite
split_mt_smallvec
.
iExists
true
,
_,
0
,
0
,
[
#
]
.
rewrite
/=
!
heap_mapsto_vec_cons
!
shift_loc_assoc
heap_mapsto_vec_nil
.
rewrite
/=
!
heap_mapsto_vec_cons
!
shift_loc_assoc
heap_mapsto_vec_nil
.
iFrame
"↦₀ ↦₁ ↦₂ ↦₃"
.
do
2
(
iSplit
;
[
done
|])
.
iExists
_
.
iFrame
.
iFrame
"↦₀ ↦₁ ↦₂ ↦₃"
.
do
2
(
iSplit
;
[
done
|])
.
iExists
_
.
iFrame
"↦ex"
.
by
rewrite
repeat_length
.
by
rewrite
repeat_length
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/vec/vec_basic.v
+
5
−
6
View file @
b3de22f7
...
@@ -87,11 +87,10 @@ Section vec_basic.
...
@@ -87,11 +87,10 @@ Section vec_basic.
typed_val
vec_new
(
fn
(
∅
)
→
vec_ty
ty
)
(
λ
post
_,
post
[])
.
typed_val
vec_new
(
fn
(
∅
)
→
vec_ty
ty
)
(
λ
post
_,
post
[])
.
Proof
.
Proof
.
eapply
type_fn
;
[
apply
_|]=>
_
???
.
simpl_subst
.
eapply
type_fn
;
[
apply
_|]=>
_
???
.
simpl_subst
.
iIntros
(???)
"_ #TIME _ _ _ Na L C _ Obs"
.
iIntros
(???)
"_ #TIME _ _ _ Na L C _ Obs"
.
wp_apply
wp_new
;
[
done
..|]
.
wp_apply
wp_new
;
[
done
..|]
.
iIntros
(
r
)
.
iIntros
(
r
)
.
rewrite
!
heap_mapsto_vec_cons
shift_loc_assoc
.
rewrite
!
heap_mapsto_vec_cons
shift_loc_assoc
.
iIntros
"[† (↦₀ & ↦₁ & ↦₂ &_)]"
.
iIntros
"[† (↦₀ & ↦₁ & ↦₂ &_)]"
.
wp_seq
.
iMod
persistent_time_receipt_0
as
"⧖"
.
wp_seq
.
iMod
persistent_time_receipt_0
as
"⧖"
.
wp_bind
(
new
_)
.
wp_bind
(
new
_)
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
iApply
wp_new
;
[
done
..|]
.
iIntros
"!>"
(
l
)
"[†' _] ⧖"
.
wp_bind
(_
<-
_)
%
E
.
iApply
wp_new
;
[
done
..|]
.
iIntros
"!>"
(
l
)
"[†' _] ⧖"
.
wp_bind
(_
<-
_)
%
E
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
wp_write
.
iApply
(
wp_persistent_time_receipt
with
"TIME ⧖"
);
[
done
|]
.
wp_write
.
iIntros
"⧖"
.
wp_seq
.
wp_op
.
wp_write
.
wp_op
.
wp_write
.
do
2
wp_seq
.
iIntros
"⧖"
.
wp_seq
.
wp_op
.
wp_write
.
wp_op
.
wp_write
.
do
2
wp_seq
.
...
@@ -100,7 +99,7 @@ Section vec_basic.
...
@@ -100,7 +99,7 @@ Section vec_basic.
iExists
_,
_
.
do
2
(
iSplit
;
[
done
|])
.
rewrite
/=
freeable_sz_full
split_mt_vec'
.
iExists
_,
_
.
do
2
(
iSplit
;
[
done
|])
.
rewrite
/=
freeable_sz_full
split_mt_vec'
.
iFrame
"†"
.
iNext
.
iExists
_,
0
,
0
,
[
#
]=>
/=.
iSplit
;
[
done
|]
.
iFrame
"†"
.
iNext
.
iExists
_,
0
,
0
,
[
#
]=>
/=.
iSplit
;
[
done
|]
.
rewrite
!
heap_mapsto_vec_cons
heap_mapsto_vec_nil
shift_loc_assoc
.
rewrite
!
heap_mapsto_vec_cons
heap_mapsto_vec_nil
shift_loc_assoc
.
iFrame
"↦₀ ↦₁ ↦₂ †'"
.
iSplit
;
[
by
iNext
|]
.
iExists
[]
.
by
rewrite
heap_mapsto_vec_nil
.
iFrame
"↦₀ ↦₁ ↦₂ †'"
.
iSplit
;
[
done
|]
.
iExists
[]
.
by
rewrite
heap_mapsto_vec_nil
.
Qed
.
Qed
.
Definition
vec_drop
{
𝔄
}
(
ty
:
type
𝔄
)
:
val
:=
Definition
vec_drop
{
𝔄
}
(
ty
:
type
𝔄
)
:
val
:=
...
...
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