Toward live domain-specific languages

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.

[1]  Walter F. Tichy,et al.  The string-to-string correction problem with block moves , 1984, TOCS.

[2]  Riemer van Rozen A Pattern-Based Game Mechanics Design Assistant , 2015, FDG.

[3]  Gerti Kappel,et al.  Semantic Model Differencing Utilizing Behavioral Semantics Specifications , 2014, MoDELS.

[4]  Heiko Behrens,et al.  Xtext: implement your language faster than the quick and dirty way , 2010, SPLASH/OOPSLA Companion.

[5]  James R. Cordy,et al.  A Survey of Model Comparison Approaches and Applications , 2013, MODELSWARD.

[6]  Benoît Combemale,et al.  A Design Pattern to Build Executable DSMLs and Associated V&V Tools , 2012, 2012 19th Asia-Pacific Software Engineering Conference.

[7]  Sahin Albayrak,et al.  Meta-Modeling Runtime Models , 2010, Models@run.time.

[8]  Brice Morin Models aT RunTiMe To suppoRT dynaMic adapTaTion , 2022 .

[9]  T. van deStorm,et al.  Origin Tracking + Text Differencing = Textual Model Differencing , 2015 .

[10]  Steffen Becker,et al.  Classification of Concrete Textual Syntax Mapping Approaches , 2008, ECMDA-FA.

[11]  Jean-Marc Jézéquel,et al.  Weaving executability into object-oriented meta-languages , 2005, MoDELS'05.

[12]  Brice Morin,et al.  Models@ Run.time to Support Dynamic Adaptation , 2009, Computer.

[13]  Antonio Cicchetti,et al.  Model patches in model-driven engineering , 2009, MODELS'09.

[14]  Wuu Yang,et al.  Identifying syntactic differences between two programs , 1991, Softw. Pract. Exp..

[15]  Jan Oliver Ringert,et al.  A framework for relating syntactic and semantic model differences , 2015, MoDELS.

[16]  Udo Kelter,et al.  Adaptability of model comparison tools , 2012, 2012 Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering.

[17]  Tijs van der Storm,et al.  RASCAL: A Domain Specific Language for Source Code Analysis and Manipulation , 2009, 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation.

[18]  Deborah L. McGuinness,et al.  Explaining Subsumption in Description Logics , 1995, IJCAI.

[19]  Steven L. Tanimoto,et al.  A perspective on the evolution of live programming , 2013, 2013 1st International Workshop on Live Programming (LIVE).

[20]  William R. Cook,et al.  The design and implementation of Object Grammars , 2014, Sci. Comput. Program..

[21]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[22]  Christoph Treude,et al.  Difference computation of large models , 2007, ESEC-FSE '07.

[23]  Sebastian Erdweg,et al.  Tracing Program Transformations with String Origins , 2014, ICMT.

[24]  Jeffrey G. Gray,et al.  DSMDiff: a differentiation tool for domain-specific models , 2007 .

[25]  Benoît Combemale,et al.  Supporting efficient and advanced omniscient debugging for xDSMLs , 2015, SLE.

[26]  Richard F. Paige,et al.  Constructing Models with the Human-Usable Textual Notation , 2008, MoDELS.

[27]  Richard F. Paige,et al.  The Epsilon Transformation Language , 2008, ICMT@TOOLS.

[28]  Jeroen van den Bos,et al.  Bringing domain-specific languages to digital forensics , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[29]  Eelco Visser,et al.  The State of the Art in Language Workbenches - Conclusions from the Language Workbench Challenge , 2013, SLE.

[30]  Arie van Deursen,et al.  Origin Tracking , 1993, J. Symb. Comput..

[31]  Richard F. Paige,et al.  Different models for model matching: An analysis of approaches to support model differencing , 2009, 2009 ICSE Workshop on Comparison and Versioning of Software Models.

[32]  Cédric Brun Obeo,et al.  MODEL DIFFERENCES IN THE ECLIPSE MODELING FRAMEWORK , 2008 .

[33]  Nelly Bencomo,et al.  Devising the Future of the Models@run.time Workshop , 2015, SOEN.

[34]  Ivan Porres,et al.  Difference and Union of Models , 2003, UML.

[35]  Theo D'Hondt,et al.  Tranquility: A Low Disruptive Alternative to Quiescence for Ensuring Safe Dynamic Updates , 2007, IEEE Transactions on Software Engineering.

[36]  R. Lämmel Coupled Software Transformations — Extended , 2022 .

[37]  Gerti Kappel,et al.  A posteriori operation detection in evolving software models , 2013, J. Syst. Softw..

[38]  Eelco Visser,et al.  Evaluating and comparing language workbenches: Existing results and benchmarks for the future , 2015, Comput. Lang. Syst. Struct..

[39]  Eugene W. Myers,et al.  A file comparison program , 1985, Softw. Pract. Exp..

[40]  Udo Kelter,et al.  A rule-based approach to the semantic lifting of model differences in the context of model versioning , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[41]  Henry Lieberman,et al.  Bridging the gulf between code and behavior in programming , 1995, CHI '95.

[42]  Bernhard Rumpe,et al.  A Manifesto for Semantic Model Differencing , 2010, MoDELS.

[43]  T. van deStorm Semantic Deltas for Live DSL Environments , 2013 .

[44]  Joris Dormans,et al.  Adapting game mechanics with Micro-Machinations , 2014, FDG.