Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Giuseppe Castagna
occurrence-typing
Commits
7aa42453
Commit
7aa42453
authored
Dec 03, 2020
by
Giuseppe Castagna
Browse files
bla
parent
ac767280
Changes
1
Hide whitespace changes
Inline
Side-by-side
new_system_beppe.tex
View file @
7aa42453
...
...
@@ -21,7 +21,8 @@ t_1\vee\neg t_2)$
\textbf
{
Values
}
&
v
&
::=
&
c
\alt\lambda
x.e
\alt
(v,v)
\end{array}
\end{equation}
(no let here: can be added on a surface language later together with
explicit type annotation
$
e:t
$
that are checked by bidirectional typing)
\subsubsection
{
Type Tests for values
}
We define
$
\typof
c
=
\basic
{
c
}$
,
$
\typof
{
\lambda
x.e
}
=
\Empty\to\Any
$
,
$
\typof
{
(
v
_
1
,v
_
2
)
}
=
\typof
{
v
_
1
}
\times\typof
{
v
_
2
}$
. Finally
$
v
\in
t
$
iff
...
...
@@ -141,8 +142,8 @@ Variant with more compact derivations:
For annotations we write
$
\{
t
_
1
,
\ldots
{
,
}
t
_
n
\}
$
for
$
\{\ann\varnothing
{
t
_
1
}
,
\ldots
{
,
}
\ann\varnothing
{
t
_
n
}
\}
$
and just
$
t
$
for
$
\{\ann\varnothing
{
t
}
\}
$
. So for instance we write
$
\lambda
x
{
:
}
t.e
$
for
$
\lambda
x
{
:
}
\{\ann\varnothing
{
t
}
\}
.e
$
and
$
\letexp
{
x
{
:
}
\{
t
_
1
,
\ldots
{
,
}
t
_
n
\}
}{
e
}{
e
}$
instead of
$
\letexp
{
x
{
:
}
\{\ann\varnothing
{
t
_
1
}
,
\ldots
{
,
}
\ann\varnothing
{
t
_
n
}
\}
}{
e
}{
e
}$
x
{
:
}
t.e
$
for
$
\lambda
x
{
:
}
\{\ann\varnothing
{
t
}
\}
.e
$
while
$
\letexp
{
x
{
:
}
\{
t
_
1
,
\ldots
{
,
}
t
_
n
\}
}{
e
}{
e
}$
stands for
$
\letexp
{
x
{
:
}
\{\ann\varnothing
{
t
_
1
}
,
\ldots
{
,
}
\ann\varnothing
{
t
_
n
}
\}
}{
e
}{
e
}$
\subsubsection
{
Algorithmic typing rules
}
This system correspond to the
variant with more compact derivations.
\begin{mathpar}
...
...
@@ -229,7 +230,9 @@ $t'\leq t$, and $\Gamma\vdashA e': t'$
\subsubsection
{
Preservation of the reductions
}
Write the reduction rule for let and then note that
$
e
\reduces
e'
$
if and only if
$
\eras
e
\reduces
\eras
{
e
}$
(details to be checked, should we rather use
$
v
$
?)
(details to be checked, should we rather use
$
v
$
? Probably we have
$
\eras
e
\reduces
\eras
{
e
}
\Longrightarrow
e
\reduces
^{
0
|
1
}
e'
$
and
$
e
\reduces
e'
\Longrightarrow
\eras
e
\reduces
^
+
\eras
{
e
}$
)
\subsection
{
Normalization
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment