From 3f9221591469eed864faf2d37dfcbe63a303ad32 Mon Sep 17 00:00:00 2001 From: JanUlrich Date: Fri, 9 Feb 2024 21:49:12 +0100 Subject: [PATCH] Intro to Type Rules --- tRules.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tRules.tex b/tRules.tex index e7c170c..df9658c 100644 --- a/tRules.tex +++ b/tRules.tex @@ -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.