{"title":"Declarative definition of contexts with polymorphic events","authors":"Angel Núñez, Jacques Noyé, Vaidas Gasiunas","doi":"10.1145/1562112.1562114","DOIUrl":"https://doi.org/10.1145/1562112.1562114","url":null,"abstract":"This paper introduces a new model of event handling combining explicitly triggered events with events intercepted with aspect-oriented features. The model supports event abstraction, polymorphic references to events, and declarative definition of events as expressions involving references to events from other objects. We show that this model makes it easy to define a declarative and compositional notion of event-based context. We illustrate these ideas with examples in ECaesarJ, a language with concrete support for our model, and relate the events of ECaesarJ to other event-handling and context-handling models.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"157 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121050890","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":"How should context-escaping closures proceed?","authors":"D. Clarke, Pascal Costanza, É. Tanter","doi":"10.1145/1562112.1562113","DOIUrl":"https://doi.org/10.1145/1562112.1562113","url":null,"abstract":"Context-oriented programming treats execution context explicitly and provides means for context-dependent adaptation at runtime. This is achieved, for example, using dynamic layer activation and contextual dispatch, where the context consists of a layer environment of a stack of active layers. Layers can adapt existing behaviour using proceed to access earlier activated layers. A problem arises when a call to proceed is made from within a closure that escapes the layer environment in which it was defined. It is not clear how to interpret proceed when the closure is subsequently applied in a different environment, because the layers it implicitly refers to (such as the original layer and/or the remaining layers) may no longer be active. In this paper, we describe this problem in detail and present some approaches for dealing with it, though ultimately we leave the question open.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"7 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125922135","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 programming with EventJava","authors":"K. R. Jayaram, P. Eugster","doi":"10.1145/1562112.1562121","DOIUrl":"https://doi.org/10.1145/1562112.1562121","url":null,"abstract":"Recent research on Distributed Event-based Systems (DEBS) has focussed on event correlation, which is the task of processing events to identify meaningful patterns of events in the event cloud. In DEBS, software components communicate by generating, disseminating and receiving event notifications, which reify and describe the event. Several parts of an event notification are context-sensitive, depending on where the software component producing the event is deployed, the communication infrastructure available for event dissemination etc. Event contexts may be added during the production of an event (e.g. by the runtime system executing the component) or during dissemination (by a middleware) and play an integral part in event correlation. Examples of contextual information include physical time, logical time, geographical coordinates, information about the source of events, digital signatures, etc. EventJava [7], an extension of Java with advanced support for event correlation, explicitly integrates the notion of event context, thereby allowing a programmer to customize the way in which events are ordered, propagated and correlated with other events. In this paper, we explain why contexts are indispensable to DEBS, present an overview of EventJava and illustrate the use of contexts through programming examples.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"41 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121307072","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":"Improving the development of context-dependent Java applications with ContextJ","authors":"M. Appeltauer, R. Hirschfeld, H. Masuhara","doi":"10.1145/1562112.1562117","DOIUrl":"https://doi.org/10.1145/1562112.1562117","url":null,"abstract":"Context-oriented programming languages ease the design and implementation of context-dependent applications. ContextJ is a context-oriented extension to the Java programming language. In this paper, we assess the applicability of ContextJ language abstractions for the development of a graphical user interface-based application. We present a text editor that has been implemented with ContextJ based on the Qt Jambi framework and discuss possible extensions to ContextJ to improve its applicability.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"511 ","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"120873416","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":"Towards context-aware propagators: language constructs for context-aware adaptation dependencies","authors":"Engineer Bainomugisha, W. Meuter, T. D'Hondt","doi":"10.1145/1562112.1562120","DOIUrl":"https://doi.org/10.1145/1562112.1562120","url":null,"abstract":"A context-aware system needs to reason about its current context of use and select applicable adaptations to activate or deactivate. This process is complex as often multiple contexts are available and improper interpretation of adaptation dependencies may lead to inconsistent or annoying system behaviour. This paper proposes a programming language support for defining context-aware dependencies between adaptations. Our model is based on the ideas of the propagator computational model to provide support for multiple dependencies that can coexist even if they contradict. Our proposed model is analogous to relationships and multiplicities in the modelling approaches. In addition, rather than fixed dependencies between adaptations, our model allows these dependencies to change depending on the context of use.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"25 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"129619998","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":"Transactional contexts: harnessing the power of context-oriented reflection","authors":"Sebastián González, M. Denker, K. Mens","doi":"10.1145/1562112.1562115","DOIUrl":"https://doi.org/10.1145/1562112.1562115","url":null,"abstract":"The emerging field of context-oriented programming gives a predominant role to the execution context of applications, and advocates the use of dedicated mechanisms to allow the elegant expression of behavioural adaptations to such context. With suitable reflective facilities, language semantics can be adapted to context by reusing the same context-oriented mechanisms that allow base-level adaptability. This kind of meta-level adaptability, in which the computation model itself becomes adaptable to context, gives rise to context-oriented computational reflection. To explore this idea, we set out to implement a simple software transactional memory system that exploits meta-level adaptability by regarding transactions as contexts, and adapting fundamental system behaviour to such transactional contexts. The implementation is succinct and non-intrusive, giving us an indication of the power lying at the crossroads of context-oriented programming and computational reflection.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"22 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"133340546","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":"Model driven development of context aware software systems","authors":"Andrea Sindico, V. Grassi","doi":"10.1145/1562112.1562119","DOIUrl":"https://doi.org/10.1145/1562112.1562119","url":null,"abstract":"This paper presents the first results of an ongoing work towards the realization of a model driven development framework for context awareness. Its core element consists of a domain specific modeling language called CAMEL (Context Awareness ModEling Language), and defined as a UML extension. CAMEL can be used to enrich a UML model of an application with elements related to contexts and context dependent behaviors. The resulting UML+CAMEL model is the starting point for model transformation aimed at generating executable code or other artifacts. CAMEL is implemented by an Eclipse plugin.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"22 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121637025","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":"Towards safe and flexible object adaptation","authors":"T. Kamina, T. Tamai","doi":"10.1145/1562112.1562116","DOIUrl":"https://doi.org/10.1145/1562112.1562116","url":null,"abstract":"In this paper, a programming language NextEJ is proposed. NextEJ is based on Epsilon model, which realizes object adaptation to contexts. The novelty of Epsilon model is its ability to make objects be able to freely enter or leave contexts dynamically and belong to multiple contexts at a time. However, such kind of flexibility also easily brings type-unsafety. NextEJ tackles this problem by introducing a new feature called context activation scope. Inside a context activation scope, it is assured that an object is always bound with the role activated so that no method-not-understood errors occur at run-time. Furthermore, context activation scope can be nested so that multiple contexts can be activated at a time. A role instance has a pre-defined field thisContext which refers to its enclosing context instance. In the case of multiple context activations, the reference of thisContext is interpreted as a composite context whose behavior is determined by the order of activations.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"75 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122453609","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}
M. Appeltauer, R. Hirschfeld, M. Haupt, Jens Lincke, M. Perscheid
{"title":"A comparison of context-oriented programming languages","authors":"M. Appeltauer, R. Hirschfeld, M. Haupt, Jens Lincke, M. Perscheid","doi":"10.1145/1562112.1562118","DOIUrl":"https://doi.org/10.1145/1562112.1562118","url":null,"abstract":"Context-oriented programming (COP) extensions have been implemented for several languages. Each concrete language design and implementation comes with different variations of the features of the COP paradigm. In this paper, we provide a comparison of eleven COP implementations, discuss their designs, and evaluate their performance.","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"42 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"127451940","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 semantics for context-oriented programming with layers","authors":"D. Clarke, Ilya Sergey","doi":"10.1145/1562112.1562122","DOIUrl":"https://doi.org/10.1145/1562112.1562122","url":null,"abstract":"Context-oriented programming (COP) is a new programming approach whereby the context in which expressions evaluate can be adapted as a program runs. COP provides a degree of flexibility beyond object-oriented programming, while arguably retaining more modularity and structure than aspect-oriented programming. Although many languages exploring the context-oriented approach exist, to our knowledge no formal type-sound dynamic semantics of these languages exists. We address this shortcoming by providing a concise syntax-based formal semantics for context-oriented programming with layers, as witnessed by ContextL, ContextJ*, and other languages. Our language is based on Featherweight Java extended with layers and scoped layer activation and deactivation. As layers may introduce methods not appearing in classes, we also give a static type system that ensures that no program gets stuck (i.e., there exists a binding for each dispatched method call).","PeriodicalId":383693,"journal":{"name":"Proceedings of the 1st ACM International Workshop on Context-Oriented Programming","volume":"5 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2009-07-07","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128339078","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}