Soundness method call

This commit is contained in:
JanUlrich 2024-01-24 13:18:48 +01:00
parent 05b6b84e1e
commit ba4b78b57b

View File

@ -76,7 +76,7 @@ So $\sigma(\ol{\tv{r}}) = \ol{T} = \ol{\wcNtype{\Delta}{N}}$ and $\sigma(\tv{r})
\Delta, \Delta', \overline{\Delta} \vdash \ol{S} <: [\ol{S}/\ol{X}]\ol{U'} \\
\Delta, \Delta', \overline{\Delta} \vdash \ol{S} \ \ok \\
\label{sp:4}
\Delta, \Delta' \vdash \ol{T} <: \ol{\wcNtype{\Delta}{N}} \\
\Delta, \Delta' \vdash \ol{T} <: \ol{\wcNtype{\Delta}{N}}
\end{gather}
\ref{sp:1} is guaranteed by the constraints $\ol{r} \lessdot \ol{T}$.
$\ol{\tv{r}} \lessdot \ol{T}$ says that there is a $\Delta'$ with
@ -84,8 +84,13 @@ So $\sigma(\ol{\tv{r}}) = \ol{T} = \ol{\wcNtype{\Delta}{N}}$ and $\sigma(\tv{r})
If $\overline{\sigma(\tv{r}) = \wcNtype{\Delta}{N}}$
then \ref{sp:1} due to lemma \ref{lemma:unifyCC}.
\ref{sp:4} is not using $\ol{\Delta}$.
$\sigma(\ol{\tv{r}}) = \ol{T} = \ol{\wcNtype{\Delta}{N}}$
Let $\sigma(\ol{\tv{r}}) = \ol{T} = \ol{\wcNtype{\Delta}{N}}$, then
\ref{sp:4} by lemma \ref{lemma:unifySoundness} and \ref{lemma:tvsNoFV}.
The environments $\overline{\Delta}$ are not needed,
because none of the variables in $\text{dom}(\overline{\Delta})$ are used in $\ol{T}$ or $\Delta, \Delta'$.
\ref{sp:3}
%TODO: S is not in \sigma. They are generated by a local type inference algorithm
Method calls generate multiple constraints that share the same wildcard placeholders ($\ol{\wtv{a}}$, $\ol{\wtv{b}}$).
%TODO: show that only those wildcards in the parameters and receiver type are used ($\ol{\Delta}$)
@ -106,9 +111,6 @@ Method calls generate multiple constraints that share the same wildcard placehol
% then they are all contained in $\Delta, \Delta', \overline{Delta}$, which makes S ok true! (does it?)
% and due to r <. T, the judgements N <: [S/X]U and T_r <: \Delta.N are true!
%TODO for Unify:
We have to make sure, that wildcards are correctly saved in the Wildcard environment
% If $\ol{\tv{r}} \lessdot \ol{T}$ how can we say that \Delta' only uses
\end{description}