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
e2c98f5c
Commit
e2c98f5c
authored
8 years ago
by
Robbert Krebbers
Committed by
Ralf Jung
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Stuck.
parent
ed37ada5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/lifetime/primitive.v
+10
-0
10 additions, 0 deletions
theories/lifetime/primitive.v
theories/lifetime/raw_reborrow.v
+1
-1
1 addition, 1 deletion
theories/lifetime/raw_reborrow.v
theories/lifetime/reborrow.v
+35
-9
35 additions, 9 deletions
theories/lifetime/reborrow.v
with
46 additions
and
10 deletions
theories/lifetime/primitive.v
+
10
−
0
View file @
e2c98f5c
...
@@ -302,6 +302,16 @@ Proof.
...
@@ -302,6 +302,16 @@ Proof.
-
rewrite
-
lft_dead_or
.
iIntros
"[H†|H†]"
.
by
iApply
"H1†"
.
by
iApply
"H2†"
.
-
rewrite
-
lft_dead_or
.
iIntros
"[H†|H†]"
.
by
iApply
"H1†"
.
by
iApply
"H2†"
.
Qed
.
Qed
.
Lemma
lft_incl_mono
κ1
κ1'
κ2
κ2'
:
κ1
⊑
κ1'
-∗
κ2
⊑
κ2'
-∗
κ1
∪
κ2
⊑
κ1'
∪
κ2'
.
Proof
.
iIntros
"#H1 #H2"
.
iApply
(
lft_incl_glb
with
"[]"
)
.
-
iApply
(
lft_incl_trans
with
"[] H1"
)
.
iApply
lft_le_incl
.
apply
gmultiset_union_subseteq_l
.
-
iApply
(
lft_incl_trans
with
"[] H2"
)
.
iApply
lft_le_incl
.
apply
gmultiset_union_subseteq_r
.
Qed
.
Lemma
lft_incl_acc
E
κ
κ'
q
:
Lemma
lft_incl_acc
E
κ
κ'
q
:
↑
lftN
⊆
E
→
↑
lftN
⊆
E
→
κ
⊑
κ'
-∗
q
.[
κ
]
=
{
E
}
=∗
∃
q'
,
q'
.[
κ'
]
∗
(
q'
.[
κ'
]
=
{
E
}
=∗
q
.[
κ
])
.
κ
⊑
κ'
-∗
q
.[
κ
]
=
{
E
}
=∗
∃
q'
,
q'
.[
κ'
]
∗
(
q'
.[
κ'
]
=
{
E
}
=∗
q
.[
κ
])
.
...
...
This diff is collapsed.
Click to expand it.
theories/lifetime/raw_reborrow.v
+
1
−
1
View file @
e2c98f5c
...
@@ -129,7 +129,7 @@ Proof.
...
@@ -129,7 +129,7 @@ Proof.
iDestruct
(
own_bor_auth
with
"HI [Hi]"
)
as
%
?
.
iDestruct
(
own_bor_auth
with
"HI [Hi]"
)
as
%
?
.
{
by
rewrite
/
idx_bor_own
.
}
{
by
rewrite
/
idx_bor_own
.
}
iDestruct
(
big_sepS_elem_of_acc
_
_
κ
with
"Hinv"
)
as
"[Hκ Hκclose]"
.
iDestruct
(
big_sepS_elem_of_acc
_
_
κ
with
"Hinv"
)
as
"[Hκ Hκclose]"
.
{
rewrite
elem_of_difference
elem_of_dom
not_elem_of_singleton
.
done
.
}
{
by
rewrite
elem_of_difference
elem_of_dom
not_elem_of_singleton
.
}
iMod
(
raw_bor_unnest
_
_
_
_
(
idx_bor_own
1
(
κ
,
i
)
∗
Pi
)
%
I
iMod
(
raw_bor_unnest
_
_
_
_
(
idx_bor_own
1
(
κ
,
i
)
∗
Pi
)
%
I
with
"[$HI $Hκ] Hi Hislice Hbor [Hvs]"
)
with
"[$HI $Hκ] Hi Hislice Hbor [Hvs]"
)
as
(
Pb'
)
"([HI Hκ] & $ & Halive & Hvs)"
;
[
solve_ndisj
|
done
|
done
|..]
.
as
(
Pb'
)
"([HI Hκ] & $ & Halive & Hvs)"
;
[
solve_ndisj
|
done
|
done
|..]
.
...
...
This diff is collapsed.
Click to expand it.
theories/lifetime/reborrow.v
+
35
−
9
View file @
e2c98f5c
From
lrust
.
lifetime
Require
Export
derived
.
From
lrust
.
lifetime
Require
Export
borrow
derived
.
From
lrust
.
lifetime
Require
Export
raw_reborrow
.
From
lrust
.
lifetime
Require
Import
raw_reborrow
.
From
iris
.
algebra
Require
Import
csum
auth
frac
gmap
dec_agree
gset
.
From
iris
.
base_logic
Require
Import
big_op
.
From
iris
.
base_logic
Require
Import
big_op
.
From
iris
.
base_logic
.
lib
Require
Import
boxes
.
From
iris
.
base_logic
.
lib
Require
Import
boxes
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
...
@@ -28,13 +29,38 @@ Lemma bor_unnest E κ κ' P :
...
@@ -28,13 +29,38 @@ Lemma bor_unnest E κ κ' P :
↑
lftN
⊆
E
→
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ'
}
&
{
κ
}
P
=
{
E
,
E
∖↑
lftN
}
▷=∗
&
{
κ
∪
κ'
}
P
.
lft_ctx
-∗
&
{
κ'
}
&
{
κ
}
P
=
{
E
,
E
∖↑
lftN
}
▷=∗
&
{
κ
∪
κ'
}
P
.
Proof
.
Proof
.
iIntros
(?)
"#LFT Hκ
'
"
.
rewrite
{
2
}
/
bor
.
iIntros
(?)
"#LFT Hκ"
.
rewrite
{
2
}
/
bor
.
iMod
(
bor_exists
with
"LFT Hκ
'
"
)
as
(
κ
''
)
"Hκ
'
"
;
first
done
.
iMod
(
bor_exists
with
"LFT Hκ"
)
as
(
κ
0
)
"Hκ"
;
first
done
.
rewrite
{
1
}
/
bor
;
iDestruct
"Hκ
'
"
as
(
κ
''
'
)
"[#H⊑
'
Hκ
'''
]"
.
rewrite
{
1
}
/
bor
;
iDestruct
"Hκ"
as
(
κ
0
'
)
"[#H⊑ Hκ]"
.
(*
set
(
κ''
:=
κ0
∪
κ0'
)
.
iMod (raw_rebor _ _
(
κ''
∪ κ''')
with "LFT Hκ
'''
") as "[Hκ
Hclose
]"; first done.
iMod
(
raw_rebor
_
_
κ''
with
"LFT Hκ"
)
as
"[Hκ
_
]"
;
first
done
.
{
apply
gmultiset_union_subseteq_r
.
}
{
apply
gmultiset_union_subseteq_r
.
}
Check
iInv
mgmtN
as
(
A
I
)
"(>HA & >HI & Hinv)"
"Hclose"
.
Qed. *)
iMod
(
ilft_create
_
_
κ''
with
"HA HI Hinv"
)
as
(
A'
I'
)
"(% & HA & HI & Hinv)"
.
clear
A
I
;
rename
A'
into
A
;
rename
I'
into
I
.
iDestruct
(
big_sepS_delete
_
_
κ''
with
"Hinv"
)
as
"[Hinv' Hinv]"
;
first
by
apply
elem_of_dom
.
rewrite
{
1
}
/
lft_inv
;
iDestruct
"Hinv'"
as
"[[Hinv' >%]|[Hdead >%]]"
;
last
first
.
{
rewrite
/
lft_inv_dead
;
iDestruct
"Hdead"
as
(
Pi
)
"(Hdead & Hcnt & Hinh)"
.
iMod
(
raw_bor_fake
_
true
_
P
with
"Hdead"
)
as
"[Hdead Hbor]"
;
first
solve_ndisj
.
iMod
(
"Hclose"
with
"[- Hbor]"
)
as
"_"
.
{
rewrite
/
lfts_inv
.
iExists
A
,
I
.
iFrame
"HA HI"
.
iApply
(
big_sepS_delete
_
_
κ''
);
first
by
apply
elem_of_dom
.
iNext
;
iFrame
"Hinv"
.
rewrite
/
lft_inv
.
iRight
.
iSplit
;
last
auto
.
rewrite
/
lft_inv_dead
.
iExists
Pi
.
iFrame
.
}
iApply
(
step_fupd_mask_mono
E
_
_
E
);
try
solve_ndisj
.
rewrite
/
bor
.
do
3
iModIntro
.
iExists
κ''
.
iFrame
"Hbor"
.
rewrite
/
κ''
.
(* Why is this going to work out *)
admit
.
}
rewrite
{
1
}
/
raw_bor
/
idx_bor_own
/=
;
iDestruct
"Hκ"
as
(
i
)
"[Hi #Hislice]"
.
rewrite
lft_inv_alive_unfold
;
iDestruct
"Hinv'"
as
(
Pb
Pi
)
"(Halive & Hvs & Hinh)"
.
rewrite
/
lft_bor_alive
;
iDestruct
"Halive"
as
(
B
)
"(Hbox & >HB● & HB)"
.
iDestruct
(
own_bor_valid_2
with
"HB● Hi"
)
as
%
[
HB
%
to_borUR_included
_]
%
auth_valid_discrete_2
.
iMod
(
own_bor_update_2
with
"HB● Hi"
)
as
"[HB● Hi]"
.
Admitted
.
Admitted
.
End
reborrow
.
End
reborrow
.
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