T. Rho, M. Appeltauer, Stephan Lerche, A. Cremers, R. Hirschfeld
{"title":"A context management infrastructure with language integration support","authors":"T. Rho, M. Appeltauer, Stephan Lerche, A. Cremers, R. Hirschfeld","doi":"10.1145/2068736.2068739","DOIUrl":"https://doi.org/10.1145/2068736.2068739","url":null,"abstract":"A range of context-management systems in the past have motivated the need for development support of context-aware applications. They typically provide APIs and query languages for context analysis. Reacting to context changes, however, is either not at all or only to a limited extend supported by adhering to constraints of a framework. In this paper, we present a context-management system that combines context reasoning with context-dependent behavior by taking advantage of language approaches to dynamic adaptation, such as aspect- and context-oriented programming. Our framework is open for different levels of integration with programming language extensions and offers a dynamic, strategy-based aggregation of local and distributed context sources. As a first step, we implemented a query library for the JCop language. We present its API and show the implementation of an example application.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131622957","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":"Implementing scoped method tracing with ContextJS","authors":"Jens Lincke, R. Krahn, R. Hirschfeld","doi":"10.1145/2068736.2068742","DOIUrl":"https://doi.org/10.1145/2068736.2068742","url":null,"abstract":"Customized method tracers can be a valuable tool for debugging and program comprehension. They allow to declaratively specify what parts of the call graph should be captured and are an alternative to tedious manual debugging techniques. Method tracers are easy to implement in dynamic languages but avoiding multiple method instrumentation and recursion in the client code can become complex. In this paper we show how Context-oriented Programming (COP) can be leveraged to address such issues. Our approach is based on ContextJS, a COP implementation for JavaScript, which provides scoping mechanisms and an infrastructure for method instrumentation. These abstractions allow to separate target and tracer logic so that self-referentiality is avoided.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"267 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122750825","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":"CJAdviser: SMT-based debugging support for ContextJ","authors":"S. Uchio, Naoyasu Ubayashi, Yasutaka Kamei","doi":"10.1145/2068736.2068743","DOIUrl":"https://doi.org/10.1145/2068736.2068743","url":null,"abstract":"Context-awareness plays an important role in developing flexible and adaptive software. However, it is not easy to write context-aware programs because context cannot be treated as a module in the traditional programming languages. COP (Context-Oriented Programming) languages such as ContextJ* enable programmers to describe the context-aware behavior elegantly. The primary system behavior can be separated from the context-aware behavior. On the other hand, unfortunately, it becomes difficult to debug the programs due to the complexity of COP execution and the dependence between objects and contexts. To deal with this problem, this paper proposes CJAdviser, SMT-based debugging support for ContextJ*. In CJAdviser, the execution trace of a ContextJ* program is converted to a context dependence graph that can be analyzed by the SMT (Satisfiability Modulo Theories) solver Yices. Using CJAdviser, we can check a variety of object-context dependencies such as \"Do two objects A and B exist in the Context X at the same time?\". In CJAdviser, SMT is applied to not static analysis but dynamic analysis because many context-aware properties are determined at run time.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"91 2 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127428078","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}
Christopher Schuster, M. Appeltauer, R. Hirschfeld
{"title":"Context-oriented programming for mobile devices: JCop on Android","authors":"Christopher Schuster, M. Appeltauer, R. Hirschfeld","doi":"10.1145/2068736.2068741","DOIUrl":"https://doi.org/10.1145/2068736.2068741","url":null,"abstract":"The behavior of mobile applications is particularly affected by their execution context, such as location and state a the mobile device. Among other approaches, context-oriented programming can help to achieve context-dependent behavior without sacrificing modularity or adhering to a certain framework or library by enabling fine-grained adaptation of default behavior per control-flow. However, context information relevant for mobile applications is mostly defined by external events and sensor data rather than by code and control flow. To accommodate this, the JCop language provides a more declarative approach by pointcut-like adaptation rules. In this paper, we explain how we applied JCop to the development of Android applications for which we extended the language semantics for static contexts and modified the compiler. Additionally, we outline the successful implementation of a simple, proof-of-concept mobile application using our approach and report on promising early evaluation results.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"34 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126319896","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}
Nicolás Cardozo, Sebastián González, K. Mens, T. D'Hondt
{"title":"Safer context (de)activation: through the prompt-loyal strategy","authors":"Nicolás Cardozo, Sebastián González, K. Mens, T. D'Hondt","doi":"10.1145/2068736.2068738","DOIUrl":"https://doi.org/10.1145/2068736.2068738","url":null,"abstract":"Context-oriented programming languages provide language abstractions for the dynamic activation and deactivation of behavioral adaptations, based on the system's context of execution. As contexts are freely activated and deactivated, their associated behavior adaptations are added and removed to and from the system, which may break its consistency with respect to other available adaptations. To manage consistency between adaptations this paper introduces a model for the safe activation and deactivation of contexts. The model consists of two approaches, prompt-loyal for a delayed context (de)activation, and prompt for an immediate context (de)activation.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"283 12","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"120895945","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":"Featherweight EventCJ: a core calculus for a context-oriented language with event-based per-instance layer transition","authors":"Tomoyuki Aotani, T. Kamina, H. Masuhara","doi":"10.1145/2068736.2068737","DOIUrl":"https://doi.org/10.1145/2068736.2068737","url":null,"abstract":"We propose Featherweight EventCJ, which is a small calculus for context-oriented languages with event-based per-instance layer controls like EventCJ. It extends ContextFJ with stores, labels and transitions for modeling the per-instance layer management, events and declarative layer transition rules, respectively.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"56 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124368679","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":"JavaCtx: seamless toolchain integration for context-oriented programming","authors":"G. Salvaneschi, C. Ghezzi, Matteo Pradella","doi":"10.1145/2068736.2068740","DOIUrl":"https://doi.org/10.1145/2068736.2068740","url":null,"abstract":"Context-oriented programming is an emerging paradigm addressing at the language level the issue of dynamic software adaptation and modularization of context-specific concerns. In this paper we propose JavaCtx, a tool which employs coding conventions to generate the context-aware semantics for Java programs and subsequently weave it into the application. The contribution of JavaCtx is twofold: the design of a set of coding conventions which allow to write context-oriented software in plain Java and the concept of context-oriented semantics injection, which allows to introduce the context-aware semantics through standard aspect-oriented programming. Both of these points allow to seamless integrate JavaCtx in the existing industrial-strength appliances and so ease the development of context-oriented software in consolidated industrial settings.","PeriodicalId":202850,"journal":{"name":"Proceedings of the 3rd ACM International Workshop on Context-Oriented Programming","volume":"53 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2011-04-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117291547","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}