Traits have been designed as units of fine-grained behavior reuse in the object-oriented paradigm. In this paper, we present the language Sugared Welterweight Record-Trait Java (SWRTJ), a Java dialect with records and traits. Records have been devised to complement traits for fine-grained state reuse. Records and traits can be composed by explicit linguistic operations, allowing code manipulations to achieve fine-grained code reuse. Classes are assembled from (composite) records and traits and instantiated to generate objects. We present the prototypical implementation of SWRTJ using Xtext, an Eclipse framework for the development of programming languages as well as other domain-specific languages. Our implementation comprises an Eclipse-based editor for SWRTJ with typical IDE functionalities, and a stand-alone compiler, which translates SWRTJ programs into standard Java programs.
Titolo: | A Prototypical Java-like Language with Records and Traits | |
Autori Riconosciuti: | ||
Autori: | Lorenzo Bettini; Ferruccio Damiani; Ina Schaefer; Fabio Strocco | |
Data di pubblicazione: | 2010 | |
Abstract: | Traits have been designed as units of fine-grained behavior reuse in the object-oriented paradigm. In this paper, we present the language Sugared Welterweight Record-Trait Java (SWRTJ), a Java dialect with records and traits. Records have been devised to complement traits for fine-grained state reuse. Records and traits can be composed by explicit linguistic operations, allowing code manipulations to achieve fine-grained code reuse. Classes are assembled from (composite) records and traits and instantiated to generate objects. We present the prototypical implementation of SWRTJ using Xtext, an Eclipse framework for the development of programming languages as well as other domain-specific languages. Our implementation comprises an Eclipse-based editor for SWRTJ with typical IDE functionalities, and a stand-alone compiler, which translates SWRTJ programs into standard Java programs. | |
Editore: | ACM | |
Titolo del libro: | Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java | |
Pagina iniziale: | 129 | |
Pagina finale: | 138 | |
Nome del convegno: | 8th International Conference on the Principles and Practice of Programming in Java | |
Luogo del convegno: | Vienna, Austria | |
Anno del convegno: | September 15-17, 2010 | |
Digital Object Identifier (DOI): | 10.1145/1852761.1852780 | |
ISBN: | 9781450302692 | |
URL: | http://dl.acm.org/citation.cfm?doid=1852761 http://portal.acm.org/citation.cfm?id=1852761&coll=DL&dl=GUIDE&CFID=1185163&CFTOKEN=83588939 http://www.complang.tuwien.ac.at/pppj10/ | |
Parole Chiave: | design; eclipse; implementation; integrated environments; java; languages; object-oriented programming; trait; type structure; type system | |
Appare nelle tipologie: | 04A-Conference paper in volume |
File in questo prodotto:
File | Descrizione | Tipologia | Licenza | |
---|---|---|---|---|
main.pdf | PREPRINT (PRIMA BOZZA) | Accesso aperto | Open Access Visualizza/Apri |