Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7680))

Abstract

Modularization and composition of languages and their IDEs is an important building block for working efficiently with domain-specific languages. Traditionally this has been a challenge because many grammar formalisms are not closed under composition, hence syntactic composition of languages can be challenging. Composing semantics can also be hard, at least in the general case. Finally, a lot of existing work does not consider IDEs for the composed languages. This paper illustrates how JetBrains MPS addresses language and IDE modularization and composition based on a projectional editor and modular type systems and transformations. The paper also classifies composition approaches according to the dependencies between the composed languages and whether syntactic composition is supported. Each of the approaches is illustrated with an extensive example implementation in MPS.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Arnoldus, J., Bijpost, J., van den Brand, M.: Repleo: a syntax-safe template engine. In: Consel, C., Lawall, J.L. (eds.) 6th International Conference on Generative Programming and Component Engineering, GPCE 2007, pp. 25–32. ACM, Salzburg (2007)

    Google Scholar 

  2. Attali, I., Courbis, C., Degenne, P., Fau, A., Parigot, D., Pasquier, C.: SmartTools: A Generator of Interactive Environments Tools. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 355–360. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  3. Bachrach, J., Playford, K.: The Java syntactic extender (JSE). In: OOPSLA 2001: Proceedings of the 16th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (2001)

    Google Scholar 

  4. Bagert, D.J., Friesen, D.K.: A multi-language syntax-directed editor. In: Davis, P., McClintock, V. (eds.) Proceedings of the 15th ACM Annual Conference on Computer Science, St. Louis, Missouri, USA, February 16-19, pp. 300–302. ACM (1987)

    Google Scholar 

  5. Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation. Science of Computer Programming 72(1-2), 52–70 (2008)

    Article  MathSciNet  Google Scholar 

  6. Bravenboer, M., Vermaas, R., Vinju, J.J., Visser, E.: Generalized Type-Based Disambiguation of Meta Programs with Concrete Object Syntax. In: Glück, R., Lowry, M. (eds.) GPCE 2005. LNCS, vol. 3676, pp. 157–172. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  7. Bravenboer, M., Visser, E.: Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions. In: Vlissides, J.M., Schmidt, D.C. (eds.) Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2004, pp. 365–383. ACM, Vancouver (2004)

    Chapter  Google Scholar 

  8. Bravenboer, M., Visser, E.: Designing Syntax Embeddings and Assimilations for Language Libraries. In: Giese, H. (ed.) MODELS 2008. LNCS, vol. 5002, pp. 34–46. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Buschmann, F., Meunier, R., Rohnert, H., Sommerlad, P., Stal, M.: Pattern-Oriented Software Architecture: A System of Patterns. Wiley (1996)

    Google Scholar 

  10. Dmitriev, S.: Language Oriented Programming: The Next Programming Paradigm (2004), http://www.onboard.jetbrains.com/is1/articles/04/10/lop/mps.pdf

  11. Doh, K.-G., Mosses, P.D.: Composing programming languages by combining action-semantics modules. Science of Computer Programming 47(1), 3–36 (2003)

    Article  MATH  Google Scholar 

  12. Engelen, L., van den Brand, M.: Integrating Textual and Graphical Modelling Languages. Electronic Notes in Theoretical Computer Science 253(7), 105–120 (2010)

    Article  Google Scholar 

  13. Erdweg, S., Giarrusso, P.G., Rendel, T.: Language composition untangled. In: Proceedings of Workshop on Language Descriptions, Tools and Applications, LDTA (to appear, 2012)

    Google Scholar 

  14. Erdweg, S., Kats, L.C.L., Kastner, C., Ostermann, K., Visser, E.: Growing a Language Environment with Editor Libraries. In: Denney, E., Schultz, U.P. (eds.) Proceedings of the 10th ACM International Conference on Generative Programming and Component Engineering (GPCE 2011), pp. 167–176. ACM, New York (2011)

    Chapter  Google Scholar 

  15. Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: SugarJ: library-based syntactic language extensibility. In: Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2011, pp. 391–406. ACM, New York (2011)

    Chapter  Google Scholar 

  16. Fowler, M.: Language Workbenches: The Killer-App for Domain Specific Languages? (2005), http://www.martinfowler.com/articles/languageWorkbench.html

  17. Fowler, M.: Domain-Specific Languages. Addison Wesley (2010)

    Google Scholar 

  18. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns: elements of reusable object-oriented software. Addison-Wesley Professional (1995)

    Google Scholar 

  19. Harel, D., Rumpe, B.: Meaningful Modeling: What’s the Semantics of ”Semantics”? IEEE Computer 37(10), 64–72 (2004)

    Article  Google Scholar 

  20. Hatton, L.: Safer language subsets: an overview and a case history, MISRA C. Information & Software Technology 46(7), 465–472 (2004)

    Article  Google Scholar 

  21. Hedin, G., Magnusson, E.: JastAdd–an aspect-oriented compiler construction system. Science of Computer Programming 47(1), 37–58 (2003)

    Article  MATH  Google Scholar 

  22. Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism SDF - reference manual. SIGPLAN 24(11), 43–75 (1989)

    Article  Google Scholar 

  23. Hofer, C., Ostermann, K., Rendel, T., Moors, A.: Polymorphic embedding of DSLs. In: Smaragdakis, Y., Siek, J.G. (eds.) Proceedings of the 7th International Conference on Generative Programming and Component Engineering, GPCE 2008, Nashville, TN, USA, October 19-23, pp. 137–148. ACM (2008)

    Google Scholar 

  24. Hudak, P.: Modular Domain Specific Languages and Tools. In: Proceedings of the 5th International Conference on Software Reuse, ICSR 1998. IEEE Computer Society, Washington, DC (1998)

    Google Scholar 

  25. Kats, L.C.L., Visser, E.: The Spoofax language workbench: rules for declarative specification of languages and IDEs. In: Cook, W.R., Clarke, S., Rinard, M.C. (eds.) Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, pp. 444–463. ACM, Reno/Tahoe (2010)

    Google Scholar 

  26. Kats, L.C.L., Visser, E., Wachsmuth, G.: Pure and declarative syntax definition: paradise lost and regained. In: Cook, W.R., Clarke, S., Rinard, M.C. (eds.) Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010, pp. 918–932. ACM, Reno/Tahoe (2010)

    Google Scholar 

  27. Klint, P.: A Meta-Environment for Generating Programming Environments. ACM Transactions on Software Engineering Methodology 2(2), 176–201 (1993)

    Article  Google Scholar 

  28. Klint, P., van der Storm, T., Vinju, J.J.: 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, pp. 168–177. IEEE Computer Society (2009)

    Google Scholar 

  29. Lindeman, R.T., Kats, L.C.L., Visser, E.: Declaratively Defining Domain-Specific Language Debuggers. In: Denney, E., Schultz, U.P. (eds.) Proceedings of the 10th ACM International Conference on Generative Programming and Component Engineering (GPCE 2011), pp. 127–136. ACM, New York (2011)

    Chapter  Google Scholar 

  30. Liskov, B., Wing, J.M.: A Behavioral Notion of Subtyping. ACM Transactions on Programming Languages and Systems 16(6), 1811–1841 (1994)

    Article  Google Scholar 

  31. Bravenboer, M., Dolstra, E., Visser, E.: Preventing injection attacks with syntax embeddings. In: Consel, C., Lawall, J.L. (eds.) 6th International Conference on Generative Programming and Component Engineering, GPCE 2007, pp. 3–12. ACM, Salzburg (2007)

    Google Scholar 

  32. Mali, Y., Van Wyk, E.: Building Extensible Specifications and Implementations of Promela with AbleP. In: Groce, A., Musuvathi, M. (eds.) SPIN Workshops 2011. LNCS, vol. 6823, pp. 108–125. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  33. Medina-Mora, R., Feiler, P.H.: An Incremental Programming Environment. IEEE Trans. Software Eng. 7(5), 472–482 (1981)

    Article  Google Scholar 

  34. Meijer, E., Beckman, B., Bierman, G.M.: LINQ: reconciling object, relations and XML in the .NET framework. In: Chaudhuri, S., Hristidis, V., Polyzotis, N. (eds.) Proceedings of the ACM SIGMOD International Conference on Management of Data, Chicago, Illinois, USA, June 27-29, p. 706. ACM (2006)

    Google Scholar 

  35. Mernik, M., Heering, J., Sloane, A.M.: When and how to develop domain-specific languages. ACM Computing Surveys 37(4), 316–344 (2005)

    Article  Google Scholar 

  36. Mernik, M., Lenič, M., Avdicauševic, E., Zumer, V.: LISA: An Interactive Environment for Programming Language Development. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 1–4. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  37. Mernik, M., Zumer, V.: Incremental programming language development. Computer Languages, Systems & Structures 31(1), 1–16 (2005)

    Article  MATH  Google Scholar 

  38. Mosses, P.D.: Modular structural operational semantics. Journal of Logic and Algebraic Programming 60-61, 195–228 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  39. Notkin, D.: The GANDALF project. Journal of Systems and Software 5(2), 91–105 (1985)

    Article  Google Scholar 

  40. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An Extensible Compiler Framework for Java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  41. Parr, T.J., Quong, R.W.: ANTLR: A Predicated-LL(k) Parser Generator. Software: Practice and Experience 25(7), 789–810 (1995)

    Google Scholar 

  42. Porter, S.W.: Design of a syntax directed editor for psdl. Master’s thesis, Naval Postgraduate School, Monterey, CA, USA (1988)

    Google Scholar 

  43. Rebernak, D., Mernik, M., Wu, H., Gray, J.G.: Domain-specific aspect languages for modularising crosscutting concerns in grammars. IEE Proceedings - Software 3(3), 184–200 (2009)

    Google Scholar 

  44. Renggli, L., Gîrba, T., Nierstrasz, O.: Embedding Languages without Breaking Tools. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 380–404. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  45. Reps, T.W., Teitelbaum, T.: The Synthesizer Generator. In: Proceedings of the First ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pp. 42–48. ACM, New York (1984)

    Chapter  Google Scholar 

  46. Rosenan, B.: Designing language-oriented programming languages. In: SPLASH 2010: Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion. ACM, New York (2010)

    Google Scholar 

  47. Schwerdfeger, A., Van Wyk, E.: Verifiable composition of deterministic grammars. In: Hind, M., Diwan, A. (eds.) Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2009, Dublin, Ireland, June 15-21, pp. 199–210. ACM (2009)

    Google Scholar 

  48. Simonyi, C., Christerson, M., Clifford, S.: Intentional software. In: Tarr, P.L., Cook, W.R. (eds.) Proceedings of the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006, Portland, Oregon, USA, October 22-26, pp. 451–464. ACM (2006)

    Google Scholar 

  49. Steele, G.L.: Growing a Language. Higher-Order and Symbolic Computation 12(3), 221–236 (1999)

    Article  Google Scholar 

  50. Szyperski, C.A.: Component software - beyond object-oriented programming. Addison-Wesley-Longman (1998)

    Google Scholar 

  51. Tatsubori, M., Chiba, S., Killijian, M.-O., Itano, K.: OpenJava: A Class-Based Macro System for Java. In: Cazzola, W., Houmb, S.H., Tisato, F. (eds.) Reflection and Software Engineering. LNCS, vol. 1826, pp. 117–133. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  52. Voelter, M.: Implementing Feature Variability for Models and Code with Projectional Language Workbenches. In: Proceedings of the Second International Workshop on Feature-Oriented Software Development (2010)

    Google Scholar 

  53. Voelter, M., Ratiu, D., Schaetz, B., Kolb, B.: mbeddr: an Extensible C-based Programming Language and IDE for Embedded Systems. In: Systems, Programming, Languages and Applications: Software for Humanity, SPLASH/Wavefront (2012)

    Google Scholar 

  54. Voelter, M., Visser, E.: Product Line Engineering using Domain-Specific Languages. In: de Almeida, E.S., Kishi, T. (eds.) 15th International Software Product Line Conference (SPLC), pp. 70–79. CPS (2011)

    Google Scholar 

  55. Wu, H., Gray, J., Mernik, M.: Grammar-driven generation of domain-specific language debuggers. SPE 38(10), 1073–1103 (2008)

    Google Scholar 

  56. Van Wyk, E., Bodin, D., Gao, J., Krishnan, L.: Silver: an Extensible Attribute Grammar System. Electronic Notes in Theoretical Computer Science 203(2), 103–116 (2008)

    Article  MATH  Google Scholar 

  57. Van Wyk, E., de Moor, O., Backhouse, K., Kwiatkowski, P.: Forwarding in Attribute Grammars for Modular Language Design. In: CC 2002. LNCS, vol. 2304, pp. 128–142. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  58. Van Wyk, E., Krishnan, L., Bodin, D., Schwerdfeger, A.: Attribute Grammar-Based Language Extensions for Java. In: Bateni, M. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 575–599. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Voelter, M. (2013). Language and IDE Modularization and Composition with MPS. In: Lämmel, R., Saraiva, J., Visser, J. (eds) Generative and Transformational Techniques in Software Engineering IV. GTTSE 2011. Lecture Notes in Computer Science, vol 7680. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-35992-7_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-35992-7_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-35991-0

  • Online ISBN: 978-3-642-35992-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics