article
Open Access

Bootstrapping domain-specific meta-languages in language workbenches

Abstract

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.

References

  1. Andrew W. Appel. Axiomatic bootstrapping: A guide for compiler hackers. ACM Transactions on Programming Languages and Systems, 16(6):1699–1718, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Lorenzo Bettini. Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing, 2nd edition, 2016.Google ScholarGoogle Scholar
  3. Harvey Bratman. A alternate form of the "uncol diagram". Communications of the ACM, 4(3):142, 1961. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Martin Bravenboer, Karl Trygve Kalleberg, Rob Vermaas, and Eelco Visser. Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming, 72(1-2):52–70, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cristiano Calcagno, Walid Taha, Liwen Huang, and Xavier Leroy. Implementing multi-stage languages using asts, gensym, and reflection. In Frank Pfenning and Yannis Smaragdakis, editors, Generative Programming and Component Engineering, Second International Conference, GPCE 2003, Erfurt, Germany, September 22-25, 2003, Proceedings, volume 2830 of Lecture Notes in Computer Science, pages 57–76. Springer, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jay Earley and Howard E. Sturgis. A formalism for translator interactions. Communications of the ACM, 13(10):607–617, 1970. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Sebastian Erdweg. Extensible Languages for Flexible and Principled Domain Abstraction. PhD thesis, Philipps-Universität Marburg, March 2013.Google ScholarGoogle Scholar
  8. Sebastian Erdweg, Tillmann Rendel, Christian Kästner, and Klaus Ostermann. SugarJ: library-based syntactic language extensibility. In Cristina Videira Lopes and Kathleen Fisher, editors, Proceedings of the 26th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2011, part of SPLASH 2011, Portland, OR, USA, October 22 - 27, 2011, pages 391–406. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Sebastian Erdweg, Tijs van der Storm, Markus Völter, Laurence Tratt, Remi Bosman, William R. Cook, Albert Gerritsen, Angelo Hulshout, Steven Kelly 0001, Alex Loh, Gabriël D. P. Konat, Pedro J. Molina, Martin Palatnik, Risto Pohjonen, Eugen Schindler, Klemens Schindler, Riccardo Solmi, Vlad A. Vergu, Eelco Visser, Kevin van der Vlist, Guido Wachsmuth, and Jimi van der Woning. Evaluating and comparing language workbenches: Existing results and benchmarks for the future. Computer Languages, Systems & Structures, 44:24–47, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Robby Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. Drscheme: a programming environment for scheme. Journal of Functional Programming, 12(2):159–182, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Robert Bruce Findler and PLT. DrRacket: Programming environment. Technical Report PLT-TR-2010-2, PLT Design Inc., 2010. http://racket-lang.org/tr2/.Google ScholarGoogle Scholar
  12. Harry D. Huskey, M. H. Halstead, and R. McArthur. NELIAC - dialect of ALGOL. Commun. ACM, 3(8):463–468, August 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. K. Jensen H. H. Nägeli K. V. Nori, U. Ammann. The PASCAL <P> compiler: Implementation notes. Technical report, ETH Zürich, 1974.Google ScholarGoogle Scholar
  14. Lennart C. L. Kats and Eelco Visser. The Spoofax language workbench: rules for declarative specification of languages and IDEs. In William R. Cook, Siobhán Clarke, and Martin C. Rinard, editors, Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, pages 444–463, Reno/Tahoe, Nevada, 2010. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Steven Kelly, Kalle Lyytinen, and Matti Rossi. Metaedit+: A fully configurable multi-user and multi-tool case and came environment. In Panos Constantopoulos, John Mylopoulos, and Yannis Vassiliou, editors, Advances Information System Engineering, 8th International Conference, CAiSE 96, Heraklion, Crete, Greece, May 20-24, 1996, Proceedings, volume 1080 of Lecture Notes in Computer Science, pages 1–21. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Paul Klint, Tijs van der Storm, and Jurgen J. Vinju. Easy meta-programming with rascal. In Joao M. Fernandes, Ralf Lämmel, Joost Visser, and João Saraiva, editors, Generative and Transformational Techniques in Software Engineering III - International Summer School, GTTSE 2009, Braga, Portugal, July 6-11, 2009. Revised Papers, volume 6491 of Lecture Notes in Computer Science, pages 222–289. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Paul Klint, Tijs van der Storm, and Jurgen J. Vinju. Rascal: A domain specific language for source code analysis and manipulation. In Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2009, Edmonton, Alberta, Canada, September 20-21, 2009, pages 168–177. IEEE Computer Society, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gabriël Konat, Sebastian Erdweg, and Eelco Visser. Towards live language development. In Proceedings of Workshop on Live Programming Systems (LIVE), 2016.Google ScholarGoogle Scholar
  19. Gabriël D. P. Konat, Lennart C. L. Kats, Guido Wachsmuth, and Eelco Visser. Declarative name binding and scope rules. In Krzysztof Czarnecki and Görel Hedin, editors, Software Language Engineering, 5th International Conference, SLE 2012, Dresden, Germany, September 26-28, 2012, Revised Selected Papers, volume 7745 of Lecture Notes in Computer Science, pages 311–331. Springer, 2012.Google ScholarGoogle Scholar
  20. Olivier Lecarme, Mireille Pellissier, and Marie-Claude Thomas. Computer-aided production of language implementation systems: A review and classification. Software: Practice and Experience, 12(9):785–824, 1982.Google ScholarGoogle ScholarCross RefCross Ref
  21. Alex Loh, Tijs van der Storm, and William R. Cook. Managed data: modular strategies for data abstraction. In Gary T. Leavens and Jonathan Edwards, editors, ACM Symposium on New Ideas in Programming and Reflections on Software, Onward! 2012, part of SPLASH ’12, Tucson, AZ, USA, October 21-26, 2012, pages 179–194. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Tiark Rompf and Martin Odersky. Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs. In Eelco Visser and Jaakko Järvi, editors, Generative Programming And Component Engineering, Proceedings of the Ninth International Conference on Generative Programming and Component Engineering, GPCE 2010, Eindhoven, The Netherlands, October 10-13, 2010, pages 127–136. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M. Levin T. Hart. Ai memo 39 - the new compiler. Technical report, MIT, 1962. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Walid Taha and Tim Sheard. Metaml and multi-stage programming with explicit annotations. Theoretical Computer Science, 248(1-2):211–242, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sam Tobin-Hochstadt, Vincent St-Amour, Ryan Culpepper, Matthew Flatt, and Matthias Felleisen. Languages as libraries. In Mary W. Hall and David A. Padua, editors, Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2011, San Jose, CA, USA, June 4-8, 2011, pages 132–141. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Tijs van der Storm, William R. Cook, and Alex Loh. Object grammars. In Krzysztof Czarnecki and Görel Hedin, editors, Software Language Engineering, 5th International Conference, SLE 2012, Dresden, Germany, September 26-28, 2012, Revised Selected Papers, volume 7745 of Lecture Notes in Computer Science, pages 4–23. Springer, 2012.Google ScholarGoogle Scholar
  27. Vlad A. Vergu, Pierre Neron, and Eelco Visser. DynSem: A DSL for dynamic semantics specification. In Maribel Fernández, editor, 26th International Conference on Rewriting Techniques and Applications, RTA 2015, June 29 to July 1, 2015, Warsaw, Poland, volume 36 of LIPIcs, pages 365–378. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2015.Google ScholarGoogle Scholar
  28. Eelco Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, September 1997.Google ScholarGoogle Scholar
  29. Eelco Visser. A bootstrapped compiler for strategies (extended abstract). In B. Gramlich, H. Kirchner, and F. Pfenning, editors, Strategies in Automated Deduction (STRATEGIES’99), pages 73–83, Trento, Italy, July 5 1999.Google ScholarGoogle Scholar
  30. Tobi Vollebregt, Lennart C. L. Kats, and Eelco Visser. Declarative specification of template-based textual editors. In Anthony Sloane and Suzana Andova, editors, International Workshop on Language Descriptions, Tools, and Applications, LDTA ’12, Tallinn, Estonia, March 31 - April 1, 2012, page 8. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Markus Völter, Janet Siegmund, Thorsten Berger, and Bernd Kolb. Towards user-friendly projectional editors. In Benoît Combemale, David J. Pearce, Olivier Barais, and Jurgen J. Vinju, editors, Software Language Engineering - 7th International Conference, SLE 2014, Västeras, Sweden, September 15-16, 2014. Proceedings, volume 8706 of Lecture Notes in Computer Science, pages 41–61. Springer, 2014.Google ScholarGoogle Scholar
  32. Edwin Westbrook, Mathias Ricken, Jun Inoue, Yilong Yao, Tamer Abdelatif, and Walid Taha. Mint: Java multi-stage programming using weak separability. In Benjamin G. Zorn and Alexander Aiken, editors, Proceedings of the 2010 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2010, Toronto, Ontario, Canada, June 5-10, 2010, pages 400–411. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bootstrapping domain-specific meta-languages in language workbenches

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!