Deconfined Intersection Types in Java
Autor: | Dezani-Ciancaglini, Mariangiola, Giannini, Paola, Venneri, Betti |
---|---|
Rok vydání: | 2020 |
Předmět: | |
Popis: | We show how Java intersection types can be freed from their confinement in type casts, in such a way that the proposed Java extension is safe and fully compatible with the current language. To this aim, we exploit two calculi which formalise the simple Java core and the extended language, respectively. Namely, the second calculus extends the first one by allowing an intersection type to be used anywhere in place of a nominal type. We define a translation algorithm, compiling programs of the extended language into programs of the former calculus. The key point is the interaction between λ-expressions and intersection types, that adds safe expressiveness while being the crucial matter in the translation. We prove that the translation preserves typing and semantics. Thus, typed programs in the proposed extension are translated to typed Java programs. Moreover, semantics of translated programs coincides with the one of the source programs. OASIcs, Vol. 86, Recent Developments in the Design and Implementation of Programming Languages, pages 3:1-3:25 |
Databáze: | OpenAIRE |
Externí odkaz: |