{"title":"Context Slices: Lightweight discovery of behavioral adaptations","authors":"Nicolás Cardozo, S. Clarke","doi":"10.1145/2786545.2786554","DOIUrl":"https://doi.org/10.1145/2786545.2786554","url":null,"abstract":"Context-Oriented Programming languages enable the definition of systems that can adapt their behavior according to specific situations in their surrounding environment. Current approaches require developers to have prior knowledge about such situations and the adaptations applicable in each one. Such approach hinders the use of Context-Oriented Programming in modern open systems, in which the totality of the system may be unknown beforehand. We propose context slices which allow the autonomous discovery and composition of adaptations gathered from systems' surrounding environment. Context slices use zero configuration networking services to advertise and discover adaptations in the network, and an ontology structure to manage them. We show the applicability of context slices for cyber physical systems by means of an ambient assisted living scenario.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"354 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116319090","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}
T. Kamina, Tomoyuki Aotani, H. Masuhara, Atsushi Igarashi
{"title":"Method Safety Mechanism for Asynchronous Layer Deactivation","authors":"T. Kamina, Tomoyuki Aotani, H. Masuhara, Atsushi Igarashi","doi":"10.1145/2786545.2786550","DOIUrl":"https://doi.org/10.1145/2786545.2786550","url":null,"abstract":"We propose a context-oriented programming (COP) language that allows layers to define base methods, while layers can be asynchronously activated and deactivated. Base methods in layers greatly enhances modularity because they extend classes' interface without modifying the original class definitions. However, calling such a method defined in a layer is tricky as the layer may not be active when the method is called. We tackle this problem by introducing a method lookup mechanism that uses the lexical scope of a method invocation to COP; i.e., besides currently activated layers, the layer where the method invocation is written, as well as layers on which that layer depends, are considered for method lookup. We implemented this mechanism in ServalCJ, a COP language that supports asynchronous layer activation as well as synchronous layer activation.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"98 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125453912","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}
Baptiste Maingret, Frédéric Le Mouël, Julien Ponge, N. Stouls, Jian Cao, Y. Loiseau
{"title":"Towards a Decoupled Context-Oriented Programming Language for the Internet of Things","authors":"Baptiste Maingret, Frédéric Le Mouël, Julien Ponge, N. Stouls, Jian Cao, Y. Loiseau","doi":"10.1145/2786545.2786552","DOIUrl":"https://doi.org/10.1145/2786545.2786552","url":null,"abstract":"Easily programming behaviors is one major issue of a large and reconfigurable deployment in the Internet of Things. Such kind of devices often requires to externalize part of their behavior such as the sensing, the data aggregation or the code offloading. Most existing context-oriented programming languages integrate in the same class or close layers the whole behavior. We propose to abstract and separate the context tracking from the decision process, and to use event-based handlers to interconnect them. We keep a very easy declarative and non-layered programming model. We illustrate by defining an extension to Golo - a JVM-based dynamic language.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132997663","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":"Connecting Object Constraints with Context-oriented Programming: Scoping Constraints with Layers and Activating Layers with Constraints","authors":"Stefan Lehmann, T. Felgentreff, R. Hirschfeld","doi":"10.1145/2786545.2786549","DOIUrl":"https://doi.org/10.1145/2786545.2786549","url":null,"abstract":"Context-oriented Programming extends object-oriented languages with a mechanism to dynamically adapt behavior. Object Constraint Programming orthogonally extends object-oriented run-times by integrating constraints, including support for constraints over mutable state, object identity, and the results of message sends. Using these two language extensions in conjunctions offers interesting opportunities. In this paper, we report on new mechanisms involving layers and constraints that evolved from our experiences with combining Babelsberg/JS, an Object Constraint Language, and ContextJS, an implementation of Context-oriented Programming in JavaScript. First, our experience shows that it is desirable to dynamically adapt declarative constraints, which offer an orthogonal mechanism to the definition of imperative behavior, likewise at runtime. In this work, we show an extension to ContextJS to scope activation or refinement of constraints dynamically using layers. Second, ContextJS already provides different activation mechanisms for layers, including dynamically or structurally scoped, or globally through system generated events. Constraints provide an activation mechanism based on arbitrary boolean expressions changing their value, allowing for interesting applications of behavioral adaption based on certain conditions.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"17 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"120958918","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}
Harumi Watanabe, Midori Sugaya, Ikuta Tanigawa, Nobuhiko Ogura, K. Hisazumi
{"title":"A Study of Context-Oriented Programming for Applying to Robot Development","authors":"Harumi Watanabe, Midori Sugaya, Ikuta Tanigawa, Nobuhiko Ogura, K. Hisazumi","doi":"10.1145/2786545.2786551","DOIUrl":"https://doi.org/10.1145/2786545.2786551","url":null,"abstract":"Next generation robot is expected to provide multi-purpose services depending on surrounding environments. Currently, many of robots would support a limited services, since it is difficult to solve the cross-cutting concerns in those complex services. Additionally, after the launch of robot products, it requires to support additional extended services that would depend on the real environment, even if the hardware environment would be the same. We believe that the essential idea of Context-oriented programming (COP) could help these difficulties. To achieve our final goal, which is to develop a multi-purpose services robot, there are some discussions needed for the current COP languages to satisfy the multi-purpose service robot requirements. In this paper, firstly we introduce the background of our proposal that the current robotics problems and future vision, then a case study of a tunnel rescue robot that will make clear to our goal for robot development based on COP. Finally, to achieve this goal we present a novel architecture. The proposed architecture will satisfy the requirements of the future robot.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121924612","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":"Efficient Layered Method Execution in ContextAmber","authors":"M. Springer, Jens Lincke, R. Hirschfeld","doi":"10.1145/2786545.2786548","DOIUrl":"https://doi.org/10.1145/2786545.2786548","url":null,"abstract":"We present ContextAmber, a framework for context-oriented programming, in Amber Smalltalk, an implementation of the Smalltalk programming language that compiles to JavaScript. ContextAmber is implemented using metaprogramming facilities and supports global, object-wise, and scoped layer activation. Current COP implementations come at the expense of significantly reduced execution performance due to multiple partial method invocations and layer composition computations every time a layered method is invoked. ContextAmber can reduce this overhead by inlining partial methods, caching layer compositions, and caching inlined layered methods, resulting in a runtime overhead of about 5% in our vector graphics rendering benchmarks.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"27 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123483135","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":"Type-Safe Layer-Introduced Base Functions with Imperative Layer Activation","authors":"Tomoyuki Aotani, T. Kamina, H. Masuhara","doi":"10.1145/2786545.2786553","DOIUrl":"https://doi.org/10.1145/2786545.2786553","url":null,"abstract":"Layer-introduced base methods, which are the methods with new signatures in a layer and are added to a class, give layers more freedom to organize definitions of context-dependent behavior. However, we need to be careful so as not to call a layer-introduced base method while the layers that provide the method are inactive. Type-based solutions would help to avoid such a problematic situation, but existing ones are limited to context-oriented programming (COP) languages that have dynamically-scoped (i.e., the \"with\" based) layer activation. We propose a COP framework in Haskell that supports both imperative and dynamically-scoped layer activation mechanisms, as well as layer-introduced base functions. By representing a context as a stack of active layers in a type of a function in Haskell, type safety---including the guarantee of activation of a layer that provides a layer-introduced function---is checked by Haskell's type system. This paper shows how our framework encodes COP features in Haskell using a simple example.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"141 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122950647","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":"Context-Oriented Image Processing: Reconciling genericity and performance through contexts","authors":"D. Verna, François Ripault","doi":"10.1145/2786545.2786547","DOIUrl":"https://doi.org/10.1145/2786545.2786547","url":null,"abstract":"Genericity aims at providing a very high level of abstraction in order, for instance, to separate the general shape of an algorithm from specific implementation details. Reaching a high level of genericity through regular object-oriented techniques has two major drawbacks, however: code cluttering (e.g. class / method proliferation) and performance degradation (e.g. dynamic dispatch). In this paper, we explore a potential use for the Context-Oriented programming paradigm in order to maintain a high level of genericity in an experimental image processing library, without sacrificing either the performance or the original object-oriented design of the application.","PeriodicalId":339332,"journal":{"name":"Proceedings of the 7th ACM International Workshop on Context-Oriented Programming","volume":"38 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2015-07-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115892636","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}