ABSTRACT
There are context-dependent behaviors that are active only when a certain condition holds, and that require a certain transition process before activation. We propose a layer-activation mechanism of context-oriented programming languages for such context-dependent behaviors. Our mechanism supports the implicit layer activation (as opposed to the event-based layer activation) in a sense that a condition of activation is written as a conditional expression over reactive values (e.g., values obtained from sensors). In addition, it is push-based in a sense that it executes the transition process immediately after the condition becomes valid (as opposed to the mechanisms that defer the transition process until the first execution of a context-dependent behavior). In this paper, we present how this mechanism works in an extension of ServalCJ with push-based reactive values, and identify open issues raised by this proposal.
- Malte Appeltauer, Robert Hirschfeld, Michael Haupt, and Hidehiko Masuhara. ContextJ: Context-oriented programming with Java. Computer Software, 28(l):272--292, 2011.Google Scholar
- Malte Appeltauer, Robert Hirschfeld, Hidehiko Masuhara, Michael Haupt, and Kazunori Kawauchi. Event-specific software composition in context-oriented programming. In Proceedings of the International Conference on Software Composition 2010 (SC'10), volume 6144 of LNCS, pages 50--65, 2010. Google ScholarDigital Library
- Engineer Bainomugisha, Jorge Vallejos, Coen De Roover, Andoni Lombide Carreton, and Wolfgang De Meuter. Interruptible context-dependent executions: A fresh look at programming context-aware applications. In Onward! 2012, pages 67--84, 2012. Google ScholarDigital Library
- Andrej Bauer and Matija Pretnar. Programming with algebraic effects and handlers. Journal of Logical and Algebraic Methods in Programming, 84:108--123, 2015.Google ScholarCross Ref
- Pascal Costanza and Robert Hirschfeld. Language constructs for context-oriented programming -- an overview of ContextL. In Dynamic Language Symposium (DLS) '05, pages 1--10, 2005. Google ScholarDigital Library
- Conal Elliott. Push-pull functional reactive programming. In Haskell'09, pages 25--36, 2009. Google ScholarDigital Library
- Sebastián González, Nicolás Cardozo, Kim Mens, Alfredo Cádiz, Jean-Christophe Libbrecht, and Julien Goffaux. Subjective-C: Bringing context to mobile platform programming. In SLE'10, volume 6563 of LNCS, pages 246--265, 2011. Google ScholarDigital Library
- Sebastián González, Kim Mens, and Alfredo Cádiz. Context-oriented programming with the ambient object systems. Journal of Universal Computer Science, 14(20):3307--3332, 2008.Google Scholar
- Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. Context-oriented programming. Journal of Object Technology, 7(3):125--151, 2008.Google ScholarCross Ref
- Hiroaki Inoue and Atsushi Igarashi. A library-based approach to context-dependent computation with reactive values. In MODULARITY Companion'16, pages 50--54, 2016. Google ScholarDigital Library
- Tetsuo Kamina. Introducing lightweight reactive values to Java. In SPLASH Companion'16, pages 27--28, 2016. Google ScholarDigital Library
- Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. EventCJ: a context-oriented programming language with declarative event-based context transition. In AOSD '11, pages 253--264, 2011. Google ScholarDigital Library
- Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. Generalized layer activation mechanism for context-oriented programming. LNCS Transactions on Modularity and Composition I, 9800:123--166, 2016.Google ScholarCross Ref
- Gergely Patai. Efficient and compositional higher-order streams. In WFLP 2010: Functional and Constraint Logic Programming, volume 6559 of LNCS, pages 137--154, 2010. Google ScholarDigital Library
- Guido Salvaneschi, Gerold Hintz, and Mira Mezini. REScala: Bridging between object-oriented and functional style in reactive applications. In MODULARITY'14, pages 25--36, 2014. Google ScholarDigital Library
- Christopher Schuster and Cormac Flanagan. Reactive programming with reactive variables. In MODULARITY Companion'16, pages 29--33, 2016. Google ScholarDigital Library
- Noriyuki Suzuki, Tetsuo Kamina, and Katsuhisa Maruyama. Detecting invalid layer combinations using control-flow analysis for android. In COP'16, pages 27--32, 2016. Google ScholarDigital Library
- Martin von Löwis, Marcus Denker, and Oscar Nierstrasz. Context-oriented programming: beyond layers. In ICDL '07: Proceedings of the 2007 International Conference on Dynamic languages, pages 143--156, 2007. Google ScholarDigital Library
Recommendations
The declarative nature of implicit layer activation
COP '17: Proceedings of the 9th ACM International Workshop on Context-Oriented ProgrammingContext-oriented programming (cop) directly addresses context variability by providing dedicated language concepts: layers, units of modularity store context-dependent behavior. During runtime, layers can be applied dynamically depending on the current ...
Task context and frontal lobe activation in the stroop task
The ability to step outside a routine-to select a new response over a habitual one-is a cardinal function of the frontal lobes. A large body of neuroimaging work now exists pointing to increased activation within the anterior cingulate when stimuli ...
Activation of inhibition: Diminishing impulsive behavior by direct current stimulation over the inferior frontal gyrus
A common feature of human existence is the ability to reverse decisions after they are made but before they are implemented. This cognitive control process, termed response inhibition, refers to the ability to inhibit an action once initiated and has ...
Comments