skip to main content
research-article

The spoofax language workbench: rules for declarative specification of languages and IDEs

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

Spoofax is a language workbench for efficient, agile development of textual domain-specific languages with state-of-the-art IDE support. Spoofax integrates language processing techniques for parser generation, meta-programming, and IDE development into a single environment. It uses concise, declarative specifications for languages and IDE services. In this paper we describe the architecture of Spoofax and introduce idioms for high-level specifications of language semantics using rewrite rules, showing how analyses can be reused for transformations, code generation, and editor services such as error marking, reference resolving, and content completion. The implementation of these services is supported by language-parametric editor service classes that can be dynamically loaded by the Eclipse IDE, allowing new languages to be developed and used side-by-side in the same Eclipse environment.

References

  1. }}The Spoofax project. http://www.spoofax.org/.Google ScholarGoogle Scholar
  2. }}P. Borras, D. Clement, T. Despeyroux, J. Incerpi, G. Kahn, B. Lang, and V. Pascual. Centaur: the system. SIGPLAN Not., 24(2):14--24, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}M. Bravenboer, K. T. Kalleberg, R. Vermaas, and E. Visser. Stratego/XT 0.17. A language and toolset for program transformation. Sci. of Comp. Programming, 72(1-2):52--70, June 2008. Special issue on experimental software and toolkits. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}M. Bravenboer, A. van Dam, K. Olmos, and E. Visser. Program transformation with scoped dynamic rewrite rules. Fundamenta Informaticae, 69(1-2):123--178, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}M. Bravenboer and E. Visser. Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions. In OOPSLA, pages 365--383, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}F. Budinsky, D. Steinberg, E. Merks, R. Ellersick, and T. J. Grose. Eclipse Modeling Framework. Addison-Wesley, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}P. Charles, R. M. Fuhrer, and S. M. Sutton, Jr. IMP: a meta-tooling platform for creating language-specific IDEs in Eclipse. In ASE 2007, pages 485--488, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. }}P. Charles, R. M. Fuhrer, S. M. Sutton, Jr., E. Duesterwald, and J. Vinju. Accelerating the creation of customized, language-specific IDEs in Eclipse. In OOPSLA 2009. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}S. Cook, G. Jones, S. Kent, and A. C. Wills. Domain-Specific Development with Visual Studio DSL Tools. Addison Wesley, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}J. R. Cordy, C. D. Halpern-Hamu, and E. Promislow. TXL: a rapid prototyping system for programming language dialects. In Conf. on Comp. Languages, pages 280--285. IEEE, 1988.Google ScholarGoogle ScholarCross RefCross Ref
  11. }}M. de Jonge, E. Nilsson-Nyman, L. C. L. Kats, and E. Visser. Natural and flexible error recovery for generated parsers. In SLE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}A. v. Deursen, J. Heering, and P. Klint, editors. Language Prototyping: An Algebraic Specification Approach, volume 5 of AMAST Series in Computing. World Sci. Publ. Co., 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}S. Efftinge et al. openArchitectureWare User Guide. Version 4.3. Available from http://www.eclipse.org/gmt/oaw/doc/4.3/html/contents/, April 2008.Google ScholarGoogle Scholar
  14. }}S. Efftinge and M. Voelter. oAW xText: A framework for textual DSLs. In Workshop on Modeling Symposium at Eclipse Summit, 2006.Google ScholarGoogle Scholar
  15. }}M. Fowler. A language workbench in action - MPS. http://martinfowler.com/articles/mpsAgree.html, 2005.Google ScholarGoogle Scholar
  16. }}M. Fowler. Language workbenches: The killer-app for domain specific languages?http://martinfowler.com/articles/languageWorkbench.html, 2005.Google ScholarGoogle Scholar
  17. }}M. Fowler. PostIntelliJ. http://martinfowler.com/bliki/PostIntelliJ.html, 2005.Google ScholarGoogle Scholar
  18. }}M. Fowler. A pedagogical framework for domain-specific languages. IEEE Software, 26:13--14, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}T. Goldschmidt, S. Becker, and A. Uhl. Classification of concrete textual syntax mapping approaches. In ECMDA-FA 2008, volume 5095 of LNCS, pages 169--184. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}G. Hedin and E. Magnusson. JastAdd: an aspect-oriented compiler construction system.Sci. Comput. Program., 47(1):37--58, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}J. Heering, P. R. H. Hendriks, P. Klint, and J. Rekers. The syntax definition formalism SDF: Reference manual. SIGPLAN Not., 24(11):43--75, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}F. Heidenreich, J. Johannes, S. Karol, M. Seifert, and C. Wende. Derivation and refinement of textual syntax for models. In ECMDA-FA, pages 114--129, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}Z. Hemel, L. C. L. Kats, D. M. Groenewegen, and E. Visser. Code generation by model transformation. A case study in transformation modularity. Softw. and Syst. Modeling, 2009.Google ScholarGoogle Scholar
  24. }}Z. Hemel and E. Visser. PIL: A platform independent language for retargetable DSLs. In SLE, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}JetBrains. Meta programming system. https://www. jetbrains.com/mps.Google ScholarGoogle Scholar
  26. }}F. Jouault, J. Bezivin, and I. Kurtev. TCS: a DSL for the specification of textual concrete syntaxes in model engineering. In Generative and Component Engineering (GPCE'06), pages 249--254. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}K. T. Kalleberg and E. Visser. Spoofax: An interactive development environment for program transformation with Stratego/XT. In Workshop on Language Descriptions, Tools, and Applications (LDTA 2007), pages 47--50, 2007.Google ScholarGoogle Scholar
  28. }}K. T. Kalleberg and E. Visser. Fusing a transformation language with an open compiler. In Workshop on Language Descriptions, Tools, and Applications (LDTA 2007), volume 203 of ENTCS, pages 21--36. Elsevier, April 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}L. C. L. Kats, M. de Jonge, E. Nilsson-Nyman, and E. Visser. Providing rapid feedback in generated modular language environments. Adding error recovery to scannerless generalized-LR parsing. In OOPSLA, pages 445--464, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}L. C. L. Kats, K. T. Kalleberg, and E. Visser. Domain-specific languages for composable editor plugins. In Workshop on Language Descriptions, Tools, and Applications (LDTA 2009). Elsevier, April 2009.Google ScholarGoogle Scholar
  31. }}L. C. L. Kats, A. M. Sloane, and E. Visser. Decorated attribute grammars. Attribute evaluation meets strategic programming. In Conference on Compiler Construction (CC 2009), volume 5501 of LNCS, pages 142--157. Springer, March 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}L. C. L. Kats, E. Visser, and G. Wachsmuth. Pure and declarative syntax definition: Paradise lost and regained. In Onward!, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}S. Kelly and J.-P. Tolvanen. Domain-Specific Modeling. Enabling Full Code Generation. John Wiley & Sons, Inc., 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}P. Klint. A meta-environment for generating programming environments. ACM Transactions on Software Engineering Methodology, 2(2):176--201, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. }}P. Klint, T. van der Storm, and J. Vinju. Rascal: a domain specific language for source code analysis and manipulation. In SCAM, pages 168--177, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. }}H. Krahn, B. Rumpe, and S. Volkel. Monticore: Modular development of textual domain specific languages. In TOOLS, pages 297--315, 2008.Google ScholarGoogle ScholarCross RefCross Ref
  37. }}M. F. Kuiper and J. Saraiva. Lrc - a generator for incremental language-oriented tools. In Compiler Construction (CC'98), pages 298--301, London, UK, 1998. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}M. Mernik, J. Heering, and A. Sloane. When and how to develop domain-specific languages. ACM Computing Surveys (CSUR), 37(4):344, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. }}N. Nystrom, M. Clarkson, and A. Myers. Polyglot: An Extensible Compiler Framework for Java. Compiler Construction (CC'03), 2622:138--152, Apr. 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. }}M. Pfeiffer and J. Pichler. A comparison of tool support for textual domain-specific languages. In Workshop on Domain-Specific Modeling, pages 1--7, 2008.Google ScholarGoogle Scholar
  41. }}T. Reps and T. Teitelbaum. The synthesizer generator. SIGSOFT Softw. Eng. Notes, 9(3):42--48, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. }}S. Saunders, D. K. Fields, and E. Belayev. IntelliJ IDEA in Action. Manning, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. }}C. Simonyi. The death of computer languages, the birth of Intentional Programming. Tech. report, MS Research, 1995.Google ScholarGoogle Scholar
  44. }}M. Van den Brand, A. Van Deursen, J. Heering, H. De Jong, et al. The Asf+Sdf Meta-Environment A Component-Based Language Development Environment. In Compiler Construction, volume 44 of LNCS, pages 365--370. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. }}M. G. J. van den Brand, H. de Jong, P. Klint, and P. Olivier. Efficient annotated terms. Software, Practice & Experience, 30(3):259--291, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. }}A. van Deursen, P. Klint, and F. Tip. Origin tracking. Journal of Symbolic Computation, 15(5/6):523--545, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. }}A. van Deursen, P. Klint, and J. Visser. Domain-specific languages: an annotated bibliography. SIGPLAN Not., 35(6):26--36, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. }}S. Vermolen and E. Visser. Heterogeneous coupled evolution of software languages. In MoDELS, pages 630--644, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. }}E. Visser. A family of syntax definition formalisms. Technical Report P9706, Programming Research Group, University of Amsterdam, July 1997.Google ScholarGoogle Scholar
  50. }}E. Visser. Meta-programming with concrete object syntax. In GPCE, pages 299--315, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. }}E. Visser. WebDSL: A case study in domain-specific language engineering. In GTTSE, pages 291--373, 2007.Google ScholarGoogle Scholar
  52. }}E. Visser, Z.-E.-A. Benaissa, and A. P. Tolmach. Building program optimizers with rewriting strategies. In ICFP, pages 13--26, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. }}W. Waite and G. Goss. Compiler construction. 1984. {54} M. P. Ward. Language-oriented programming. Software Concepts and Tools, 15(4):147--161, 1994.Google ScholarGoogle Scholar
  54. }}Textual Editing Framework (TEF). http://www.informatik.hu-berlin.de/sam/meta-tools/tef.Google ScholarGoogle Scholar
  55. }}Textual modeling framework (TMF). http://www.eclipse.org/modeling/tmf/.Google ScholarGoogle Scholar
  56. }}The WAtson Libraries for Analysis. http://wala.sourceforge.net/.Google ScholarGoogle Scholar

Index Terms

  1. The spoofax language workbench: rules for declarative specification of languages and IDEs

    Recommendations

    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

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 45, Issue 10
      OOPSLA '10
      October 2010
      957 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1932682
      Issue’s Table of Contents
      • cover image ACM Conferences
        OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
        October 2010
        984 pages
        ISBN:9781450302036
        DOI:10.1145/1869459

      Copyright © 2010 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 October 2010

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader