skip to main content
10.1145/3117802.3117805acmotherconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

Push-based reactive layer activation in context-oriented programming

Published: 19 June 2017 Publication History

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.

References

[1]
Malte Appeltauer, Robert Hirschfeld, Michael Haupt, and Hidehiko Masuhara. ContextJ: Context-oriented programming with Java. Computer Software, 28(l):272--292, 2011.
[2]
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.
[3]
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.
[4]
Andrej Bauer and Matija Pretnar. Programming with algebraic effects and handlers. Journal of Logical and Algebraic Methods in Programming, 84:108--123, 2015.
[5]
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.
[6]
Conal Elliott. Push-pull functional reactive programming. In Haskell'09, pages 25--36, 2009.
[7]
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.
[8]
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.
[9]
Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. Context-oriented programming. Journal of Object Technology, 7(3):125--151, 2008.
[10]
Hiroaki Inoue and Atsushi Igarashi. A library-based approach to context-dependent computation with reactive values. In MODULARITY Companion'16, pages 50--54, 2016.
[11]
Tetsuo Kamina. Introducing lightweight reactive values to Java. In SPLASH Companion'16, pages 27--28, 2016.
[12]
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.
[13]
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.
[14]
Gergely Patai. Efficient and compositional higher-order streams. In WFLP 2010: Functional and Constraint Logic Programming, volume 6559 of LNCS, pages 137--154, 2010.
[15]
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.
[16]
Christopher Schuster and Cormac Flanagan. Reactive programming with reactive variables. In MODULARITY Companion'16, pages 29--33, 2016.
[17]
Noriyuki Suzuki, Tetsuo Kamina, and Katsuhisa Maruyama. Detecting invalid layer combinations using control-flow analysis for android. In COP'16, pages 27--32, 2016.
[18]
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.

Cited By

View all
  • (2023)A framework for analyzing context-oriented programming languagesJournal of Systems and Software10.1016/j.jss.2023.111614198(111614)Online publication date: Apr-2023
  • (2023)An expressive and modular layer activation mechanism for Context-Oriented ProgrammingInformation and Software Technology10.1016/j.infsof.2022.107132156(107132)Online publication date: Apr-2023
  • (2022)Layer Activation Mechanism for Asynchronous Executions in JavaScriptProceedings of the 14th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3570353.3570354(1-8)Online publication date: 7-Jun-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
COP '17: Proceedings of the 9th ACM International Workshop on Context-Oriented Programming
June 2017
25 pages
ISBN:9781450349710
DOI:10.1145/3117802
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 June 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. implicit layer activation
  2. reactive values
  3. transition processes

Qualifiers

  • Research-article

Funding Sources

Conference

ECOOP '17

Acceptance Rates

COP '17 Paper Acceptance Rate 3 of 8 submissions, 38%;
Overall Acceptance Rate 17 of 25 submissions, 68%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 07 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)A framework for analyzing context-oriented programming languagesJournal of Systems and Software10.1016/j.jss.2023.111614198(111614)Online publication date: Apr-2023
  • (2023)An expressive and modular layer activation mechanism for Context-Oriented ProgrammingInformation and Software Technology10.1016/j.infsof.2022.107132156(107132)Online publication date: Apr-2023
  • (2022)Layer Activation Mechanism for Asynchronous Executions in JavaScriptProceedings of the 14th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3570353.3570354(1-8)Online publication date: 7-Jun-2022
  • (2020)Interfaces for Modular Reasoning in Context-Oriented ProgrammingProceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3422584.3423152(1-7)Online publication date: 21-Jul-2020
  • (2020)Adaptive Variables for Declarative UAV PlanningProceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3422584.3422763(1-7)Online publication date: 21-Jul-2020
  • (2020)Query-based object-oriented programming: a declarative web of objectsACM SIGPLAN Notices10.1145/3393673.327694953:8(64-75)Online publication date: 6-Apr-2020
  • (2019)TinyCORPProceedings of the 11th ACM International Workshop on Context-Oriented Programming10.1145/3340671.3343356(1-8)Online publication date: 15-Jul-2019
  • (2018)Query-based object-oriented programming: a declarative web of objectsProceedings of the 14th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3276945.3276949(64-75)Online publication date: 24-Oct-2018
  • (2018)A Simple Context-Oriented Programming Extension to an FRP Language for Small-Scale Embedded SystemsProceedings of the 10th ACM International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition10.1145/3242921.3242925(23-30)Online publication date: 16-Jul-2018
  • (undefined)A Framework for Analyzing Context-Oriented Programming LanguagesSSRN Electronic Journal10.2139/ssrn.4162440

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media