Commit adbecfc4 authored by Mickael Laurent's avatar Mickael Laurent
Browse files

little clarifications

parent be74fd19
......@@ -40,21 +40,20 @@ Let $t$ be a functional type (i.e., $t\leq\Empty\to\Any$) then
\subsubsection{Type schemes}
The set of types $t$ such that $\vvdash \lambda^{\wedge_{i\in I}\arrow {s_i} {t_i}}e:t$
has no smallest element in general.
Indeed, the typing rule for lambda abstraction values is the following:
Given a value $v$, the set of types $t$ such that $v \in t$ has no smallest element in general.
Indeed, the standard derivation rule for $\lambda$-abstraction values is:
\begin{mathpar}
\Infer[Abs]
{t=(\wedge_{i\in I}\arrow {s_i} {t_i})\land (\wedge_{j\in J} \neg (\arrow {s'_j} {t'_j}))\\t\not\leq \Empty}
{\vvdash\lambda^{\wedge_{i\in I}\arrow {s_i} {t_i}}x.e:t}
{\vdash \lambda^{\wedge_{i\in I}\arrow {s_i} {t_i}}x.e : t}
{}
\\
\end{mathpar}
In the next parts, we will define an algorithmic type system.
In order for it to be complete in regards to lambda-abstractions, we will use a
new syntactic category, called \textbf{type schemes}, that denote a set of types.
In the next parts, we will need an algorithmic type system.
In order for it to be complete in regards to lambda-abstractions, we'll need to use a
new syntactic category, called \textbf{type schemes}, that denotes a set of types.
\[
\begin{array}{lrcl}
......@@ -145,6 +144,7 @@ We use $\Gamma_1,\Gamma_2$ for the type environment obtained by unioning the two
We suppose w.l.o.g that all variables abstracted in $\lambda$-abstractions are distincts (otherwise we can alpha-rename $\lambda$-abstractions).
Let $e$ be an expression, $t$ a type, $\Gamma$ a type environment, $\varpi\in\{0,1\}^*$ and $p\in\{+,-\}$, we define $\typep p \varpi {\Gamma,e,t}$ and $\Gp p {\Gamma,e,t}(\varpi)$ as follows
\\
\mick
{
......@@ -224,8 +224,10 @@ $s_2$ and thus their intersection $s_1{\wedge}s_2$.\\
\mick{
We define the following algorithmic system. For every (expression, type environment, tests environment) triplet, we deduce a type scheme that represents
the set of types that can be derived. This set has no smallest type in general (that's why we can't deduce a type directly without loosing completeness).
We define the following algorithmic type system. For every (expression, type environment, tests environment) triplet, we can derive an unique type scheme that represents
the set of types that could be derived by a non-deterministic typing system (with subsomption).
This set has no smallest type in general (that's why we need to use type schemes).
\begin{mathpar}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment