Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3605154.3605852acmconferencesArticle/Chapter ViewAbstractPublication PagesecoopConference Proceedingsconference-collections
research-article

Temporal Layers: Reactive Activation Scope of First-Class Layer Instances

Published: 17 July 2023 Publication History

Abstract

Context-Oriented Programming (COP) is an approach to improve modularity of context-dependent behaviors. Most COP languages modularize context-dependent behaviors using layers, which are rarely instantiated explicitly. Using the existing layer mechanism, it is difficult to express a context like "a situation where several objects are selected in a GUI window." To tackle this problem, we propose a new type of layers, which we call temporal layers. A temporal layer is different from existing layers in that it is used by creating its instance, and the extent of its activation is its lifetime. The scope of its activation can be defined by declaratively specifying the exclusion condition in the layer's enclosing partial classes. This scope can be dynamically and reactively changing. Using a temporal layer, we show a case study of contextual timetraveling, which demonstrates the effectiveness of our proposal.

References

[1]
Malte Appeltauer, Robert Hirschfeld, Michael Haupt, and Hidehiko Masuhara. 2011. ContextJ: Context-oriented programming with Java. Computer Software, 28, 1 (2011), 272–292.
[2]
Malte Appeltauer, Robert Hirschfeld, and Hidehiko Masuhara. 2009. Improving the Development of Context-dependent Java application with ContextJ. In COP’09.
[3]
Malte Appeltauer, Robert Hirschfeld, Hidehiko Masuhara, Michael Haupt, and Kazunori Kawauchi. 2010. Event-specific Software Composition in Context-oriented Programming. In Proceedings of the International Conference on Software Composition 2010 (SC’10) (LNCS, Vol. 6144). 50–65.
[4]
Matteo Baldoni, Guido Boella, and Leendert van der Torre. 2006. PowerJava: Ontologically Founded Roles in Object Oriented Programming Languages. In Proceedings of the 2006 ACM Symposium on Applied Computing (SAC’06). 1414––1418.
[5]
Shigeru Chiba, Atsushi Igarashi, and Salikh Zakirov. 2010. Mostly Modular Compilation of Crosscutting Concerns by Contextual Predicate Dispatch. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA’10). 539––554.
[6]
Pascal Costanza and Robert Hirschfeld. 2005. Language Constructs for Context-oriented Programming – An Overview of ContextL. In Dynamic Language Symposium (DLS) ’05. 1–10.
[7]
Conal Elliott and Paul Hudak. 1997. Functional Reactive Animation. In Proceedings of the 2nd ACM SIGPLAN International Conference on Functional Programming (ICFP’97). 263–273. https://doi.org/10.1145/258949.258973
[8]
Hiroaki Fukuda, Paul Leger, and Nicolás Cardozo. 2022. Layer Activation Mechanism for Asynchronous Executions in JavaScript. In Proceedings of the 14th ACM International Workshop on Context-Oriented Programming and Advanced Modularity (COP’22). 1–8.
[9]
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 SLE’10 (LNCS, Vol. 6563). 246–265.
[10]
Sebastián González, Kim Mens, and Alfredo Cádiz. 2008. Context-Oriented Programming with the Ambient Object Systems. Journal of Universal Computer Science, 14, 20 (2008), 3307–3332.
[11]
Stephan Herrmann. 2003. Object Teams: Improving Modularity for Crosscutting Collaborations. In Objects, Components, Architectures, Services, and Applications for a Networked World. 248–264.
[12]
Robert Hirschfeld, Pascal Costanza, and Oscar Nierstrasz. 2008. Context-oriented Programming. Journal of Object Technology, 7, 3 (2008), 125–151.
[13]
Hiroaki Inoue and Atsushi Igarashi. 2016. A Library-Based Approach to Context-Dependent Computation with Reactive Values. In MODULARITY Companion’16. 50–54.
[14]
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 (2018), https://doi.org/10.22152/programming-journal.org/2018/2/5
[15]
Tetsuo Kamina and Tomoyuki Aotani. 2019. An Approach for Persistent Time-Varying Values. In Onward!’19. 17–31.
[16]
Tetsuo Kamina and Tomoyuki Aotani. 2019. TinyCORP: A Calculus for Context-Oriented Reactive Programming. In COP’19. 1–8.
[17]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2011. EventCJ: a context-oriented programming language with declarative event-based context transition. In AOSD ’11. 253–264.
[18]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2015. Generalized Layer Activation Mechanism Through Contexts and Subscribers. In MODULARITY’15. 14–28.
[19]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2017. Push-based Reactive Layer Activation in Context-Oriented Programming. In COP’17. 17–21.
[20]
Tetsuo Kamina, Tomoyuki Aotani, and Hidehiko Masuhara. 2021. Signal Classes: A Mechanism for Building Synchronous and Persistent Signal Networks. In ECOOP 2021 (LIPIcs, Vol. 194). 19:1–19:30.
[21]
Tetsuo Kamina and Sota Ueno. 2022. Distributed Persistent Signals: Architecture and Implementation. In REBLS 2022: Proceedings of the 9th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems. 13–23.
[22]
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 (2011), 1194–1209.
[23]
Zihan Liu, Ikuta Tanigawa, Harumi Watanabe, and Kenji Hisazumi. 2020. PLAM: Preemptive Layer Activation Architecture Based on Multithreading in Context-Oriented Programming. In Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity (COP’20). 4:1–4:8.
[24]
Stefan Ramson, Jens Lincke, Harumi Watanabe, and Robert Hirschfeld. 2020. Zone-Based Layer Activation: Context-Specific Behavior Adaptations across Logically-Connected Asynchronous Operations. In Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity (COP’20). 2:1–2:10.
[25]
Guido Salvaneschi, Gerold Hintz, and Mira Mezini. 2014. REScala: Bridging between object-oriented and functional style in reactive applications. In Proceedings of the 13th International Conference on Modularity (MODULARITY’14). 25–36. https://doi.org/10.1145/2577080.2577083
[26]
Tetsuo Tamai, Naoyasu Ubayashi, and Ryoichi Ichiyama. 2005. An Adaptive Object Model with Dynamic Role Binding. In International Conference on Software Engineering (ICSE 2005). 166–175.
[27]
Martin von Löwis, Marcus Denker, and Oscar Nierstrasz. 2007. Context-oriented programming: beyond layers. In ICDL ’07: Proceedings of the 2007 International Conference on Dynamic languages. 143–156.
[28]
YungYu Zhuang. 2019. A lightweight push-pull mechanism for implicitly using signals in imperative programming. Journal of Computer Languages, 54 (2019).

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
COP 2023: Proceedings of the 15th ACM International Workshop on Context-Oriented Programming and Advanced Modularity
July 2023
14 pages
ISBN:9798400702440
DOI:10.1145/3605154
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 the author(s) 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

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 17 July 2023

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Contextual timetraveling
  2. Layer activation
  3. Role-based languages

Qualifiers

  • Research-article

Funding Sources

Conference

COP '23
Sponsor:

Acceptance Rates

Overall Acceptance Rate 17 of 25 submissions, 68%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 36
    Total Downloads
  • Downloads (Last 12 months)11
  • Downloads (Last 6 weeks)1
Reflects downloads up to 12 Nov 2024

Other Metrics

Citations

View Options

Get Access

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