[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/3422584.3423152acmconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

Interfaces for Modular Reasoning in Context-Oriented Programming

Published: 18 October 2020 Publication History

Abstract

Different activation mechanisms for Context-Oriented Programming (COP) like implicit activations have been proposed, increasing COP opportunities to be applied in real scenarios. However, activation mechanisms and base code definitions are insufficiently decoupled, as conditionals to activate layers require base code variable references. This hinders reuse, evolution, and modular reasoning of COP and base code, and therefore, uses of COP in real scenarios. This paper proposes interfaces, which are shared abstractions to communicate activation mechanisms and base code in a decoupled manner. Using these interfaces, an object can exhibit its internal state and behaviors, and conditionals use them to (de)activate layers. As layers are planned to be (re)used in different applications, developers can use interfaces to overcome the incompatibility between values exposed by a particular base code and values required by a layer. In addition, as a layer is a plain object, it can use an interface to exhibit the conditional evaluation of its activation to other layers to resolve conflicts among activations of layers. We apply this proposal to implicit activations in which evaluations of conditionals implicitly (de)activate layers. Finally, we illustrate the benefits of this proposal through RI-JS, a practical JavaScript library that currently supports interfaces, reactive activations (implementation variant for implicit activations), global and dynamic deployment, enter and exit transition processes, and partial methods.

References

[1]
Jonathan Aldrich. 2005. Open Modules: Modular Reasoning about Advice. In Proceedings of the 19th European Conference on Object-Oriented Programming (ECOOP 2005) (Lecture Notes in Computer Science), Andrew P. Black (Ed.). Springer-Verlag, Glasgow, UK, 144--168.
[2]
Unai Alegre, Juan Carlos Augusto, and Tony Clark. 2016. Engineering context-aware systems and applications: A survey. Journal of Systems and Software 117 (July 2016), 55--83.
[3]
Edward Amsden. 2011. A Survey of Functional Reactive Programming Concepts, Implementations, Optimizations, and Applications. Technical Report. Rochester Institute of Technology.
[4]
Tomoyuki Aotani, Tetsuo Kamina, and Hidehiko Masuhara. 2014. Unifying multiple layer activation mechanisms using one event sequence. In Proceedings of 6th International Workshop on Context-Oriented Programming, COP 2014. Uppsala, Sweden, 1--6.
[5]
Malte Appeltauer, Robert Hirschfeld, Michael Haupt, and Hidehiko Masuhara. 2011. ContextJ: Context-oriented Programming with Java. Computer Software 28, 1 (Feb. 2011), 272--292.
[6]
Malte Appeltauer, Robert Hirschfeld, Hidehiko Masuhara, Michael Haupt, and Kazunori Kawauchi. 2010. Event-Specific Software Composition in Context-Oriented Programming. In Software Composition, Benoît Baudry and Eric Wohlstadter (Eds.). Malaga, Spain, 50--65.
[7]
Engineer Bainomugisha, Jorge Vallejos, Coen De Roover, Andoni Lombide Carreton, and Wolfgang De Meuter. 2012. Interruptible Context-dependent Executions: A Fresh Look at Programming Context-aware Applications. In Proceedings of the ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. Tucson, Arizona, USA, 67--84.
[8]
Eric Bodden, Éric Tanter, and Milton Inostroza. 2014. Join Point Interfaces for Safe and Flexible Decoupling of Aspects. ACM Transactions on Software Engineering and Methodology 23, 1 (Feb. 2014), 1--41.
[9]
Marie Chan, Daniel Estèvel, Jean Fourniols, Christophe Escriba, and Eric Campo. 2012. Smart wearable systems: Current status and future challenges. Artificial Intelligence in Medicine 56, 3 (Nov. 2012), 137--156.
[10]
IEEE Standards Committee et al. 1990. IEEE standard glossary of software engineering terminology. IEEE Std 610.12-1990 (Dec. 1990), 1--84.
[11]
Gregory Harold Cooper. 2008. Integrating Dataflow Evaluation into a Practical Higher-order Call-by-value Language. Ph.D. Dissertation. Providence, RI, USA.
[12]
Pascal Costanza and Robert Hirschfeld. 2005. Language Constructs for Context-oriented Programming: An Overview of ContextL. In Proceedings of the 2005 Symposium on Dynamic Languages. San Diego, USA, 1--10.
[13]
Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming (IFCP). Amsterdam, The Netherlands, 263--273.
[14]
Firefox. 2020. A free and open-source Web browser. (2020). https://www.mozilla.org (v77.0).
[15]
M. L. Gassanenko. 1998. Context-Oriented Programming. In euroFORTH. Schloss Dagstuhl, Germany.
[16]
Sebastián González, Nicolás Cardozo, Kim Mens, Alfredo Cádiz, Jean-Christophe Libbrecht, and Julien Goffaux. 2011. Subjective-C: Bringing Context to Mobile Platform Programming. In Proceedings of the Third International Conference on Software Language Engineering. Eindhoven, The Netherlands, 246--265.
[17]
Google Chrome. 2020. A free and open-source Web browser. (2020). https://www.google.com/chrome (v83.0.4103.61).
[18]
William G. Griswold, Kevin Sullivan, Yuanyuan Song, Macneil Shonle, Nishit Tewari, Yuanfang Cai, and Hridesh Rajan. 2006. Modular Software Design with Crosscutting Interfaces. IEEE Software 23, 1 (2006), 51--60.
[19]
Kris Gybels and Johan Brichau. 2003. Arranging Language Features for More Robust Pattern-based Crosscuts. In International Conference on Aspect-Oriented Software Development (AOSD). Boston, USA, 60--69.
[20]
Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. 2008. Context-oriented Programming. Journal of Object Technology 7, 3 (March-April 2008), 125--151.
[21]
Tetsuo Kamina and Tomoyuki Aotani. 2018. Harmonizing Signals and Events with a Lightweight Extension to Java. The Art, Science, and Engineering of Programming 2, 3 (March 2018), 1--29.
[22]
Tetsuo Kamina and Tomoyuki Aotani. 2019. TinyCORP: A Calculus for Context-Oriented Reactive Programming. In Proceedings of the Workshop on Context-Oriented Programming (COP). London, UK, 1--8.
[23]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2011. EventCJ: A Context-oriented Programming Language with Declarative Event-based Context Transition. In Proceedings of the Tenth International Conference on Aspect-oriented Software Development. Porto de Galinhas, Brazil, 253--264.
[24]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2016. Generalized Layer Activation Mechanism for Context-Oriented Programming. LNCS Transactions on Modularity and Composition 9800 (2016), 123--166.
[25]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2017. Push-based reactive layer activation in context-oriented programming. In Proceedings of the 9th International Workshop on Context-Oriented Programming (COP). Barcelona, Spain, 17--22.
[26]
Roger Keays and Andry Rakotonirainy. 2003. Context-oriented programming. In Proceedings of the 3rd ACM international workshop on Data engineering for wireless and mobile. San Diego, USA, 9--16.
[27]
G. Kiczales, J. Irwin, J. Lamping, J. Loingtier, C.V. Lopes, C. Maeda, and A. Mendhekar. 1996. Aspect Oriented Programming. In Special Issues in Object-Oriented Programming. Max Muehlhaeuser (general editor) et al.
[28]
Paul Leger, Grecia Gálvez, Lino Cubillos, Diego Cosmelli, Milton Inostroza, Éric Tanter, Gina Luci, and Jorge Soto Andrade. 2014. ECOCAM, un sistema computacional adaptable al contexto para promover estrategias de cálculo mental: características de su diseño y resultados preliminares. Revista Latinoamericana de Investigación en Matemática Educativa 17, 1 (March 2014), 33--58.
[29]
Jens Lincke, Malte Appeltauer, Bastian Steinert, and Robert Hirschfeld. 2011. An Open Implementation for Context-oriented Layer Composition in ContextJS. Science of Computer Programming 76, 12 (Dec. 2011), 1194--1209.
[30]
Leo Meyerovich, Arjun Guha, Jacob Baskin, Gregory Cooper, Michael Greenberg, Aleks Bromfield, and Shriram Krishnamurthi. 2009. Flapjax: A Programming Language for Ajax Applications. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications. Orlando, Florida, USA, 1--20.
[31]
NodeJS. 2020. A JavaScript runtime built for the server side. (2020). https://nodejs.org (v13.6.0).
[32]
Stefan Ramson, Jens Lincke, and Robert Hirschfeld. 2017. The declarative nature of implicit layer activation. In Proceedings of the International Workshop on Context-Oriented Programming (COP). London, UK, 7--16.
[33]
Patrick Rein, Robert Hirschfeld, Stefan Lehmann, and Jens Lincke. 2016. Compatibility Layers for Interface Mediation at Run-Time. In Companion Proceedings of the 15th International Conference on Modularity. Málaga, Spain, 113--118.
[34]
Patrick Rein, Stefan Ramson, Jens Lincke, Tim Felgentreff, and Robert Hirschfeld. 2017. Group-Based Behavior Adaptation Mechanisms in Object-Oriented Systems. IEEE Software 34, 6 (Nov. 2017), 78--82.
[35]
RI-JS Website. 2019. A COP practical library that uses Interfaces for COP in JavaScript. (April 2019). http://pleger.cl/sites/raijs
[36]
RxJS. 2018. Reactive Extensions for JavaScript. (2018). https://rxjs.dev
[37]
Guido Salvaneschi, Carlo Ghezzi, and Matteo Pradella. 2012. Context-oriented programming: A software engineering perspective. Journal of Systems and Software 85, 8 (Aug. 2012), 1801--1817.
[38]
M. Satyanarayanan. 2001. Pervasive computing: Vision and challenges. IEEE Personal Communications 8, 4 (Aug. 2001), 10--17.
[39]
Friedrich Steimann, Thomas Pawlitzki, Sven Apel, and Christian Kästner. 2010. Types and Modularity for Implicit Invocation with Implicit Announcement. ACM Transactions on Software Engineering and Methodology 20, 1 (June 2010), Article 1.
[40]
Maximilian Stoerzer and Juergen Graf. 2005. Using pointcut delta analysis to support evolution of aspect-oriented software. In IEEE International Conference on Software Maintenance (ICSM). Budapest, Hungary, 653--656.
[41]
Éric Tanter. 2008. Expressive Scoping of Dynamically-Deployed Aspects. In Proceedings of the 7th ACM International Conference on Aspect-Oriented Software Development (AOSD). Brussels, Belgium, 168--179.
[42]
Éric Tanter. 2009. Beyond Static and Dynamic Scope. In Proceedings of the 5th ACM Dynamic Languages Symposium (DLS 2009). Orlando, FL, USA, 3--14.
[43]
Éric Tanter, Johan Fabry, Rémi Douence, Jacques Noyé, and Mario Südholt. 2009. Expressive Scoping of Distributed Aspects. In Proceedings of the 8th ACM International Conference on Aspect-Oriented Software Development (AOSD 2009). Charlottesville, USA, 27--38.
[44]
Rodolfo Toledo, Paul Leger, and Éric Tanter. 2010. AspectScript: Expressive Aspects for the Web. In Proceedings of the 9th ACM International Conference on Aspect-Oriented Software Development (AOSD). Rennes and Saint Malo, France, 13--24.
[45]
David Ungar, Harold Ossher, and Doug Kimelman. 2014. Korz: Simple, symmetric, subjective, context-oriented programming. In Onward! 2014 - Proceedings of the 2014 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software, Part of SPLASH 2014. Portland, USA, 113--131.
[46]
Jorge Vallejos, Sebastián González, Pascal Costanza, Wolfgang De Meuter, Theo D'Hondt, and Kim Mens. 2010. Predicated Generic Functions: Enabling Context-Dependent Method Dispatch. In SC'10: Proceedings of the 9th international conference on Software Composition. Malaga, Spain, 66--81.
[47]
Martin von Löwis, Marcus Denker, and Oscar Nierstrasz. 2007. Context-oriented Programming: Beyond Layers. In Proceedings of International Conference on Dynamic Languages. Lugano, Switzerland, 143--156.
[48]
Martin von Löwis, Marcus Denker, and Oscar Nierstrasz. 2007. Context-Oriented Programming: Beyond Layers. In Proceedings of the International Conference on Dynamic Languages (ICDL 2007). 143--156.
[49]
Takuo Watanabe. 2018. A Simple Context-Oriented Programming Extension to an FRP Language for Small-Scale Embedded Systems. In Proceedings of the 10th International Workshop on Context-Oriented Programming: Advanced Modularity for Run-time Composition. Amsterdam, Netherlands, 23--30.

Cited By

View all
  • (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

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
COP '20: Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity
July 2020
35 pages
ISBN:9781450381444
DOI:10.1145/3422584
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]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 18 October 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Activation Mechanisms
  2. Context-Oriented Programming
  3. Interfaces
  4. JavaScript
  5. Reactive Programming

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

SPLASH '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 17 of 25 submissions, 68%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (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

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media