context: context-oriented programming languages provide dedicated programming abstractions to define behavioral adaptations and means to combine those adaptations dynamically according to sensed context changes. Some ...
详细信息
context: context-oriented programming languages provide dedicated programming abstractions to define behavioral adaptations and means to combine those adaptations dynamically according to sensed context changes. Some of these languages feature programming abstractions to explicitly define interaction dependencies among contexts. However, the semantics of context activation and the meaning of dependency relations have been described only informally, which in some cases has led to incorrect specifications, faulty implementations and inconsistent system behavior. Objective: With the aim of avoiding faulty implementations and inconsistencies during system execution, this paper proposes both a formal and run-time model of contexts, context activation and context interaction. Method: As a formal and computational basis, we introduce context Petri nets, a model based on Petri nets, which we found to match closely the structure of contexts in context-oriented systems. The operational semantics of Petri nets permits the modeling of run-time context activations. Existing Petri net analyses allow us to reason about system properties. As validation, we carried out small and medium-sized case studies. Results: In the cases explored, context Petri nets served effectively as underlying run-time model to ensure that declared context interaction constraints remain consistent during context manipulation. Moreover, context Petri nets enabled us to analyze certain properties regarding the activation state of particular contexts. Conclusion: context Petri nets thus proved to be appropriate to encode and manage the semantics of context activation, both formally and computationally, so as to preserve the consistency of context-oriented systems. (C) 2014 Elsevier B.V. All rights reserved.
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 ...
详细信息
context-oriented programming (COP) languages provide a modularization mechanism called a layer, which modularizes behaviors that are executable under specific contexts, and specify a way to dynamically switch behavior...
详细信息
Self-adaptive software has become increasingly important to address the new challenges of complex computing systems. To achieve adaptation, software must be designed and implemented by following suitable criteria, met...
详细信息
Self-adaptive software has become increasingly important to address the new challenges of complex computing systems. To achieve adaptation, software must be designed and implemented by following suitable criteria, methods, and strategies. Past research has been mostly addressing adaptation by developing solutions at the software architecture level. This work, instead, focuses on finer-grain programming language-level solutions. We analyze three main linguistic approaches: metaprogramming, aspect-orientedprogramming, and context-oriented programming. The first two are general-purpose linguistic mechanisms, whereas the third is a specific and focused approach developed to support context-aware applications. This paradigm provides specialized language-level abstractions to implement dynamic adaptation and modularize behavioral variations in adaptive systems. The article shows how the three approaches can support the implementation of adaptive systems and compares the pros and cons offered by each solution.
Object composition is often advocated as a more flexible approach to specialize the behavior of objects dynamically. In this paper, we propose Dynamic Object Evolution Featherweight Java (DOEFJ), an extension of Feath...
详细信息
ISBN:
(纸本)9781467321686;9781467321709
Object composition is often advocated as a more flexible approach to specialize the behavior of objects dynamically. In this paper, we propose Dynamic Object Evolution Featherweight Java (DOEFJ), an extension of Featherweight Java with object composition and consultation, to support dynamic behavior adjustment of the program. In DOEFJ, instances of layered classes are created at run-time by the runtime system and are specialized in object composition. According to the current execution context, objects can be evolved by object composition to obtain new context-specific methods. A consultant based mechanism ensures that these new methods are correctly executed. With these mechanisms, the DOEFJ program can dynamically adapts its behavior to the current execution context. The sound type system of DOEFJ assures that no "message-not-understood" errors occur at run-time.
context-oriented programming (COP) provides dedicated support for defining and composing variations to a basic program behavior. A variation, which is defined within a layer, can be de-/activated for the dynamic exten...
详细信息
context-oriented programming (COP) provides dedicated support for defining and composing variations to a basic program behavior. A variation, which is defined within a layer, can be de-/activated for the dynamic extent of a code block. While this mechanism allows for control flow-specific scoping, expressing behavior adaptations can demand alternative scopes. For instance, adaptations can depend on dynamic object structure rather than control flow. We present scenarios for behavior adaptation and identify the need for new scoping mechanisms. The increasing number of scoping mechanisms calls for new language abstractions representing them. We suggest to open the implementation of scoping mechanisms so that developers can extend the COP language core according to their specific needs. Our open implementation moves layer composition into objects to be affected and with that closer to the method dispatch to be changed. We discuss the implementation of established COP scoping mechanisms using our approach and present new scoping mechanisms developed for our enhancements to Lively Kernel. (C) 2010 Elsevier B.V. All rights reserved.
We describe semantic mappings of four high-level programming languages to our delegation-based machine model for aspect-orientedprogramming. One of the languages is a class-based object-oriented one. The other three ...
详细信息
We describe semantic mappings of four high-level programming languages to our delegation-based machine model for aspect-orientedprogramming. One of the languages is a class-based object-oriented one. The other three represent extensions thereof that support various approaches to modularizing crosscutting concerns. We explain informally that an operational semantics expressed in terms of the model's concepts preserves the behavior of a program written in one of the high-level languages. We hence argue our model to be semantically sound in that sense, as well as sufficiently expressive in order to correctly support features such as class-based object-orientedprogramming, the open-classes and pointcut-and-advice flavors of aspect-orientedprogramming, and dynamic layers. For the latter, being a core feature of context-oriented programming, we also provide a formal semantics.
We describe semantic mappings of four high-level programming languages to our delegation-based machine model for aspect-orientedprogramming. One of the languages is a class-based object-oriented one. The other three ...
详细信息
ISBN:
(纸本)9781605582153
We describe semantic mappings of four high-level programming languages to our delegation-based machine model for aspect-orientedprogramming. One of the languages is a class-based object-oriented one. The other three represent extensions thereof that support various approaches to modularizing crosscutting concerns. We explain informally that an operational semantics expressed in terms of the model's concepts preserves the behavior of a program written in one of the high-level languages. We hence argue our model to be semantically sound in that sense, as well as sufficiently expressive in order to correctly support features such as class-based object-orientedprogramming, the open-classes and pointcut-and-advice flavors of aspect-orientedprogramming, and dynamic layers. For the latter, being a core feature of context-oriented programming, we also provide a formal semantics.
Expressing layer dependencies in context-oriented programming is cumbersome because until now no facility has been introduced to control the activation and deactivation of layers. This paper presents a novel reflectiv...
详细信息
ISBN:
(纸本)9781595934802
Expressing layer dependencies in context-oriented programming is cumbersome because until now no facility has been introduced to control the activation and deactivation of layers. This paper presents a novel reflective interface that provides such control without compromising efficiency. This allows expressing complex application-defined dependencies between layers where the activation or deactivation of a layer requires the activation or deactivation of another one. The activation or deactivation of specific layers can also be prohibited based on application-defined conditions.
暂无评论