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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
Simon Spies
lambda-rust
Commits
a16a3137
Commit
a16a3137
authored
8 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Remove Closed assumptions by using the type context.
parent
d1b86f64
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/function.v
+1
-3
1 addition, 3 deletions
theories/typing/function.v
theories/typing/type_sum.v
+8
-8
8 additions, 8 deletions
theories/typing/type_sum.v
with
9 additions
and
11 deletions
theories/typing/function.v
+
1
−
3
View file @
a16a3137
...
@@ -108,9 +108,7 @@ Section typing.
...
@@ -108,9 +108,7 @@ Section typing.
(
∀
x
,
Forall2
(
subtype
(
E0
++
E
x
)
L0
)
(
tys2
x
)
(
tys1
x
))
→
(
∀
x
,
Forall2
(
subtype
(
E0
++
E
x
)
L0
)
(
tys2
x
)
(
tys1
x
))
→
(
∀
x
,
subtype
(
E0
++
E
x
)
L0
(
ty1
x
)
(
ty2
x
))
→
(
∀
x
,
subtype
(
E0
++
E
x
)
L0
(
ty1
x
)
(
ty2
x
))
→
subtype
E0
L0
(
fn
E
tys1
ty1
)
(
fn
E
tys2
ty2
)
.
subtype
E0
L0
(
fn
E
tys1
ty1
)
(
fn
E
tys2
ty2
)
.
Proof
.
Proof
.
intros
.
by
apply
fn_subtype_full
.
Qed
.
intros
.
apply
fn_subtype_full
;
try
done
.
Qed
.
(* This proper and the next can probably not be inferred, but oh well. *)
(* This proper and the next can probably not be inferred, but oh well. *)
Global
Instance
fn_subtype_ty'
{
A
n
}
E0
L0
E
:
Global
Instance
fn_subtype_ty'
{
A
n
}
E0
L0
E
:
...
...
This diff is collapsed.
Click to expand it.
theories/typing/type_sum.v
+
8
−
8
View file @
a16a3137
...
@@ -153,15 +153,15 @@ Section case.
...
@@ -153,15 +153,15 @@ Section case.
Qed
.
Qed
.
Lemma
type_sum_assign
{
E
L
}
(
i
:
nat
)
tyl
ty1
ty2
ty
p1
p2
:
Lemma
type_sum_assign
{
E
L
}
(
i
:
nat
)
tyl
ty1
ty2
ty
p1
p2
:
Closed
[]
p1
→
Closed
[]
p2
→
tyl
!!
i
=
Some
ty
→
tyl
!!
i
=
Some
ty
→
typed_write
E
L
ty1
(
sum
tyl
)
ty2
→
typed_write
E
L
ty1
(
sum
tyl
)
ty2
→
typed_instruction
E
L
[
p1
◁
ty1
;
p2
◁
ty
]
(
p1
<-
{
i
}
p2
)
(
λ
_,
[
p1
◁
ty2
]
%
TC
)
.
typed_instruction
E
L
[
p1
◁
ty1
;
p2
◁
ty
]
(
p1
<-
{
i
}
p2
)
(
λ
_,
[
p1
◁
ty2
]
%
TC
)
.
Proof
.
Proof
.
iIntros
(
??
Hty
Hw
??)
"#HEAP #LFT $ HE HL Hp"
.
iIntros
(
Hty
Hw
??)
"#HEAP #LFT $ HE HL Hp"
.
rewrite
tctx_interp_cons
tctx_interp_singleton
.
rewrite
tctx_interp_cons
tctx_interp_singleton
.
iDestruct
"Hp"
as
"[Hp1 Hp2]"
.
wp_bind
p1
.
iApply
(
wp_hasty
with
"Hp1"
)
.
iDestruct
"Hp"
as
"[Hp1 Hp2]"
.
iDestruct
(
closed_hasty
with
"Hp1"
)
as
"%"
.
iIntros
(
v1
Hv1
)
"Hty1"
.
iDestruct
(
closed_hasty
with
"Hp2"
)
as
"%"
.
wp_bind
p1
.
iApply
(
wp_hasty
with
"Hp1"
)
.
iIntros
(
v1
Hv1
)
"Hty1"
.
iMod
(
Hw
with
"LFT HE HL Hty1"
)
as
(
l
vl
)
"(H & H↦ & Hw)"
=>
//=.
iMod
(
Hw
with
"LFT HE HL Hty1"
)
as
(
l
vl
)
"(H & H↦ & Hw)"
=>
//=.
destruct
vl
as
[|?
vl
];
iDestruct
"H"
as
%
[[
=
Hlen
]
->
]
.
destruct
vl
as
[|?
vl
];
iDestruct
"H"
as
%
[[
=
Hlen
]
->
]
.
rewrite
heap_mapsto_vec_cons
.
iDestruct
"H↦"
as
"[H↦0 H↦vl]"
.
rewrite
heap_mapsto_vec_cons
.
iDestruct
"H↦"
as
"[H↦0 H↦vl]"
.
...
@@ -195,17 +195,17 @@ Section case.
...
@@ -195,17 +195,17 @@ Section case.
Qed
.
Qed
.
Lemma
type_sum_memcpy
{
E
L
}
(
i
:
nat
)
tyl
ty1
ty1'
ty2
ty2'
ty
p1
p2
:
Lemma
type_sum_memcpy
{
E
L
}
(
i
:
nat
)
tyl
ty1
ty1'
ty2
ty2'
ty
p1
p2
:
Closed
[]
p1
→
Closed
[]
p2
→
tyl
!!
i
=
Some
ty
→
tyl
!!
i
=
Some
ty
→
typed_write
E
L
ty1
(
sum
tyl
)
ty1'
→
typed_write
E
L
ty1
(
sum
tyl
)
ty1'
→
typed_read
E
L
ty2
ty
ty2'
→
typed_read
E
L
ty2
ty
ty2'
→
typed_instruction
E
L
[
p1
◁
ty1
;
p2
◁
ty2
]
typed_instruction
E
L
[
p1
◁
ty1
;
p2
◁
ty2
]
(
p1
<⋯
{
i
}
!
{
ty
.(
ty_size
)}
p2
)
(
λ
_,
[
p1
◁
ty1'
;
p2
◁
ty2'
]
%
TC
)
.
(
p1
<⋯
{
i
}
!
{
ty
.(
ty_size
)}
p2
)
(
λ
_,
[
p1
◁
ty1'
;
p2
◁
ty2'
]
%
TC
)
.
Proof
.
Proof
.
iIntros
(
??
Hty
Hw
Hr
??)
"#HEAP #LFT Htl [HE1 HE2] [HL1 HL2] Hp"
.
iIntros
(
Hty
Hw
Hr
??)
"#HEAP #LFT Htl [HE1 HE2] [HL1 HL2] Hp"
.
rewrite
tctx_interp_cons
tctx_interp_singleton
.
rewrite
tctx_interp_cons
tctx_interp_singleton
.
iDestruct
"Hp"
as
"[Hp1 Hp2]"
.
wp_bind
p1
.
iApply
(
wp_hasty
with
"Hp1"
)
.
iDestruct
"Hp"
as
"[Hp1 Hp2]"
.
iDestruct
(
closed_hasty
with
"Hp1"
)
as
"%"
.
iIntros
(
v1
Hv1
)
"Hty1"
.
iDestruct
(
closed_hasty
with
"Hp2"
)
as
"%"
.
wp_bind
p1
.
iApply
(
wp_hasty
with
"Hp1"
)
.
iIntros
(
v1
Hv1
)
"Hty1"
.
iMod
(
Hw
with
"LFT HE1 HL1 Hty1"
)
as
(
l1
vl1
)
"(H & H↦ & Hw)"
=>
//=.
iMod
(
Hw
with
"LFT HE1 HL1 Hty1"
)
as
(
l1
vl1
)
"(H & H↦ & Hw)"
=>
//=.
destruct
vl1
as
[|?
vl1
];
iDestruct
"H"
as
%
[[
=
Hlen
]
->
]
.
destruct
vl1
as
[|?
vl1
];
iDestruct
"H"
as
%
[[
=
Hlen
]
->
]
.
rewrite
heap_mapsto_vec_cons
.
iDestruct
"H↦"
as
"[H↦0 H↦vl1]"
.
wp_write
.
rewrite
heap_mapsto_vec_cons
.
iDestruct
"H↦"
as
"[H↦0 H↦vl1]"
.
wp_write
.
...
...
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