Xtext is a framework for the development of languages, which also generates all the typical and recurrent artifacts for a fully-fledged IDE on top of Eclipse. The validation (e.g., checking the correctness of programs from the point of view of types) of languages developed in Xtext has to be implemented by the programmer writing Java code. In this paper we present XTypeS (Xtext TypeSystem), a DSL for writing the type system for an Xtext language. A type system definition in XTypeS is a set of rules which act on the elements of the AST of a program, which in Xtext is represented by an EMF model. Then, XTypeS will generate the corresponding Java code that can be used to implement the validation part for a language developed in Xtext. We describe the features of XTypeS by writing the type system of two languages implemented in Xtext: Featherweight Java and lambda-calculus.

A DSL for Writing Type Systems for Xtext Languages / Lorenzo Bettini. - STAMPA. - (2011), pp. 31-40. (Intervento presentato al convegno Principles and Practice of Programming in Java tenutosi a Kongens Lyngby, Denmark nel August 24-26, 2011) [10.1145/2093157.2093163].

A DSL for Writing Type Systems for Xtext Languages

BETTINI, LORENZO
2011

Abstract

Xtext is a framework for the development of languages, which also generates all the typical and recurrent artifacts for a fully-fledged IDE on top of Eclipse. The validation (e.g., checking the correctness of programs from the point of view of types) of languages developed in Xtext has to be implemented by the programmer writing Java code. In this paper we present XTypeS (Xtext TypeSystem), a DSL for writing the type system for an Xtext language. A type system definition in XTypeS is a set of rules which act on the elements of the AST of a program, which in Xtext is represented by an EMF model. Then, XTypeS will generate the corresponding Java code that can be used to implement the validation part for a language developed in Xtext. We describe the features of XTypeS by writing the type system of two languages implemented in Xtext: Featherweight Java and lambda-calculus.
2011
Proceedings of 9th International Conference on the Principles and Practice of Programming in Java
Principles and Practice of Programming in Java
Kongens Lyngby, Denmark
August 24-26, 2011
Lorenzo Bettini
File in questo prodotto:
Non ci sono file associati a questo prodotto.

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

Utilizza questo identificatore per citare o creare un link a questa risorsa: https://hdl.handle.net/2158/1039597
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 13
  • ???jsp.display-item.citation.isi??? ND
social impact