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
fc1ecf0e
There was a problem fetching the pipeline mini graph.
Commit
fc1ecf0e
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
show read_uniq
parent
9271f709
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/typing/uniq_bor.v
+12
-18
12 additions, 18 deletions
theories/typing/uniq_bor.v
with
12 additions
and
18 deletions
theories/typing/uniq_bor.v
+
12
−
18
View file @
fc1ecf0e
...
@@ -3,7 +3,7 @@ From iris.base_logic Require Import big_op.
...
@@ -3,7 +3,7 @@ From iris.base_logic Require Import big_op.
From
lrust
.
lifetime
Require
Import
borrow
frac_borrow
reborrow
.
From
lrust
.
lifetime
Require
Import
borrow
frac_borrow
reborrow
.
From
lrust
.
lang
Require
Import
heap
.
From
lrust
.
lang
Require
Import
heap
.
From
lrust
.
typing
Require
Export
type
.
From
lrust
.
typing
Require
Export
type
.
From
lrust
.
typing
Require
Import
lft_contexts
type_context
shr_bor
perm
typing
.
From
lrust
.
typing
Require
Import
lft_contexts
type_context
shr_bor
perm
typing
programs
.
Section
uniq_bor
.
Section
uniq_bor
.
Context
`{
typeG
Σ
}
.
Context
`{
typeG
Σ
}
.
...
@@ -165,30 +165,24 @@ Section typing.
...
@@ -165,30 +165,24 @@ Section typing.
iExists
_,
_
.
erewrite
<-
uPred
.
iff_refl
.
eauto
.
iExists
_,
_
.
erewrite
<-
uPred
.
iff_refl
.
eauto
.
Qed
.
Qed
.
(* Old typing *)
Lemma
read_uniq
E
L
κ
ty
:
Copy
ty
→
lctx_lft_alive
E
L
κ
→
typed_read
E
L
(
&
uniq
{
κ
}
ty
)
ty
(
&
uniq
{
κ
}
ty
)
.
Lemma
consumes_copy_uniq_bor
`
(
!
Copy
ty
)
κ
κ'
q
:
consumes
ty
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
.
Proof
.
Proof
.
iIntros
(
ν
tid
Φ
E
?)
"#LFT (H◁ & #H⊑ & Htok) Htl HΦ"
.
iIntros
(
Hcopy
Halive
v
tid
F
qE
qL
?)
"#LFT Htl HE HL Hown"
.
iApply
(
has_type_wp
with
"H◁"
)
.
iIntros
(
v
)
"Hνv H◁"
.
iDestruct
"Hνv"
as
%
Hνv
.
iMod
(
Halive
with
"HE HL"
)
as
(
q
)
"[Hκ Hclose]"
;
first
set_solver
.
rewrite
has_type_value
.
iDestruct
"H◁"
as
(
l'
P
)
"[[Heq #HPiff] HP]"
.
iDestruct
"Hown"
as
(
l
P
)
"[[EQ #HP] H↦]"
.
iDestruct
"EQ"
as
%
[
=->
]
.
iDestruct
"Heq"
as
%
[
=->
]
.
iMod
(
bor_iff
with
"LFT [] H↦"
)
as
"H↦"
.
set_solver
.
by
eauto
.
iMod
(
bor_iff
with
"LFT [] HP"
)
as
"H↦"
.
set_solver
.
by
eauto
.
iMod
(
bor_acc
with
"LFT H↦ Hκ"
)
as
"[H↦ Hclose']"
;
first
set_solver
.
iMod
(
lft_incl_acc
with
"H⊑ Htok"
)
as
(
q'
)
"[Htok Hclose]"
.
set_solver
.
iMod
(
bor_acc
with
"LFT H↦ Htok"
)
as
"[H↦ Hclose']"
.
set_solver
.
iDestruct
"H↦"
as
(
vl
)
"[>H↦ #Hown]"
.
iDestruct
"H↦"
as
(
vl
)
"[>H↦ #Hown]"
.
iAssert
(
▷
⌜
length
vl
=
ty_size
ty
⌝
)
%
I
with
"[#]"
as
">%"
.
iAssert
(
▷
⌜
length
vl
=
ty_size
ty
⌝
)
%
I
with
"[#]"
as
">%"
.
by
rewrite
ty
.(
ty_size_eq
)
.
{
by
iApply
ty
.(
ty_size_eq
)
.
}
i
Apply
"HΦ"
.
iFrame
"∗#
%
"
.
iIntros
"
!>!>!>
H↦"
.
i
Intros
"!>"
.
iExists
_,
_,
_
.
iSplit
;
first
done
.
iFrame
"∗#"
.
iIntros
"H↦"
.
iMod
(
"Hclose'"
with
"[H↦]"
)
as
"[H↦ Htok]"
.
by
iExists
_;
iFrame
.
iMod
(
"Hclose'"
with
"[H↦]"
)
as
"[H↦ Htok]"
.
by
iExists
_;
iFrame
.
iMod
(
"Hclose"
with
"Htok"
)
as
"
$"
.
rewrite
/
has_type
Hνv
.
iMod
(
"Hclose"
with
"Htok"
)
as
"
($ & $ & $)"
.
iExists
_,
_
.
erewrite
<-
uPred
.
iff_refl
.
auto
.
iExists
_,
_
.
erewrite
<-
uPred
.
iff_refl
.
auto
.
Qed
.
Qed
.
(* Old typing *)
Lemma
update_weak
ty
q
κ
κ'
:
Lemma
update_weak
ty
q
κ
κ'
:
update
ty
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
update
ty
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
.
(
λ
ν
,
ν
◁
&
uniq
{
κ
}
ty
∗
κ'
⊑
κ
∗
q
.[
κ'
])
%
P
.
...
...
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