Stefan Ramson, Jens Lincke, Harumi Watanabe, R. Hirschfeld
{"title":"Zone-based Layer Activation: Context-specific Behavior Adaptations across Logically-connected Asynchronous Operations","authors":"Stefan Ramson, Jens Lincke, Harumi Watanabe, R. Hirschfeld","doi":"10.1145/3422584.3422764","DOIUrl":"https://doi.org/10.1145/3422584.3422764","url":null,"abstract":"Scoping behavior adaptations using dynamic extent is a crucial part of Context-oriented Programming (COP). In a synchronous execution model, dynamic extent ensures the activation of a layer for the entire duration of a block. An asynchronous execution model, however, breaks the intended semantics of dynamic extent. For example, using the await keyword postpones the execution of the block and returns to its caller. Thus, dynamic extent deactivates the behavior adaptation. Consequently, when resuming the postponed execution the layer is no longer active. In this paper, we propose a variant of dynamic extent that activates a layer for a block and all its logically-connected asynchronous operations. We show how zones can be used to track the asynchronous dynamic extent of a block. Further, we provide an implementation of our approach as an extension to ContextJS in JavaScript.","PeriodicalId":192954,"journal":{"name":"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity","volume":"14 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126996729","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Interfaces for Modular Reasoning in Context-Oriented Programming","authors":"Paul Leger, H. Masuhara, Ismael Figueroa","doi":"10.1145/3422584.3423152","DOIUrl":"https://doi.org/10.1145/3422584.3423152","url":null,"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.","PeriodicalId":192954,"journal":{"name":"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity","volume":"28 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115788379","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Adaptive Variables for Declarative UAV Planning","authors":"John Henry Burns, Xiaozhou Liang, Yu David Liu","doi":"10.1145/3422584.3422763","DOIUrl":"https://doi.org/10.1145/3422584.3422763","url":null,"abstract":"Unmanned Aerial Vehicles (UAVs) are an important subset of autonomous robotics, offering unique opportunities in domains like merchandise delivery, geographical survey, and disaster recovery. The planning layer of UAVs is made up of high-level directives that instruct the system on how to achieve the plan's goals. UAVs execute their plans in the physical environment, and thus the plans must adapt to changes in the dynamic context. In this paper, we present a simple programming abstraction, adaptive variables, to declaratively define adaptation for UAV flight plans in a dynamic context. Building on top of a declarative language for expressing UAV flight plans, adaptive variables can change during a UAV flight based on predicates over physical data. We implement adaptive variable for Paparazzi and demonstrate its usefulness in adaptive UAV planning with the NPS Simulator.","PeriodicalId":192954,"journal":{"name":"Proceedings of the 12th ACM International Workshop on Context-Oriented Programming and Advanced Modularity","volume":"34 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-07-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125438930","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}