Intro to Type Rules
This commit is contained in:
parent
1a3cf1c78e
commit
3f92215914
@ -3,6 +3,15 @@
|
||||
The input syntax for our algorithm is shown in figure \ref{fig:syntax}
|
||||
and the respective type rules in figure \ref{fig:expressionTyping} and \ref{fig:typing}.
|
||||
|
||||
The algorithm presented in this paper is an extension of the \emph{Global Type Inference for Featherweight Generic Java}\cite{TIforFGJ} algorithm.
|
||||
Additional features like overriding methods and method overloading can be added by copying the respective parts from there.
|
||||
The input language is designed to showcase type inference involving existential types.
|
||||
We introduce the type rule T-Call which emulates a Java method call,
|
||||
where existential types are implicitly \textit{opened} and \textit{closed}.
|
||||
The T-Elvis rule mimics the type judgement of a branch expression like \texttt{if-else}
|
||||
and is solely used for examples.
|
||||
%Additional features can be easily added by generating the respective constraints (Plümicke hier zitieren)
|
||||
|
||||
The type system in \cite{WildcardsNeedWitnessProtection} allows a method to \textit{override} an existing method declaration in one of its super classes,
|
||||
but only by a method with the exact same type.
|
||||
The type system presented here does not allow the \textit{overriding} of methods.
|
||||
|
Loading…
Reference in New Issue
Block a user