Java & Lambda: a Featherweight Story

January 15, 2018 ยท The Ethereal ยท ๐Ÿ› Log. Methods Comput. Sci.

๐Ÿ”ฎ THE ETHEREAL: The Ethereal
Pure theory โ€” exists on a plane beyond code

"No code URL or promise found in abstract"

Evidence collected by the PWNC Scanner

Authors Lorenzo Bettini, Viviana Bono, Mariangiola Dezani-Ciancaglini, Paola Giannini, Betti Venneri arXiv ID 1801.05052 Category cs.LO: Logic in CS Cross-listed cs.PL Citations 24 Venue Log. Methods Comput. Sci. Last Checked 2 months ago
Abstract
We present FJ&$ฮป$, a new core calculus that extends Featherweight Java (FJ) with interfaces, supporting multiple inheritance in a restricted form, $ฮป$-expressions, and intersection types. Our main goal is to formalise how lambdas and intersection types are grafted on Java 8, by studying their properties in a formal setting. We show how intersection types play a significant role in several cases, in particular in the typecast of a $ฮป$-expression and in the typing of conditional expressions. We also embody interface \emph{default methods} in FJ&$ฮป$, since they increase the dynamism of $ฮป$-expressions, by allowing these methods to be called on $ฮป$-expressions. The crucial point in Java 8 and in our calculus is that $ฮป$-expressions can have various types according to the context requirements (target types): indeed, Java code does not compile when $ฮป$-expressions come without target types. In particular, in the operational semantics we must record target types by decorating $ฮป$-expressions, otherwise they would be lost in the runtime expressions. We prove the subject reduction property and progress for the resulting calculus, and we give a type inference algorithm that returns the type of a given program if it is well typed. The design of FJ&$ฮป$ has been driven by the aim of making it a subset of Java 8, while preserving the elegance and compactness of FJ. Indeed, FJ&$ฮป$ programs are typed and behave the same as Java programs.
Community shame:
Not yet rated
Community Contributions

Found the code? Know the venue? Think something is wrong? Let us know!

๐Ÿ“œ Similar Papers

In the same crypt โ€” Logic in CS