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
052d9f00
Commit
052d9f00
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
notation for the function type
parent
22cd25ab
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/function.v
+9
-0
9 additions, 0 deletions
theories/typing/function.v
theories/typing/unsafe/cell.v
+5
-5
5 additions, 5 deletions
theories/typing/unsafe/cell.v
with
14 additions
and
5 deletions
theories/typing/function.v
+
9
−
0
View file @
052d9f00
...
...
@@ -65,6 +65,15 @@ Section fn.
Qed
.
End
fn
.
Notation
"'fn(∀' x ',' E ';' T1 ',' .. ',' TN '→' R ')'"
:=
(
fn
(
λ
x
,
E
%
EL
)
(
λ
x
,
(
Vector
.
cons
T1
.
.
(
Vector
.
cons
TN
Vector
.
nil
)
..)
%
T
)
(
λ
x
,
R
%
T
))
(
at
level
0
,
E
,
T1
,
TN
,
R
at
level
50
)
:
lrust_type_scope
.
Notation
"'fn(' E ';' T1 ',' .. ',' TN '→' R ')'"
:=
(
fn
(
λ
_:(),
E
%
EL
)
(
λ
_,
(
Vector
.
cons
T1
.
.
(
Vector
.
cons
TN
Vector
.
nil
)
..)
%
T
)
(
λ
_,
R
%
T
))
(
at
level
0
,
E
,
T1
,
TN
,
R
at
level
50
,
format
"'fn(' E ';' T1 ',' .. ',' TN '→' R ')'"
)
:
lrust_type_scope
.
Section
typing
.
Context
`{
typeG
Σ
}
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/unsafe/cell.v
+
5
−
5
View file @
052d9f00
...
...
@@ -81,7 +81,7 @@ Section typing.
Lemma
cell_new_type
ty
:
typed_instruction_ty
[]
[]
[]
cell_new
(
fn
(
λ
_,
[])
%
EL
(
λ
_,
[
#
ty
])
(
λ
_:(),
cell
ty
)
)
.
fn
([];
ty
→
cell
ty
)
.
Proof
.
apply
type_fn
;
[
apply
_..|]
.
move
=>
/=
_
ret
arg
.
inv_vec
arg
=>
x
.
simpl_subst
.
eapply
(
type_jump
[_]);
first
solve_typing
.
...
...
@@ -93,7 +93,7 @@ Section typing.
Lemma
cell_into_inner_type
ty
:
typed_instruction_ty
[]
[]
[]
cell_into_inner
(
fn
(
λ
_,
[])
%
EL
(
λ
_,
[
#
cell
ty
])
(
λ
_:(),
ty
)
)
.
fn
([];
cell
ty
→
ty
)
.
Proof
.
apply
type_fn
;
[
apply
_..|]
.
move
=>
/=
_
ret
arg
.
inv_vec
arg
=>
x
.
simpl_subst
.
eapply
(
type_jump
[_]);
first
solve_typing
.
...
...
@@ -105,7 +105,7 @@ Section typing.
Lemma
cell_get_mut_type
ty
:
typed_instruction_ty
[]
[]
[]
cell_get_mut
(
fn
(
λ
α
,
[
☀
α
]
)
%
EL
(
λ
α
,
[
#
&
uniq
{
α
}
(
cell
ty
)
])
%
T
(
λ
α
,
&
uniq
{
α
}
ty
)
%
T
)
.
fn
(
∀
α
,
[
☀
α
]
;
&
uniq
{
α
}
(
cell
ty
)
→
&
uniq
{
α
}
ty
)
.
Proof
.
apply
type_fn
;
[
apply
_..|]
.
move
=>
/=
α
ret
arg
.
inv_vec
arg
=>
x
.
simpl_subst
.
eapply
(
type_jump
[_])
.
solve_typing
.
rewrite
/
tctx_incl
/=.
...
...
@@ -122,7 +122,7 @@ Section typing.
Lemma
cell_get_type
`
(
!
Copy
ty
)
:
typed_instruction_ty
[]
[]
[]
(
cell_get
ty
)
(
fn
(
λ
α
,
[
☀
α
]
)
%
EL
(
λ
α
,
[
#
&
shr
{
α
}
(
cell
ty
)
])
%
T
(
λ
_,
ty
)
)
.
fn
(
∀
α
,
[
☀
α
]
;
&
shr
{
α
}
(
cell
ty
)
→
ty
)
.
Proof
.
apply
type_fn
;
[
apply
_..|]
.
move
=>
/=
α
ret
arg
.
inv_vec
arg
=>
x
.
simpl_subst
.
eapply
type_deref
;
[
solve_typing
..|
apply
read_own_move
|
done
|]=>
x'
.
simpl_subst
.
...
...
@@ -142,7 +142,7 @@ Section typing.
Lemma
cell_set_type
ty
:
typed_instruction_ty
[]
[]
[]
(
cell_set
ty
)
(
fn
(
λ
α
,
[
☀
α
]
)
%
EL
(
λ
α
,
[
#
&
shr
{
α
}
cell
ty
;
ty
]
%
T
)
(
λ
α
,
unit
)
)
.
fn
(
∀
α
,
[
☀
α
]
;
&
shr
{
α
}
cell
ty
,
ty
→
unit
)
.
Proof
.
apply
type_fn
;
try
apply
_
.
move
=>
/=
α
ret
arg
.
inv_vec
arg
=>
c
x
.
simpl_subst
.
eapply
type_deref
;
[
solve_typing
..|
by
apply
read_own_move
|
done
|]
.
...
...
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