Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Open access

Bootstrapping domain-specific meta-languages in language workbenches

Published: 20 October 2016 Publication History

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.
[2]
Lorenzo Bettini. Implementing Domain-Specific Languages with Xtext and Xtend. Packt Publishing, 2nd edition, 2016.
[3]
Harvey Bratman. A alternate form of the "uncol diagram". Communications of the ACM, 4(3):142, 1961.
[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.
[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.
[6]
Jay Earley and Howard E. Sturgis. A formalism for translator interactions. Communications of the ACM, 13(10):607–617, 1970.
[7]
Sebastian Erdweg. Extensible Languages for Flexible and Principled Domain Abstraction. PhD thesis, Philipps-Universität Marburg, March 2013.
[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.
[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.
[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.
[11]
Robert Bruce Findler and PLT. DrRacket: Programming environment. Technical Report PLT-TR-2010-2, PLT Design Inc., 2010. http://racket-lang.org/tr2/.
[12]
Harry D. Huskey, M. H. Halstead, and R. McArthur. NELIAC - dialect of ALGOL. Commun. ACM, 3(8):463–468, August 1960.
[13]
K. Jensen H. H. Nägeli K. V. Nori, U. Ammann. The PASCAL <P> compiler: Implementation notes. Technical report, ETH Zürich, 1974.
[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.
[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.
[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.
[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.
[18]
Gabriël Konat, Sebastian Erdweg, and Eelco Visser. Towards live language development. In Proceedings of Workshop on Live Programming Systems (LIVE), 2016.
[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.
[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.
[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.
[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.
[23]
M. Levin T. Hart. Ai memo 39 - the new compiler. Technical report, MIT, 1962.
[24]
Walid Taha and Tim Sheard. Metaml and multi-stage programming with explicit annotations. Theoretical Computer Science, 248(1-2):211–242, 2000.
[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.
[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.
[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.
[28]
Eelco Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, September 1997.
[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.
[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.
[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.
[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.

Cited By

View all
  • (2020)The Art of BootstrappingModel-Driven Engineering and Software Development10.1007/978-3-030-37873-8_8(182-200)Online publication date: 3-Jan-2020
  • (2021)Vision: the next 700 language workbenchesProceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3486608.3486907(16-21)Online publication date: 17-Oct-2021

Index Terms

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

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 52, Issue 3
    GPCE '16
    March 2017
    212 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/3093335
    Issue’s Table of Contents
    • cover image ACM Conferences
      GPCE 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
      October 2016
      212 pages
      ISBN:9781450344463
      DOI:10.1145/2993236
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 20 October 2016
    Published in SIGPLAN Volume 52, Issue 3

    Check for updates

    Author Tags

    1. bootstrapping
    2. domain-specific
    3. language workbench
    4. meta-language

    Qualifiers

    • Article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)169
    • Downloads (Last 6 weeks)28
    Reflects downloads up to 08 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2020)The Art of BootstrappingModel-Driven Engineering and Software Development10.1007/978-3-030-37873-8_8(182-200)Online publication date: 3-Jan-2020
    • (2021)Vision: the next 700 language workbenchesProceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3486608.3486907(16-21)Online publication date: 17-Oct-2021

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media