Unifying Multiple Layer Activation Mechanisms Using One Event Sequence

Different context-oriented programming languages try to capture contexts with respect to different things, including a computation, an object, and a device that executes a program, by providing different layer activation mechanisms. When we want to exploit all of those different kinds of contexts at the same time, it is not clear how the effects of those contexts should be combined. We develop LamFJ, a calculus for expressing various layer activation mechanisms. It replaces the with and without expressions in ContextFJ with four expressions that fire context change events, which models changes of each context. LamFJ is not only powerful enough to express multiple layer activation mechanisms but also clearly defines combined effects of those mechanisms. In addition to the supported layer activation mechanisms in the paper, namely imperative activation, per-object activation and dynamic scoping, we aim at supporting other mechanisms like reactive and structural activation with small extensions.

[1]  Atsushi Igarashi,et al.  ContextFJ: a minimal core calculus for context-oriented programming , 2011, FOAL.

[2]  Coen De Roover,et al.  Interruptible context-dependent executions: a fresh look at programming context-aware applications , 2012, Onward! 2012.

[3]  Michael Haupt,et al.  ContextJ: Context-oriented Programming with Java , 2011 .

[4]  Kim Mens,et al.  Safer context (de)activation: through the prompt-loyal strategy , 2011, COP@ECOOP.

[5]  Kim Mens,et al.  Subjective-C - Bringing Context to Mobile Platform Programming , 2010, SLE.

[6]  Oscar Nierstrasz,et al.  Context-oriented programming: beyond layers , 2007, ICDL '07.

[7]  Matteo Pradella,et al.  ContextErlang: introducing context-oriented programming in the actor model , 2012, AOSD '12.

[8]  Robert Hirschfeld,et al.  An open implementation for context-oriented layer composition in ContextJS , 2011, Sci. Comput. Program..

[9]  Tetsuo Tamai,et al.  Context-oriented software engineering: a modularity vision , 2014, MODULARITY.

[10]  Matteo Pradella,et al.  Context-oriented programming: A software engineering perspective , 2012, J. Syst. Softw..

[11]  Michael Haupt,et al.  Event-Specific Software Composition in Context-Oriented Programming , 2010, SC@TOOLS.

[12]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[13]  Hidehiko Masuhara,et al.  A unified context activation mechanism , 2013, COP@ECOOP.

[14]  Hidehiko Masuhara,et al.  EventCJ: a context-oriented programming language with declarative event-based context transition , 2011, AOSD '11.