Bootstrapping domain-specific meta-languages in language workbenches

It is common practice to bootstrap compilers of programming languages. By using the compiled language to implement the compiler, compiler developers can code in their own high-level language and gain a large-scale test case. In this paper, we investigate bootstrapping of compiler-compilers as they occur in language workbenches. Language workbenches support the development of compilers through the application of multiple collaborating domain-specific meta-languages for defining a language's syntax, analysis, code generation, and editor support. We analyze the bootstrapping problem of language workbenches in detail, propose a method for sound bootstrapping based on fixpoint compilation, and show how to conduct breaking meta-language changes in a bootstrapped language workbench. We have applied sound bootstrapping to the Spoofax language workbench and report on our experience.

[1]  Harry D. Huskey,et al.  NELIAC—dialect of ALGOL , 1960, CACM.

[2]  Matthias Felleisen,et al.  DrScheme: a programming environment for Scheme , 2002, J. Funct. Program..

[3]  Olivier Lecarme,et al.  Computer‐aided production of language implementation systems: A review and classification , 1982, Softw. Pract. Exp..

[4]  Eelco Visser,et al.  Stratego/XT 0.17. A language and toolset for program transformation , 2008, Sci. Comput. Program..

[5]  Harvey Bratman A alternate form of the “UNCOL diagram” , 1961, CACM.

[6]  Eelco Visser,et al.  Evaluating and comparing language workbenches: Existing results and benchmarks for the future , 2015, Comput. Lang. Syst. Struct..

[7]  Robert Bruce Findler,et al.  DrRacket: Programming Environment , 1996 .

[8]  Paul Klint,et al.  EASY Meta-programming with Rascal , 2009, GTTSE.

[9]  Markus Völter,et al.  Towards User-Friendly Projectional Editors , 2014, SLE.

[10]  Sebastian Erdweg,et al.  SugarJ: library-based syntactic language extensibility , 2011, OOPSLA '11.

[11]  Walid Taha,et al.  MetaML and multi-stage programming with explicit annotations , 2000, Theor. Comput. Sci..

[12]  Sebastian Erdweg,et al.  Extensible languages for flexible and principled domain abstraction , 2013 .

[13]  William R. Cook,et al.  Object Grammars , 2012, SLE.

[14]  William R. Cook,et al.  Managed data: modular strategies for data abstraction , 2012, Onward! 2012.

[15]  Kalle Lyytinen,et al.  MetaEdit+: A Fully Configurable Multi-User and Multi-Tool CASE and CAME Environment , 1996, CAiSE.

[16]  Eelco Visser,et al.  The spoofax language workbench: rules for declarative specification of languages and IDEs , 2010, OOPSLA.

[17]  Sam Tobin-Hochstadt,et al.  Languages as libraries , 2011, PLDI '11.

[18]  Jay Earley,et al.  A formalism for translator interactions , 1970, CACM.

[19]  Eelco Visser,et al.  Declarative specification of template-based textual editors , 2012, LDTA.

[20]  Eelco Visser,et al.  Syntax definition for language prototyping , 1997 .

[21]  Andrew W. Appel,et al.  Axiomatic bootstrapping: a guide for compiler hackers , 1994, TOPL.

[22]  Eelco Visser,et al.  Declarative Name Binding and Scope Rules , 2012, SLE.

[23]  Tijs van der Storm,et al.  RASCAL: A Domain Specific Language for Source Code Analysis and Manipulation , 2009, 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation.

[24]  Eelco Visser,et al.  DynSem: A DSL for Dynamic Semantics Specification , 2015, RTA.

[25]  Walid Taha,et al.  Mint: Java multi-stage programming using weak separability , 2010, PLDI '10.

[26]  Walid Taha,et al.  Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection , 2003, GPCE.

[27]  Eelco Visser,et al.  Towards Live Language Development , 2016 .