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

PLAM: Preemptive Layer Activation Architecture based on Multithreading in Context-Oriented Programming

Published: 18 October 2020 Publication History

Abstract

In recent years, with the development of embedded software, the demand for context-aware software and the need for Context-Oriented Programming (COP) frameworks is increasing. In general, within the COP framework, each method is managed in units of layers, and time is required to activate the layers following context changes. Compared to the traditional single-thread method, the use of multi-threading to control the layer activation doubles the system efficiency. Moreover, embedded software usually includes mechanisms for exception handling, such as communication disconnection, mechanical or hardware failures, and insufficient energy. These mechanisms are expected to be types of high-priority operations, which also require multi-threading to achieve preemptive layer activation. In this study, we propose an architecture for preemptive layer activation known as PLAM by using multi-threading, which is based on the RTCOP framework. Using PLAM, the non-exception handling layers can be activated simultaneously, and when the context of the exception handling layer is perceived, the program can call a certain function to suspend or terminate the activation process of the other layers. Finally, we package a series of functions as APIs so that users can use these to customize the context listener. A test application confirms the feasibility of the proposed approach.

References

[1]
Watanabe, H., Sugaya, M., Tanigawa, I., Ogura, N., and Hisazumi, K. 2015. A Study of Context-Oriented Programming for Applying to Robot Development. In Proceedings of the 7th International Workshop on Context-Oriented Programming (COP'15). Association for Computing Machinery, New York, NY, USA, Article 4, 1--6.
[2]
Robert H., Pascal C., Oscar N. 2008. "Context-oriented Programming", Journal of Object Technology, Volume 7, no. 3, pp. 125-151.
[3]
Kamina, T., Aotani, T., Masuhara, H., and Tamai, T. 2014. Context-oriented software engineering: a modularity vision. In Proceedings of the 13th international conference on Modularity (MODULARITY '14). Association for Computing Machinery, New York, NY, USA, 85--98.
[4]
Saeki, Y., Tanigawa, I., Hisazumi, K., and Fukuda, A. 2018. ContextROS: A Context-Oriented Framework for the Robot Operating System. Proceedings of the Asia Pacific Conference on Robot IoT System Development and Platform 2018 (APRIS2018), 1--6.
[5]
Ohkawa, T., Tanigawa, I., Sato, M., Hisazumi, K., Ogura, N., and Watanabe, H. 2019. Prototype of FPGA Dynamic Reconfiguration Based-on Context-Oriented Programming. 2019 IEEE 13th International Symposium on Embedded Multicore/Many-core Systems-on-Chip (MCSoC), 116--122.
[6]
Cocchioni, F., Mancini, A., and Longhi, S. 2014. Autonomous navigation, landing and recharge of a quadrotor using artificial vision. 2014 International Conference on Unmanned Aircraft Systems (ICUAS). IEEE, 418--429.
[7]
Appeltauer, M., Hirschfeld, R., Haupt, M., and Masuhara, H. 2009. ContextJ: Context-oriented Programming with Java. In Proceedings of the JSSST Annual Conference (2009), 1--15.
[8]
Lincke, J., Appeltauer, M., Steinert, B., and Hirschfeld, R. 2011. An open implementation for context-oriented layer composition in ContextJS. Science of Computer Programming 76(12), 1194--1209.
[9]
Garcia, F. and Fernandez, J. 2000. POSIX thread libraries. Linux Journal 2000(70es).
[10]
Sarkar, S., Memarian, K., Owens, S., Batty, M., Sewell, P., Maranget, L., Alglave, J., and Williams, D. 2012. Synchronising C/C++ and POWER. In Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '12). Association for Computing Machinery, New York, NY, USA, 311--322.
[11]
Tanigawa, I., Hisazumi, K., Ogura, N., Sugaya, M., Watanabe, H., and Fukuda, A. 2019. RTCOP: Context-Oriented Programming Framework based on C++ for Application in Embedded Software. In Proceedings of the 2019 2nd International Conference on Information Science and Systems (ICISS 2019). Association for Computing Machinery, New York, NY, USA, 65--72.
[12]
Tanigawa, I., Ogura, N., Sugaya, M., Watanabe, H., and Hisazumi, K. 2015. A structure of a c# framework ContextCS based on context-oriented programming. In Companion Proceedings of the 14th International Conference on Modularity (MODULARITY Companion 2015). Association for Computing Machinery, New York, NY, USA, 21--22.
[13]
Thoman, P., Gschwandtner, P., and Fahringer, T. 2015. On the Quality of Implementation of the C++11 Thread Support Library. In Proceedings of the 2015 23rd Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP 2015). IEEE Computer Society, USA, 94--98.
[14]
Rasche, A., Schult, W., and Polze, A. 2005. Self-adaptive multithreaded applications: a case for dynamic aspect weaving. In Proceedings of the 4th workshop on Reflective and adaptive middleware systems (ARM '05). Association for Computing Machinery, New York, NY, USA.

Cited By

View all
  • (2023)Temporal Layers: Reactive Activation Scope of First-Class Layer InstancesProceedings of the 15th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3605154.3605852(9-14)Online publication date: 17-Jul-2023

Index Terms

  1. PLAM: Preemptive Layer Activation Architecture based on Multithreading in Context-Oriented Programming

Recommendations

Comments

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. COP
  2. Embedded software
  3. layer activation
  4. multi-threading

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • JSPS KAKENHI

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)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 08 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Temporal Layers: Reactive Activation Scope of First-Class Layer InstancesProceedings of the 15th ACM International Workshop on Context-Oriented Programming and Advanced Modularity10.1145/3605154.3605852(9-14)Online publication date: 17-Jul-2023

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