The Spoofax Language Workbench

May 26, 2010

Our paper on the Spoofax language workbench was accepted for presentation at OOPSLA 2010 (which is now part of SPLASH).

Lennart C. L. Kats, Eelco Visser. The Spoofax Language Workbench. Rules for Declarative Specification of Languages and IDEs. In Martin Rinard, editor, Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, October 17-21, 2009, Reno, NV, USA. 2010. [researchr]

Abstract: Domain-specific languages offer high expressive power focused on a particular problem domain, abstracting over the accidental complexity associated with traditional software development. Creating a new DSL requires the construction of a parser, semantic analysis, transformations, and code generation. Adding high quality integrated development environment (IDE) support is essential for developers to be productive with domain-specific languages. In this paper we present Spoofax, a language workbench that enables efficient, agile development of textual domain-specific languages with state-of-the-art IDE support based on real-time parsing and semantic analysis of programs derived from concise, declarative specifications. Spoofax combines language processing techniques for parser generation, metaprogramming, and IDE development into a single environment used to develop languages and use generated editors at the same time. We describe idioms for the specification of language semantics based on rewrite rules, showing how analyses can be reused for transformation and code generation as well as for editor services such as error marking, reference resolving, and content completion. To implement these services we use language-parametric editor services that can be configured for a particular language, and can be dynamically loaded in the same Eclipse environment for direct use. We report on our experience in using Spoofax for the development of new languages.