Implementing Java-like languages in Xtext with Xsemantics

Lorenzo Bettini. Implementing Java-like languages in Xtext with Xsemantics. In Sung Y. Shin, José Carlos Maldonado, editors, Proceedings of the 28th Annual ACM Symposium on Applied Computing, SAC '13, Coimbra, Portugal, March 18-22, 2013. pages 1559-1564, ACM, 2013. [doi]

Abstract

In this paper we present Xsemantics, a DSL for writing type systems, reduction rules and in general relation rules for languages implemented in Xtext. Xsemantics aims at minimizing the gap between the formalization of a language and the actual implementation in Xtext, since it uses a syntax that resembles the typical rules in a formal setting. We present an implementation of FJ (Featherweight Java) in Xtext together with its type system and operational semantics in Xsemantics. We show how such implementation is pretty faithful to the actual formalization of FJ.