Skip to main content

Fusing Modeling and Programming into Language-Oriented Programming

Our Experiences with MPS

  • Conference paper
  • First Online:
Book cover Leveraging Applications of Formal Methods, Verification and Validation. Modeling (ISoLA 2018)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11244))

Included in the following conference series:

Abstract

Modeling in general is of course different from programming (think: climate models). However, when we consider the role of models in the context of “model-driven”, i.e., when they are used to automatically construct software, it is much less clear that modeling is different from programming. In this paper, I argue that the two are conceptually indistinguishable, even though in practice they traditionally emphasize different aspects of the (conceptually indistinguishable) common approach. The paper discusses and illustrates language-oriented programming, the approach to {modeling|programming} we have successfully used over the last 7 years to build a range of innovative systems in domains such as insurance, healthcare, tax, engineering and consumer electronics. It relies on domain-specific languages, modular language extension, mixed notations, and in particular, the Jetbrains MPS language workbench.

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 EPUB and 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

Notes

  1. 1.

    http://spinroot.com.

  2. 2.

    We intentionally omit the typically following word (Engineering, Development, Software Development or Architecture) because the supposed differences not relevant here.

  3. 3.

    For the purpose of this paper, we ignore the question of how to ensure that this automatic construction process is correct. It is a problem where a theoretically satisfying answer is hard to give, but can be achieved relatively easily in practice.

  4. 4.

    Alternatively, one could implement the system manually and then use tools to ensure consistency with ethe model. However, the author has never seen this approach used in practice.

  5. 5.

    In fact, a major reason why it is so hard to understand and automatically migrate legacy software is exactly this mess.

  6. 6.

    https://en.wikipedia.org/wiki/Declarative_programming.

  7. 7.

    It should also be mentioned that we are comparing programming and modeling specifically because this was the “task” set by the ISOLA track. There are other related fields one could compare, such as scripting (Perl, awk, what sysadmins do) and end-user programming (often using Excel, Access or low-code environments). In our opinion these are also basically the same, but also emphasize different aspects because of their unique context and tradition.

  8. 8.

    Formal specification languages such as Z [30], VDM++ [4] or OBJ [7] provide sophisticated means for defining abstractions for downstream analysis. However, these are outside the scope of this paper because they not used in the context of model-driven as defined in this paper.

  9. 9.

    https://www.etas.com/de/products/ascet-developer.php.

  10. 10.

    This refers to a team of engineers at itemis Stuttgart who specialize in language engineering with MPS. Between 2010 and 2018, the team has grown from 2 to 15 people, and we have been developing languages in a wide variety of domains such as healthcare, automotive, aerospace, robotics, finance, embedded software, science and government.

  11. 11.

    https://www.jetbrains.com/mps/.

  12. 12.

    In this context, we consider frameworks a form of library.

  13. 13.

    http://www.joda.org/joda-time/.

  14. 14.

    https://spring.io/.

  15. 15.

    https://en.wikipedia.org/wiki/Smart_contract.

  16. 16.

    http://www.eusprig.org/horror-stories.htm.

  17. 17.

    https://www.plm.automation.siemens.com/de/products/lms/imagine-lab/embedded-software-designer.shtml.

  18. 18.

    https://en.wikipedia.org/wiki/Separation_of_concerns.

  19. 19.

    Of course, in some projects it is necessary for organizational reasons to keep some concerns in different tools; typical examples are requirements, architecture models or low-level implementation. There are various ways of integrating external data into MPS, from actual import to stub models to using URLs or other pointers to reference data stored in non-MPS files or other resources.

  20. 20.

    http://savoir.estec.esa.int/SAVOIRDocuments.htm.

  21. 21.

    We have to make more progress in this direction to make MPS suitable for a wider range of domain experts.

  22. 22.

    On the other hand, it is hard to see how a spreadsheet-like approach can be generalized, and made to scale. It is well known that there are serious problems with the quality of spreadsheets. There is probably a reason for the recipe/execution separation.

  23. 23.

    https://2017.splashcon.org/track/live-2017.

  24. 24.

    If the computation is big, it can also be triggered explicitly, avoiding slowing down the type system.

References

  1. Berger, T., Völter, M., Jensen, H.P., Dangprasert, T., Siegmund, J.: Efficiency of projectional editing: a controlled experiment. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 763–774. ACM (2016)

    Google Scholar 

  2. Clarke, E.M., Grumberg, O., Peled, D.: Model Checking. MIT Press, Cambridge (1999)

    MATH  Google Scholar 

  3. Czarnecki, K., Eisenecker, U.W., Czarnecki, K.: Generative Programming: Methods, Tools, and Applications, vol. 19. Addison Wesley, Reading (2000)

    MATH  Google Scholar 

  4. Durr, E., Van Katwijk, J.: Vdm++, a formal specification language for object-oriented designs. In: 1992 Proceedings Computer Systems and Software Engineering, pp. 214–219. IEEE (1992)

    Google Scholar 

  5. Erdweg, S., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 197–217. Springer, Cham (2013). https://doi.org/10.1007/978-3-319-02654-1_11

    Chapter  Google Scholar 

  6. Fowler, M.: Language workbenches: The killer-app for domain specific languages (2005)

    Google Scholar 

  7. Goguen, J., Meseguer, J.: Rapid prototyping: in the obj executable specification language. ACM SIGSOFT Softw. Eng. Notes 7(5), 75–84 (1982)

    Article  Google Scholar 

  8. Green, T.R.: Cognitive dimensions of notations. In: Sutcliffe, A., Macaulay, L. (eds.) People and Computers V, pp. 443–460. Cambridge University Press, Cambridge (1989)

    Google Scholar 

  9. Holzmann, G.: Spin model checker, the: primer and reference manual. Addison-Wesley Professional (2003)

    Google Scholar 

  10. Jensen, C.S., Snodgrass, R.T.: Temporal data management. IEEE Trans. Knowl. Data Eng. 11(1), 36–44 (1999)

    Article  Google Scholar 

  11. Kroening, D., Tautschnig, M.: CBMC – C bounded model checker. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 389–391. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_26

    Chapter  Google Scholar 

  12. Maloney, J., Resnick, M., Rusk, N., Silverman, B., Eastmond, E.: The scratch programming language and environment. ACM Trans. Comput. Educ. (TOCE) 10(4), 16 (2010)

    Google Scholar 

  13. Medvidovic, N., Taylor, R.N.: A classification and comparison framework for software architecture description languages. IEEE Trans. Softw. Eng. 26(1), 70–93 (2000)

    Article  Google Scholar 

  14. Molotnikov, Z., Völter, M., Ratiu, D.: Automated domain-specific C verification with mbeddr. In: Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering, pp. 539–550. ACM (2014)

    Google Scholar 

  15. Ratiu, D., Schaetz, B., Voelter, M., Kolb, B.: Language engineering as an enabler for incrementally defined formal analyses. In: 2012 Formal Methods in Software Engineering: Rigorous and Agile Approaches (FormSERA), pp. 9–15. IEEE (2012)

    Google Scholar 

  16. Szabó, T., Erdweg, S., Voelter, M.: IncA: a DSL for the definition of incremental program analyses. In: 2016 31st IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 320–331. IEEE (2016)

    Google Scholar 

  17. Tanimoto, S.L.: A perspective on the evolution of live programming. In: Proceedings of the 1st International Workshop on Live Programming, pp. 31–34. IEEE Press (2013)

    Google Scholar 

  18. van Rest, O., Wachsmuth, G., Steel, J.R.H., Süß, J.G., Visser, E.: Robust real-time synchronization between textual and graphical editors. In: Duddy, K., Kappel, G. (eds.) ICMT 2013. LNCS, vol. 7909, pp. 92–107. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38883-5_11

    Chapter  Google Scholar 

  19. Voelter, M.: A smart contract development stack. Accessed 6 Dec 2017

    Google Scholar 

  20. Voelter, M.: Language and IDE modularization and composition with MPS. In: Lämmel, R., Saraiva, J., Visser, J. (eds.) GTTSE 2011. LNCS, vol. 7680, pp. 383–430. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-35992-7_11

    Chapter  Google Scholar 

  21. Voelter, M.: An argument for the isolation of ‘fachlichkeit’ (2017). https://languageengineering.io/an-argument-for-the-isolation-of-fachlichkeit-3a67a939d23b

  22. Voelter, M.: Thoughts on ‘declarativeness’ (2017). https://languageengineering.io/thoughts-on-declarativeness-fc4cfd4f1832

  23. Voelter, M.: The design, evolution, and use of KernelF. In: Rensink, A., Sánchez Cuadrado, J. (eds.) ICMT 2018. LNCS, vol. 10888, pp. 3–55. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93317-7_1

    Chapter  Google Scholar 

  24. Voelter, M., van Deursen, A., Kolb, B., Eberle, S.: Using C language extensions for developing embedded software: a case study. In: Proceedings of OOPSLA 2015, pp. 655–674. ACM (2015)

    Google Scholar 

  25. Voelter, M.: Using language workbenches and domain-specific languages for safety-critical software development. Softw. Syst. Model., 1–24 (2018). https://doi.org/10.1007/s10270-018-0679-0

  26. Voelter, M., Kolb, B., Szabó, T., Ratiu, D., van Deursen, A.: Lessons learned from developing mbeddr: a case study in language engineering with mps. Softw. Syst. Model., 1–46 January 2017. https://doi.org/10.1007/s10270-016-0575-4

  27. Voelter, M., Lisson, S.: Supporting diverse notations in MPS’ projectional editor. In: GEMOC Workshop

    Google Scholar 

  28. Voelter, M., Ratiu, D., Kolb, B., Schaetz, B.: mbeddr: instantiating a language workbench in the embedded software domain. Autom. Softw. Eng. 20(3), 1–52 (2013)

    Article  Google Scholar 

  29. Voelter, M., Szabó, T., Lisson, S., Kolb, B., Erdweg, S., Berger, T.: Efficient development of consistent projectional editors using grammar cells. In: Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering, pp. 28–40. ACM (2016)

    Google Scholar 

  30. Woodcock, J., Davies, J.: Using Z: Specification, Refinement, and Proof. Prentice Hall International. Pearson Education, UK (1996)

    Google Scholar 

  31. Wortmann, A., Beet, M.: Domain specific languages for efficient satellite control software development. In: DASIA 2016, vol. 736 (2016)

    Google Scholar 

  32. Xi, H., Pfenning, F.: Dependent types in practical programming. In: Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 214–227. ACM (1999)

    Google Scholar 

Download references

Acknowledgements

While I wrote the paper, the material discussed in the paper would not have been possible without the team at itemis. So I want to acknowledge everybody who contributed ideas, code, or validation. In addition, I want to thank the MPS team at Jetbrains for building an amazing tool and for helping us use it productively over the years. Finally, Tamas Szabo provided useful feedback on the paper, so I want to thank him specifically. The same thanks goes to my ISOLA reviewers.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Markus Voelter .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Voelter, M. (2018). Fusing Modeling and Programming into Language-Oriented Programming. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Modeling. ISoLA 2018. Lecture Notes in Computer Science(), vol 11244. Springer, Cham. https://doi.org/10.1007/978-3-030-03418-4_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-03418-4_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-03417-7

  • Online ISBN: 978-3-030-03418-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics