{"title":"Detecting Invalid Layer Combinations Using Control-Flow Analysis for Android","authors":"Noriyuki Suzuki, T. Kamina, Katsuhisa Maruyama","doi":"10.1145/2951965.2951970","DOIUrl":"https://doi.org/10.1145/2951965.2951970","url":null,"abstract":"In Context-Oriented Programming (COP), it is possible that invalid combinations between layers (a set of activated layers that violates some required properties) occur at runtime. Even though such combinations can be detected using runtime checking, it potentially requires a significant amount of cost for testing. In this paper, we propose a method to detect invalid combinations between layers using state-of-the-art control-flow analysis for Android applications. Using Android specific knowledge, such as the layout file for GUI components, reasonably precise callback sequences in Android applications are actually constructed, and our method applies this fact to the analysis of COP programs. Using a simple example, we demonstrate how our method finds invalid combinations between layers.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"16 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128886937","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":"Classes as Layers: Rewriting Design Patterns with COP: Alternative Implementations of Decorator, Observer, and Visitor","authors":"M. Springer, H. Masuhara, R. Hirschfeld","doi":"10.1145/2951965.2951968","DOIUrl":"https://doi.org/10.1145/2951965.2951968","url":null,"abstract":"This paper analyzes and presents alternative implementations of three well-known Gang of Four design patterns: Decorator, Observer, and Visitor. These implementations are more than mere refactorings and take advantage of a variant of context-oriented programming that unifies classes and layers to overcome shortcomings in a conventional, object-oriented implementation.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"10 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117046928","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":"Transaction Layers: Controlling Granularity of Change in Live Programming Environments","authors":"Toni Mattis, Patrick Rein, R. Hirschfeld","doi":"10.1145/2951965.2951969","DOIUrl":"https://doi.org/10.1145/2951965.2951969","url":null,"abstract":"Modifying source code in a live programming environment changes the behavior of currently running programs immediately. When complex changes affect multiple locations in the code before reaching a consistent state, running programs are in danger of \"de-railing\" when their control flow reaches the yet incomplete \"construction site\". Context-oriented Programming provides layers, which encapsulate code that would otherwise be scattered over many modules and can be activated to jointly adapt program behavior at run-time. We propose to transparently collect and group changes to the code in a COP layer and defer its activation until the programmer deems its change to be completed. Additionally, layer deactivation serves as immediate undo operation on the group of changes. We present and discuss a Squeak/Smalltalk prototype consisting of a code editor, which provides control over when and where such a group of changes is active, and an extension of Squeak's COP implementation ContextS/2 required for representing most code changes in a layer.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123367156","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":"A Context-Oriented Software Architecture","authors":"K. Mens, Nicolás Cardozo, Benoît Duhoux","doi":"10.1145/2951965.2951971","DOIUrl":"https://doi.org/10.1145/2951965.2951971","url":null,"abstract":"Context-aware systems must manage the dynamic selection, activation, and execution of feature variants according to changing contexts, detected from data gathered from their surrounding execution environment. Many context-oriented programming languages focus only on the implementation level by providing appropriate language abstractions for implementing behavioural variations that can adapt dynamically to changing contexts. They often ignore or presuppose the existence of mechanisms to deal with earlier aspects such as the gathering of sensory input and context discovery. In this paper we propose a layered software architecture that reconciles all these aspects in a single implementation framework, which can be customized by application programmers into actual context-aware applications. This framework is currently being implemented in Ruby on top of a reimplementation of the Phenomenal Gem context-oriented language.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"29 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127656746","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}
Nguonly Taing, Markus Wutzler, T. Springer, Nicolás Cardozo, A. Schill
{"title":"Consistent Unanticipated Adaptation for Context-Dependent Applications","authors":"Nguonly Taing, Markus Wutzler, T. Springer, Nicolás Cardozo, A. Schill","doi":"10.1145/2951965.2951966","DOIUrl":"https://doi.org/10.1145/2951965.2951966","url":null,"abstract":"Unanticipated adaptation allows context-dependent applications to overcome the limitation of foreseen adaptation by incorporating previously unknown behavior. Introducing this concept in language-based approaches leads to inconsistencies as an object can have different views in different contexts. Existing language-based approaches do not address unanticipated adaptation and its associated run-time inconsistencies. We propose an architecture for unanticipated adaptation at run time based on dynamic instance binding crafted in a loosely manner to asynchronously replace adaptable entities that allow for behavioral changes of objects. To solve inconsistencies, we introduce the notion of transactions at the object level. Transactions guard the changing objects during their execution, ensuring consistent views. This allows for disruption-free, safe updates of adaptable entities by means of consistent unanticipated adaptation.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"663 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132156153","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":"Optimizing Sideways Composition: Fast Context-oriented Programming in ContextPyPy","authors":"Tobias Pape, T. Felgentreff, R. Hirschfeld","doi":"10.1145/2951965.2951967","DOIUrl":"https://doi.org/10.1145/2951965.2951967","url":null,"abstract":"The prevalent way of code sharing in many current object systems is static and/or single inheritance; both are limiting in situations that call for multi-dimensional decomposition. Sideways composition provides a technique to reduce their limitations. Context-oriented programming (COP) notably applies sideways composition to achieve better modularity. However, most COP implementations have a substantial performance overhead. This is partly because weaving and execution of layered methods violate assumptions that common language implementations hold about lookup. Meta-tracing just-in-time (JIT) compilers have unique characteristics that can alleviate the performance overhead, as they can treat lookup differently. We show that meta-tracing JIT compilers are good at optimizing sideways composition and give initial, supporting results. Furthermore, we suggest that explicit communication with the JIT compiler in a COP implementation can improve performance further.","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-07-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129554699","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":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","authors":"","doi":"10.1145/2951965","DOIUrl":"https://doi.org/10.1145/2951965","url":null,"abstract":"","PeriodicalId":118660,"journal":{"name":"Proceedings of the 8th ACM International Workshop on Context-Oriented Programming","volume":"92 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131053695","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}