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
2f75bf0d
Commit
2f75bf0d
authored
Mar 03, 2020
by
Giuseppe Castagna
Browse files
eliminated contexts
parent
e8424c98
Changes
1
Hide whitespace changes
Inline
Side-by-side
proofs.tex
View file @
2f75bf0d
...
...
@@ -144,34 +144,35 @@ well as the proof of its type safety.
\subsection
{
Parallel semantics
}
\label
{
app:parallel
}
One technical difficulty in the proof of the subject reduction
theorem
is that, when reducing an expression
$
e
$
into
$
v
$
in a type
property
is that, when reducing an expression
$
e
$
into
$
v
$
in a type
case, the expression
$
e
$
disappears (
$
e
$
is not a
subexpression of the test anymore) and, thus, we can no longer refine the
expression
$
e
$
in the ``then'' and ``else'' branches (which might
contain occurences of
$
e
$
). To circumvent this issue, we introduce a notion of parallel
reduction which essentially reduces all occurrences of a
sub-expression appearing in a type cases also in the ``then'' and
``else'' branch at the same time. The semantics based on parallel
reduction is given below.
\[
\begin
{
array
}{
lrcl
}
\textbf
{
Expressions
}
&
e
&
::
=
&
c
\alt
x
\alt
\lambda
^{
\bigwedge
\arrow
t t
}
x.e
\alt
e e
\alt
\pi
_
i e
\alt
(
e,e
)
\alt
\ite
e t e e
\\
\textbf
{
Values
}
&
v
&
::
=
&
c
\alt
\lambda
^{
\bigwedge
\arrow
t t
}
x.e
\alt
(
v,v
)
\end
{
array
}
\]
\[
\begin
{
array
}{
lrcl
}
\textbf
{
Context
}
&
C
[]
&
::
=
&
e
[]
\alt
[]
v
\alt
(
e,
[])
\alt
([]
,v
)
\end
{
array
}
\]
``else'' branch at the same time.
%% \[
%% \begin{array}{lrcl}
%% \textbf{Expressions} & e & ::= & c\alt x \alt \lambda^{\bigwedge \arrow t t}x.e \alt e e \alt \pi_i e \alt (e,e) \alt \ite e t e e\\
%% \textbf{Values} & v & ::= & c \alt \lambda^{\bigwedge \arrow t t}x.e \alt (v,v)
%% \end{array}
%% \]
%% \[
%% \begin{array}{lrcl}
%% \textbf{Context} & C[] & ::= & e [] \alt [] v \alt (e,[]) \alt ([],v)
%% \end{array}
%% \]
The idea is to label each step of reduction done by a context rule
with the notion of reduction (one of the notions of reduction of
Section~
\ref
{
sec:opsem
}
) that caused the context to reduce. In
case of a reduction of the expression tested in the type case,
that same reduction is applied in parallel to both branches.
The semantics based on parallel
reduction is given below where expressions, value and contexts are defined as in Sections~
\ref
{
sec:syntax
}
and~
\ref
{
sec:opsem
}
.
For convenience, we denote
$
e
\xleadsto
{
e
\mapsto
e'
}
e'
$
by
$
e
\idleadsto
e'
$
and by
$
e
\uleadsto
e'
$
a step of reduction of the
...
...
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