Abstract. The paper adds a mechanism of closure to Java. We apply to closures the same technique we exploited in extending Java with methods as parameters [BO08c,BO08a] and we obtain a formal denition and a prototype of Java with closures. The formal denition consists of a set of source to source translation rules that state the meaning of the new construct in terms of compositions of well known ordinary Java structures. Two variants of the transformation are discussed to allow recursively dened closures and other useful mechanisms. The notion of shared variable as a local variable that is allocated in the heap is also discussed. Eventually, since the resulting transformation is a one pass, source to source, process, it can be implemented through a Java preprocessor [BO07,BO08b], easy to write using standard development tools [LMB95,CS06a].

JavaOmega: A Translation Semantics for Closures in Java

BELLIA, MARCO;OCCHIUTO, MARIA EUGENIA
2009-01-01

Abstract

Abstract. The paper adds a mechanism of closure to Java. We apply to closures the same technique we exploited in extending Java with methods as parameters [BO08c,BO08a] and we obtain a formal denition and a prototype of Java with closures. The formal denition consists of a set of source to source translation rules that state the meaning of the new construct in terms of compositions of well known ordinary Java structures. Two variants of the transformation are discussed to allow recursively dened closures and other useful mechanisms. The notion of shared variable as a local variable that is allocated in the heap is also discussed. Eventually, since the resulting transformation is a one pass, source to source, process, it can be implemented through a Java preprocessor [BO07,BO08b], easy to write using standard development tools [LMB95,CS06a].
2009
9788388374289
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/11568/196092
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact