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
d86bc591
There was a problem fetching the pipeline summary.
Commit
d86bc591
authored
7 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Fake a shared cell from a mutable borrow.
parent
830f16e9
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/typing/lft_contexts.v
+1
-1
1 addition, 1 deletion
theories/typing/lft_contexts.v
theories/typing/lib/cell.v
+24
-0
24 additions, 0 deletions
theories/typing/lib/cell.v
with
25 additions
and
1 deletion
theories/typing/lft_contexts.v
+
1
−
1
View file @
d86bc591
...
@@ -182,7 +182,7 @@ Section lft_contexts.
...
@@ -182,7 +182,7 @@ Section lft_contexts.
iIntros
"_ $"
.
done
.
}
iIntros
"_ $"
.
done
.
}
inversion_clear
Hκs
.
inversion_clear
Hκs
.
iIntros
"HL"
.
iMod
(
lctx_lft_alive_tok
κ
with
"HE HL"
)
as
(
q'
)
"(Hκ & HL & Hclose1)"
;
[
solve_typing
..|]
.
iIntros
"HL"
.
iMod
(
lctx_lft_alive_tok
κ
with
"HE HL"
)
as
(
q'
)
"(Hκ & HL & Hclose1)"
;
[
solve_typing
..|]
.
iMod
(
"IH"
with
"
*
[//] HL"
)
as
(
q''
)
"(Hκs & HL & Hclose2)"
.
iMod
(
"IH"
with
"[//] HL"
)
as
(
q''
)
"(Hκs & HL & Hclose2)"
.
destruct
(
Qp_lower_bound
q'
q''
)
as
(
qq
&
q0
&
q'0
&
->
&
->
)
.
destruct
(
Qp_lower_bound
q'
q''
)
as
(
qq
&
q0
&
q'0
&
->
&
->
)
.
iExists
qq
.
iDestruct
"HL"
as
"[$ HL2]"
.
iDestruct
"Hκ"
as
"[Hκ1 Hκ2]"
.
iExists
qq
.
iDestruct
"HL"
as
"[$ HL2]"
.
iDestruct
"Hκ"
as
"[Hκ1 Hκ2]"
.
iDestruct
"Hκs"
as
"[Hκs1 Hκs2]"
.
iModIntro
.
simpl
.
rewrite
-
lft_tok_sep
.
iSplitL
"Hκ1 Hκs1"
.
iDestruct
"Hκs"
as
"[Hκs1 Hκs2]"
.
iModIntro
.
simpl
.
rewrite
-
lft_tok_sep
.
iSplitL
"Hκ1 Hκs1"
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/cell.v
+
24
−
0
View file @
d86bc591
...
@@ -188,6 +188,30 @@ Section typing.
...
@@ -188,6 +188,30 @@ Section typing.
iApply
type_delete
;
[
solve_typing
..|]
.
iApply
type_delete
;
[
solve_typing
..|]
.
iApply
type_jump
;
solve_typing
.
iApply
type_jump
;
solve_typing
.
Qed
.
Qed
.
(* Create a shared cell from a mutable borrow.
Called alias::one in Rust. *)
Definition
fake_shared_cell
:
val
:=
funrec
:
<>
[
"x"
]
:=
let
:
"x'"
:=
!
"x"
in
letalloc
:
"r"
<-
"x'"
in
delete
[
#
1
;
"x"
];;
return
:
[
"r"
]
.
Lemma
fake_shared_cell_type
ty
`{
!
TyWf
ty
}
:
typed_val
fake_shared_cell
(
fn
(
∀
α
,
∅
;
&
uniq
{
α
}
ty
)
→
&
shr
{
α
}
cell
ty
)
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..|]
.
iIntros
"/= !#"
.
iIntros
(
α
ϝ
ret
arg
)
.
inv_vec
arg
=>
x
.
simpl_subst
.
iIntros
(
tid
)
"#LFT #HE Hna HL Hk HT"
.
rewrite
tctx_interp_singleton
tctx_hasty_val
.
iApply
(
type_type
_
_
_
[
x
◁
box
(
&
uniq
{
α
}
cell
ty
)
]
with
"[] LFT HE Hna HL Hk [HT]"
);
last
first
.
{
by
rewrite
tctx_interp_singleton
tctx_hasty_val
.
}
iApply
type_deref
;
[
solve_typing
..|]
.
iIntros
(
x'
)
.
simpl_subst
.
iApply
(
type_letalloc_1
(
&
shr
{
α
}
cell
ty
));
[
solve_typing
..|]
.
iIntros
(
r
)
.
simpl_subst
.
iApply
type_delete
;
[
solve_typing
..|]
.
iApply
type_jump
;
solve_typing
.
Qed
.
End
typing
.
End
typing
.
Hint
Resolve
cell_mono'
cell_proper'
:
lrust_typing
.
Hint
Resolve
cell_mono'
cell_proper'
:
lrust_typing
.
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