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].
Titolo: | JavaOmega: A Translation Semantics for Closures in Java |
Autori interni: | |
Anno del prodotto: | 2009 |
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]. |
Handle: | http://hdl.handle.net/11568/196092 |
ISBN: | 9788388374289 |
Appare nelle tipologie: | 4.1 Contributo in Atti di convegno |