Transaction Layers: Controlling Granularity of Change in Live Programming Environments

Modifying source code in a live programming environment changes the behavior of currently running programs immediately. When complex changes affect multiple locations in the code before reaching a consistent state, running programs are in danger of "de-railing" when their control flow reaches the yet incomplete "construction site". Context-oriented Programming provides layers, which encapsulate code that would otherwise be scattered over many modules and can be activated to jointly adapt program behavior at run-time. We propose to transparently collect and group changes to the code in a COP layer and defer its activation until the programmer deems its change to be completed. Additionally, layer deactivation serves as immediate undo operation on the group of changes. We present and discuss a Squeak/Smalltalk prototype consisting of a code editor, which provides control over when and where such a group of changes is active, and an extension of Squeak's COP implementation ContextS/2 required for representing most code changes in a layer.

[1]  John Maloney,et al.  Back to the Future The Story of Squeak, A Practical Smalltalk Written in Itself , 1997 .

[2]  Eric Rosenbaum,et al.  Scratch: programming for all , 2009, Commun. ACM.

[3]  Robert Hirschfeld,et al.  Applying Data-driven Tool Development to Context-oriented Languages , 2014, COP'14.

[4]  Robert Hirschfeld,et al.  Gramada: immediacy in programming language development , 2016, Onward!.

[5]  Andry Rakotonirainy,et al.  Context-oriented programming , 2003, MobiDe '03.

[6]  Tommi Mikkonen,et al.  The Lively Kernel A Self-supporting System on a Web Page , 2008, S3.

[7]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

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

[9]  Oscar Nierstrasz Modeling Change as a First-Class Entity , 2007, 2007 Australian Software Engineering Conference (ASWEC'07).

[10]  Scott Wallace,et al.  Etoys for One Laptop Per Child , 2009, 2009 Seventh International Conference on Creating, Connecting and Collaborating through Computing.

[11]  Kim Mens,et al.  Transactional contexts: harnessing the power of context-oriented reflection , 2009, COP@ECOOP.

[12]  Atsushi Igarashi,et al.  Visibility of Context-oriented Behavior and State in L , 2016 .

[13]  Damien Cassou,et al.  CoExist: overcoming aversion to change , 2012, DLS.

[14]  Oscar Nierstrasz,et al.  Encapsulating and exploiting change with changeboxes , 2007, ICDL '07.

[15]  Robert Hirschfeld,et al.  Scoping changes in self-supporting development environments using context-oriented programming , 2012, COP@ECOOP.