We present FJ&★, a new core calculus that extends Featherweight Java (FJ) with interfaces, -expressions, intersection types and a form of dynamic type. Intersection types can be used anywhere, in particular to specify target types of -expressions. The dynamic type is exploited to specify parts of the class tables and programs we want to exclude temporarily from static typing. Our main result is the gradual guarantee, which says that if a program is well typed in a class table, then replacing type annotations (from the program and from the class table) with the dynamic type always produces a program that is still well typed in the obtained class table. Furthermore, if a typed program evaluates to a value in a class table, then replacing type annotations with dynamic types always produces a program that evaluates to the same value in the obtained class table.

Gradual Guarantee for FJ with lambda-Expressions

Viviana Bono
;
Mariangiola Dezani-Ciancaglini
;
2023-01-01

Abstract

We present FJ&★, a new core calculus that extends Featherweight Java (FJ) with interfaces, -expressions, intersection types and a form of dynamic type. Intersection types can be used anywhere, in particular to specify target types of -expressions. The dynamic type is exploited to specify parts of the class tables and programs we want to exclude temporarily from static typing. Our main result is the gradual guarantee, which says that if a program is well typed in a class table, then replacing type annotations (from the program and from the class table) with the dynamic type always produces a program that is still well typed in the obtained class table. Furthermore, if a typed program evaluates to a value in a class table, then replacing type annotations with dynamic types always produces a program that evaluates to the same value in the obtained class table.
2023
Inglese
contributo
4 - Workshop
25th ACM International Workshop on Formal Techniques for Java-like Programs, FTfJP 2023, Seattle, WA, USA, 18 July 2023
Seattle, USA
18/07/2023
Internazionale
Aaron Tomb
Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs, FTfJP 2023, Seattle, WA, USA, 18 July 2023
Esperti anonimi
ACM
New York
STATI UNITI D'AMERICA
32
38
7
979-8-4007-0246-4
https://doi.org/10.1145/3605156.3606453
Lambda expressions, Featherweight Java, Gradual Typing, Intersection Types
PORTOGALLO
   Third Party CINI - "ADMIRE - Adaptive multi-tier intelligent data manager for Exascale" - Call H2020-JTI-EuroHPC-2019-1 - Grant Agreement n. 956748 - CUP F69J21003450007
   ADMIRE
   EUROPEAN COMMISSION
   H2020
   ALDINUCCI M.-H2020 RIA - G.A. 956748
2 – prodotto con deroga d’ufficio (SOLO se editore non consente/non ha risposto)
4
info:eu-repo/semantics/conferenceObject
04-CONTRIBUTO IN ATTI DI CONVEGNO::04A-Conference paper in volume
Pedro Ângelo, Viviana Bono, Mariangiola Dezani-Ciancaglini, Mário Florido
273
none
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/1948715
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact