Toward live domain-specific languages

From text differencing to adapting models at run time
Special Section Paper

Abstract

Live programming is a style of development characterized by incremental change and immediate feedback. Instead of long edit-compile cycles, developers modify a running program by changing its source code, receiving immediate feedback as it instantly adapts in response. In this paper, we propose an approach to bridge the gap between running programs and textual domain-specific languages (DSLs). The first step of our approach consists of applying a novel model differencing algorithm, tmdiff, to the textual DSL code. By leveraging ordinary text differencing and origin tracking, tmdiff produces deltas defined in terms of the metamodel of a language. In the second step of our approach, the model deltas are applied at run time to update a running system, without having to restart it. Since the model deltas are derived from the static source code of the program, they are unaware of any run-time state maintained during model execution. We therefore propose a generic, dynamic patch architecture, rmpatch, which can be customized to cater for domain-specific state migration. We illustrate rmpatch in a case study of a live programming environment for a simple DSL implemented in Rascal for simultaneously defining and executing state machines.

Keywords

Live programming Domain-specific languages Text differencing Model patching Adapting models Models at run time 

References

  1. 1.
    Alanen, M., Porres, I.: Difference and union of models. In: Stevens, P., Whittle, J., Booch, G. (eds.) «UML» 2003—The Unified Modeling Language, Modeling Languages and Applications, 6th International Conference, San Francisco, CA, USA, October 20–24, 2003, Proceedings. Lecture Notes in Computer Science, vol. 2863, pp. 2–17. Springer, (2003)Google Scholar
  2. 2.
    Bousse, E., Corley, J., Combemale, B., Gray, J., Baudry, B.: Supporting efficient and advanced omniscient debugging for xDSMLs. In: Proceedings of the 2015 ACM SIGPLAN International Conference on Software Language Engineering, pp. 137–148. ACM, (2015)Google Scholar
  3. 3.
    Brun, C., Pierantonio, A.: Model differences in the eclipse modeling framework. UPGRADE Eur. J. Inform. Prof. 9(2), 29–34 (2008)Google Scholar
  4. 4.
    Cicchetti, A., Di Ruscio, D., Pierantonio, A.: Model patches in model-driven engineering. In: Ghosh, S. (ed.) Models in Software Engineering: Workshops and Symposia at MODELS 2009, Denver, CO, USA, October 4–9, 2009, Reports and Revised Selected Papers, pp. 190–204. Springer, Berlin, (2009)Google Scholar
  5. 5.
    Combemale, B., Crégut, X., Pantel, M.: A design pattern to build executable DSMLs and associated V&V tools. In: Software Engineering Conference (APSEC), 2012 19th Asia-Pacific, vol. 1, pp. 282–287. IEEE, (2012)Google Scholar
  6. 6.
    Eclipse Foundation. EMF Compare Project. https://www.eclipse.org/emf/compare/
  7. 7.
    Erdweg, S., van der Storm, T., Völter, M., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E., (eds.) Software Language Engineering - 6th International Conference, SLE 2013, Indianapolis, IN, USA, October 26–28, 2013, Proceedings. Lecture Notes in Computer Science, vol. 8225, pp. 197–217. Springer, (2013)Google Scholar
  8. 8.
    Erdweg, S., van der Storm, T., Völter, M., Tratt, L., Bosman, R., Cook, W.R., Gerritsen, A., Hulshout, A., Kelly, S., Loh, A., Konat, G., Molina, P.J., Palatnik, M., Pohjonen, R., Schindler, E., Schindler, K., Solmi, R., Vergu, V., Visser, E., van der Vlist, K., Wachsmuth, G., van der Woning J.: Evaluating and comparing language workbenches: existing results and benchmarks for the future. Comput. Lang. Syst. Struct. 44, Part A, 24–47 (2015). In: Special issue on the 6th and 7th International Conference on Software Language Engineering (SLE 2013 and SLE 2014)Google Scholar
  9. 9.
    Eysholdt, M., Behrens, H.: Xtext: implement your language faster than the quick and dirty way. In: Proceedings of the ACM International Conference Companion on Object Oriented Programming Systems Languages and Applications Companion, OOPSLA ’10, pp. 307–309, New York, NY, USA. ACM, (2010)Google Scholar
  10. 10.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley, Boston (1995)MATHGoogle Scholar
  11. 11.
    Goldschmidt, T., Becker, S., Uhl, A.: Classification of concrete textual syntax mapping approaches. In: Proceedings of the European Conference on Model Driven Architecture—Foundations and Applications (ECMDA-FA). LNCS, vol. 5095, pp. 169–184. (2008)Google Scholar
  12. 12.
    Götz, S., Bencomo, N., France, R.: Devising the future of the Models@Run.Time workshop. SIGSOFT Softw. Eng. Notes 40(1), 26–29 (2015)CrossRefGoogle Scholar
  13. 13.
    Inostroza, P., van der Storm, T., Erdweg, S.: Tracing program transformations with string origins. In: Di Ruscio, D., Varró, D. (eds.) Theory and Practice of Model Transformations. LNCS, vol. 8568, pp. 154–169. Springer, Berlin (2014)Google Scholar
  14. 14.
    Kehrer, T., Kelter, U., Taentzer, G.: A rule-based approach to the semantic lifting of model differences in the context of model versioning. In: 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011), pp. 163–172. (2011)Google Scholar
  15. 15.
    Kehrer, T., Kelter, U., Pietsch, P., Schmidt, M.: Adaptability of model comparison tools. In: Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, ASE 2012, pp. 306–309, New York, NY, USA. ACM, (2012)Google Scholar
  16. 16.
    Klint, P., van der Storm, T., Vinju, J.: Rascal: a domain-specific language for source code analysis and manipulation. In: Proceedings of the 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM ’09, pp. 168–177. (2009)Google Scholar
  17. 17.
    Kolovos, D.S., Di Ruscio, D., Pierantonio, A., Paige, R.F.: Different models for model matching: an analysis of approaches to support model differencing. In: ICSE Workshop on Comparison and Versioning of Software Models (CVSM’09), pp. 1–6. IEEE, (2009)Google Scholar
  18. 18.
    Kolovos, D.S., Paige, R.F., Polack, F.A.C.: The epsilon transformation language. In: Theory and Practice of Model Transformations, pp. 46–60. Springer, (2008)Google Scholar
  19. 19.
    Lämmel, R.: Coupled software transformations. In: First International Workshop on Software Evolution Transformations, pp. 31–35. (2004)Google Scholar
  20. 20.
    Langer, P., Mayerhofer, T., Kappel, G.: Semantic Model Differencing Utilizing Behavioral Semantics Specifications. Springer International Publishing, Berlin (2014)CrossRefGoogle Scholar
  21. 21.
    Langer, P., Wimmer, M., Brosch, P., Herrmannsdörfer, M., Seidl, M., Wieland, K., Kappel, G.: A posteriori operation detection in evolving software models. J. Syst. Softw. 86(2), 551–566 (2013)CrossRefGoogle Scholar
  22. 22.
    Lehmann, G., Blumendorf, M., Trollmann, F., Albayrak, S.: Meta-modeling runtime models. In: Models in Software Engineering, pp. 209–223. Springer, (2010)Google Scholar
  23. 23.
    Lieberman, H., Fry, C.: Bridging the gulf between code and behavior in programming. In: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems (CHI’95), pp. 480–486. ACM Press/Addison-Wesley Publishing Co., (1995)Google Scholar
  24. 24.
    Lin, Y., Gray, J., Jouault, F.: DSMDiff: a differentiation tool for domain-specific models. Eur. J. Inf. Syst. 16(4), 349–361 (2007)CrossRefGoogle Scholar
  25. 25.
    Maoz, S., Ringert, J.O.: A framework for relating syntactic and semantic model differences. In: 2015 ACM/IEEE 18th International Conference on Model Driven Engineering Languages and Systems (MODELS), pp. 24–33. (2015)Google Scholar
  26. 26.
    Maoz, S., Ringert, J.O., Rumpe, B.: A manifesto for semantic model differencing. In: Dingel, J., Solberg, A., (eds.) Models in Software Engineering: Workshops and Symposia at MODELS 2010, Oslo, Norway, October 2–8, 2010, Reports and Revised Selected Papers, pp. 194–203. Springer, Berlin, (2010)Google Scholar
  27. 27.
    McGuinness, D.L., Borgida, A.: Explaining subsumption in description logics. IJCAI 1, 816–821 (1995)Google Scholar
  28. 28.
    Miller, W., Myers, E.W.: A file comparison program. Softw. Pract. Exp. 15(11), 1025–1040 (1985)CrossRefGoogle Scholar
  29. 29.
    Morin, B., Barais, O., Jezequel, J.-M., Fleurey, F., Solberg, A.: Models at runtime to support dynamic adaptation. Computer 42(10), 44–51 (2009)CrossRefGoogle Scholar
  30. 30.
    Muller, P.A., Fleurey, F., Jézéquel, J.M.: Weaving executability into object-oriented meta-languages. In: Model driven engineering languages and systems, pp. 264–278. Springer, (2005)Google Scholar
  31. 31.
    Myers, E.W.: An \(O(ND)\) difference algorithm and its variations. Algorithmica 1(1–4), 251–266 (1986)MathSciNetCrossRefMATHGoogle Scholar
  32. 32.
    Rose, L.M., Paige, R.F., Kolovos, D.S., Polack, F.A.C.: Onstructing models with the human-usable textual notation. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) Model Driven Engineering Languages and Systems. LNCS, vol. 5301, pp. 249–263. Springer, Berlin (2008)CrossRefGoogle Scholar
  33. 33.
    Stephan, M., Cordy, J.R.: A survey of model comparison approaches and applications. In: Hammoudi, S., Pires, L.F., Filipe, J., das Neves, R., (eds.) Proceedings of the 1st International Conference on Model-Driven Engineering and Software Development (MODELSWARD 2013), pp. 265–277. SciTePress, Setúbal, (2013)Google Scholar
  34. 34.
    Tanimoto, S.L.: A perspective on the evolution of live programming. In: 1st International Workshop on Live Programming (LIVE’13), pp. 31–34. IEEE, (2013)Google Scholar
  35. 35.
    Tichy, W.F.: The string-to-string correction problem with block moves. ACM Trans. Comput. Syst. 2(4), 309–321 (1984)CrossRefGoogle Scholar
  36. 36.
    Treude, C., Berlik, S., Wenzel, S., Kelter, U.: Difference computation of large models. In: Proceedings of the 6th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on The Foundations of Software Engineering, ESEC-FSE ’07, pp. 295–304, New York, NY, USA. ACM, (2007)Google Scholar
  37. 37.
    van den Bos, J., van der Storm, T.: Bringing domain-specific languages to digital forensics. In: Proceedings of the 33rd International Conference on Software Engineering (ICSE 2011), pp. 671–680. ACM, (2011). Software Engineering in PracticeGoogle Scholar
  38. 38.
    van der Storm, T.: Semantic deltas for live DSL environments. In: Proceedings of the 1st International Workshop on Live Programming, LIVE ’13, pp. 35–38, Piscataway, NJ, USA. IEEE Press, (2013)Google Scholar
  39. 39.
    van der Storm, T., Cook, W.R., Loh, A.: The design and implementation of object grammars. Sci. Comput. Program. 96, Part 4(0), 460–487 (2014). In: Selected Papers from the Fifth International Conference on Software Language Engineering (SLE 2012)Google Scholar
  40. 40.
    van Deursen, A., Klint, P., Tip, F.: Origin tracking. Symb. Comput. 15, 523–545 (1993)CrossRefMATHGoogle Scholar
  41. 41.
    van Rozen, R.: A pattern-based game mechanics design assistant. In: Proceedings of the 10th International Conference on the of Foundations of Digital Games (FDG 2015). Society for the Advancement of the Science of Digital Games, (2015)Google Scholar
  42. 42.
    van Rozen, R., Dormans, J.: Adapting game mechanics with micro-machinations. In: Proceedings of the 9th International Conference on the Foundations of Digital Games (FDG 2014). Society for the Advancement of the Science of Digital Games, (2014)Google Scholar
  43. 43.
    van Rozen, R., van der Storm, T.: Origin tracking \(+\) text differencing \(=\) textual model differencing. In: Theory and Practice of Model Transformations, pp. 18–33. Springer, (2015)Google Scholar
  44. 44.
    Vandewoude, Y., Ebraert, P., Berbers, Y., D’Hondt, T.: Tranquility: a low disruptive alternative to quiescence for ensuring safe dynamic updates. IEEE Trans. Softw. Eng. 33(12), 856–868 (2007)CrossRefGoogle Scholar
  45. 45.
    Yang, W.: Identifying syntactic differences between two programs. Softw. Pract. Exp. 21(7), 739–755 (1991)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag GmbH Germany 2017

Authors and Affiliations

  1. 1.Amsterdam University of Applied SciencesAmsterdamThe Netherlands
  2. 2.Centrum Wiskunde & InformaticaAmsterdamThe Netherlands
  3. 3.University of Groningen, Johann Bernoulli InstituteGroningenThe Netherlands

Personalised recommendations