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
7231d4d7
There was a problem fetching the pipeline summary.
Commit
7231d4d7
authored
6 years ago
by
Hai Dang
Browse files
Options
Downloads
Patches
Plain Diff
port fake shared uniq ref
parent
b8b1592a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
2
Pipelines
6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_CoqProject
+1
-1
1 addition, 1 deletion
_CoqProject
theories/typing/lib/fake_shared.v
+66
-0
66 additions, 0 deletions
theories/typing/lib/fake_shared.v
with
67 additions
and
1 deletion
_CoqProject
+
1
−
1
View file @
7231d4d7
...
...
@@ -48,7 +48,7 @@ theories/typing/typing.v
theories/typing/soundness.v
theories/typing/lib/cell.v
theories/typing/lib/diverging_static.v
theories/typing/lib/fake_shared
_box
.v
theories/typing/lib/fake_shared.v
theories/typing/lib/option.v
theories/typing/lib/panic.v
theories/typing/lib/swap.v
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/fake_shared
_box
.v
→
theories/typing/lib/fake_shared.v
+
66
−
0
View file @
7231d4d7
...
...
@@ -2,7 +2,7 @@ From iris.proofmode Require Import tactics.
From
lrust
.
typing
Require
Import
typing
.
Set
Default
Proof
Using
"Type"
.
Section
fake_shared
_box
.
Section
fake_shared
.
Context
`{
typeG
Σ
}
.
Definition
fake_shared_box
:
val
:=
...
...
@@ -33,4 +33,34 @@ Section fake_shared_box.
{
by
rewrite
/
elctx_interp
.
}
iApply
type_jump
;
simpl
;
solve_typing
.
Qed
.
End
fake_shared_box
.
Definition
fake_shared_uniq
:
val
:=
funrec
:
<>
[
"x"
]
:=
Skip
;;
return
:
[
"x"
]
.
Lemma
fake_shared_uniq_type
ty
`{
!
TyWf
ty
}
:
typed_val
fake_shared_box
(
fn
(
∀
'
(
α
,
β
),
∅
;
&
shr
{
α
}(
&
shr
{
β
}
ty
))
→
&
shr
{
α
}(
&
uniq
{
β
}
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
.
iDestruct
(
lctx_lft_incl_incl
α
β
with
"HL HE"
)
as
"#Hαβ"
;
[
solve_typing
..|]
.
(* FIXME: WTF, using &uniq{β} here does not work. *)
iAssert
(
▷
ty_own
(
own_ptr
1
(
&
shr
{
α
}
(
uniq_bor
β
ty
)))
tid
[
x
])
%
I
with
"[HT]"
as
"HT"
.
{
destruct
x
as
[[|
l
|]|]=>
//=.
iDestruct
"HT"
as
"[H $]"
.
iNext
.
iDestruct
"H"
as
([|[[]|][]])
"[H↦ H]"
;
try
done
.
iExists
_
.
iFrame
.
iDestruct
"H"
as
(
vl
)
"[#Hf H]"
.
iNext
.
destruct
vl
as
[|[[|
l'
|]|][]];
try
done
.
iExists
l'
.
iSplit
.
{
iApply
frac_bor_iff
;
last
done
.
iIntros
"!>!# *"
.
rewrite
heap_mapsto_vec_singleton
.
iSplit
;
auto
.
}
iDestruct
"H"
as
"#H"
.
iIntros
"!# * % $"
.
iApply
step_fupd_intro
.
set_solver
.
simpl
.
iApply
ty_shr_mono
;
last
done
.
iApply
lft_intersect_incl_l
.
}
do
2
wp_seq
.
iApply
(
type_type
[]
_
_
[
x
◁
box
(
&
shr
{
α
}(
&
uniq
{
β
}
ty
))
]
with
"[] LFT [] Hna HL Hk [HT]"
);
last
first
.
{
by
rewrite
tctx_interp_singleton
tctx_hasty_val
.
}
{
by
rewrite
/
elctx_interp
.
}
iApply
type_jump
;
simpl
;
solve_typing
.
Qed
.
End
fake_shared
.
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