context-oriented programming (coP) directly addresses context variability by providing dedicated language concepts: layers, units of modularity, store context-dependent behavior. During runtime, layers can be applied ...
详细信息
ISBN:
(纸本)9781450349710
context-oriented programming (coP) directly addresses context variability by providing dedicated language concepts: layers, units of modularity, store context-dependent behavior. During runtime, layers can be applied dynamically depending on the current context of the program. Various activation means for layers have been proposed. Most of them require developers to model context switches explicitly. In contrast, implicit layer activation (ILA) allows developers to bind the activation status of a layer to a boolean predicate. The associated layer stays automatically active as long as the given predicate evaluates to true. Despite its declarative semantics, ILA is usually implemented in an imperative fashion. In this paper, we present and compare two implementation variants for ILA in contextJS: an imperative and a reactive implementation. Furthermore, we discuss their trade-offs regarding code complexity as well as runtime overhead.
Static analyses, as points-to analysis, are useful to determine and assure different properties about a program, such as security or type safety. While existing analyses are effective in programs restricted to static ...
详细信息
ISBN:
(纸本)9798400702464
Static analyses, as points-to analysis, are useful to determine and assure different properties about a program, such as security or type safety. While existing analyses are effective in programs restricted to static features, precision declines in the presence of dynamic language features, and even further when the system behavior changes dynamically. As a consequence, improved points-to sets algorithms taking into account such language features and uses are required. In this paper, we present and extension of the point-to sets analysis to incorporate the language abstractions introduced by context-oriented programming adding the capability for programs to adapt their behavior dynamically to the system's execution context. To do this, we extend WALA to detect the context-oriented language abstractions, and their representation within the system, to capture the dynamic behavior, in the particular case of the context Traits JavaScript language extension. To prove the effectiveness of our extension, we evaluate the precision of the points-to set analysis with respect to the state of the art, over four context-oriented programs taken from the literature.
context-oriented programming languages allow programmers to develop context-aware systems that can adapt their behaviour dynamically upon changing contexts. Due to the highly dynamic nature of such systems and the man...
详细信息
ISBN:
(纸本)9781450367455
context-oriented programming languages allow programmers to develop context-aware systems that can adapt their behaviour dynamically upon changing contexts. Due to the highly dynamic nature of such systems and the many possible combinations of contexts to which such systems may adapt, developing such systems is hard. Feature-based context-oriented programming helps tackle part of this complexity by modelling the possible contexts, and the different behavioural adaptations they can trigger, as separate feature models. Tools can also help developers address the underlying complexity of this approach. This paper presents a visualisation tool that is intricately related to the underlying architecture of a feature-based context-oriented programming language, and the context and feature models it uses. The visualisation confronts two hierarchical models (a context model and a feature model) and highlights the dependencies between them. An initial user study of the visualisation tool is performed to assess its usefulness and usability.
Modern software systems demand more and more smart capabilities depending on their context of use, as well as the ability to dynamically adapt these capabilities according to sensed context changes. This requires appr...
详细信息
ISBN:
(纸本)9781450340335
Modern software systems demand more and more smart capabilities depending on their context of use, as well as the ability to dynamically adapt these capabilities according to sensed context changes. This requires appropriate techniques for modelling, representing and handling context-aware software variability. While traditional variability modelling approaches like feature orientation and software product lines are evolving to address the increased dynamicity and context specificity required for this new generation of software systems, new paradigms such as context-oriented programming have emerged. Although developed independently, since they address similar issues, many similarities exist between these approaches. The purpose of this paper is to define, categorise and compare key concepts shared by these approaches. Such a taxonomy is a first step towards a better understanding of the differences and similarities between different approaches for managing context-aware software variability, and to achieve a cross-fertilisation between them.
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.
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 present design concepts, programming constructs, and automatic verification techniques to support the development of adaptive Wireless Sensor Network (WSN) software. WSNs operate at the interface between the physic...
详细信息
We present design concepts, programming constructs, and automatic verification techniques to support the development of adaptive Wireless Sensor Network (WSN) software. WSNs operate at the interface between the physical world and the computing machine and are hence exposed to unpredictable environment dynamics. WSN software must adapt to these dynamics to maintain dependable and efficient operation. However, developers are left without proper support to develop adaptive functionality in WSN software. Our work fills this gap with three key contributions: (i) design concepts help developers organize the necessary adaptive functionality and understand their relations, (ii) dedicated programming constructs simplify the implementations, (iii) custom verification techniques allow developers to check the correctness of their design before deployment. We implement dedicated tool support to tie the three contributions, facilitating their practical application. Our evaluation considers representative WSN applications to analyze code metrics, synthetic simulations, and cycle-accurate emulation of popular WSN platforms. The results indicate that our work is effective in simplifying the development of adaptive WSN software;for example, implementations are provably easier to test and to maintain, the run-time overhead of our dedicated programming constructs is negligible, and our verification techniques return results in a matter of seconds.
Feature-based context-oriented programming reconciles ideas from context-oriented programming, feature modelling and dynamic software product lines. It offers a programming language, architecture, tools and methodolog...
详细信息
Feature-based context-oriented programming reconciles ideas from context-oriented programming, feature modelling and dynamic software product lines. It offers a programming language, architecture, tools and methodology to develop software systems consisting of contexts and features that can become active at run-time to offer the most appropriate behaviour depending on the actual context of use. Due to their high run-time adaptivity, dedicated tool support to test such systems is needed. Building upon a pairwise combinatorial interaction testing approach from the domain of software product lines, we implement an algorithm to generate automatically a small set of relevant test scenarios, ordered to minimise the number of context activations between tests. We also explore how the generated scenarios can be enhanced incrementally when the software evolves, and how useful the proposed testing approach is in practice. (c) 2022 Elsevier Inc. All rights reserved.
Currently, algorithmic approaches are being introduced in several areas of expertise, namely Architecture. Algorithmic Design (AD) is an approach for architecture that allows architects to take advantage of algorithms...
详细信息
ISBN:
(纸本)9782955747421
Currently, algorithmic approaches are being introduced in several areas of expertise, namely Architecture. Algorithmic Design (AD) is an approach for architecture that allows architects to take advantage of algorithms to produce complex forms for their projects, to simplify the exploration of variations, or to mechanize tasks, including those related to analysis and optimization of designs. However, architects might need different models of the same project for different kinds of analysis, which tempts them to extend the same code base for different purposes, typically making the code brittle and hard to understand. In this paper, we propose to extend AD with context-oriented programming (COP), a programming paradigm based on context that dynamically changes the behavior of the code. To this end, we propose a COP library and we explore its combination with an AD tool. Finally, we implement a case study with our approach, and discuss the advantages and disadvantages.
暂无评论