A Tutorial on the Spoofax Language Workbench
The Spoofax language workbench supports the high-level definition of (domain-specific) programming languages by means of meta-languages and the automatic derivation of implementations from such definitions. A declarative meta-language allows the language designer to abstract from irrelevant implementation details and focus on the essence of a language.
In this interactive tutorial we will build a front-end for a small language in Spoofax using SDF3 and Statix.
We will be examining a (work in progress) Spoofax language definition of the ‘modular module system’ presented by Xavier Leroy in the JFP paper A modular module system.
We will do a walk through of the SDF3 and Statix code of the project, try out the generated editor, write a couple of SPT tests, and perhaps we’ll try an extension of the language with some simple construct.
The code of the project is at
If you want to follow along, install the Spoofax Language Workbench from http://metaborg.org
I am using a nightly build of Spoofax. So, I’m not sure that the current stable version or the current nightly build will work with the language project.
Eelco Visser is Antoni van Leeuwenhoek Professor of Computer Science and chair of the Programming Languages Group at Delft University of Technology. His current research is on the foundation and implementation of declarative specification of programming languages. He studied at the University of Amsterdam (master 1993; doctorate 1997), and worked at the Oregon Graduate Institute (postdoc 1997-1998), Utrecht University (assistant professor 1998-2006), and TU Delft (associate professor 2006-2013, full professor since 2013).
His research interests include (domain-specific) programming languages, language engineering, program transformation, and declarative language definition. With his students he has designed and implemented the Spoofax language workbench, as well as several domain-specific languages, including DSLs for syntax definition (SDF3), program transformation (Stratego), static semantics (Statix), software deployment (Nix), and web application development (WebDSL). Applications of WebDSL include the researchr conference hosting site and the WebLab learning management system.