Conference Paper

Efficient Layer Activation for Switching Context-Dependent Behavior.

DOI: 10.1007/11860990_7 Conference: Modular Programming Languages, 7th Joint Modular Languages Conference, JMLC 2006, Oxford, UK, September 13-15, 2006, Proceedings
Source: DBLP

ABSTRACT Today’s programming platforms do not provide sufficient constructs that allow a program’s behavior to depend on the context in which it is executing. This paper presents the design and implementation of programming language extensions that explicitly support our vision of Context-oriented Programming. In this model, programs can be partitioned into layers that can be dynamically activated and deactivated depending on their execution context. Layers are sets of partial program definitions that can be composed in any order. Context-oriented Programming encourages rich, dynamic modifications of program behavior at runtime, requiring an efficient implementation. We present a dynamic representation of layers that yields competitive performance characteristics for both layer activation/deactivation and overall program execution. We illustrate the performance of our implementation by providing an alternative solution for one of the prominent examples of aspect-oriented programming.

0 Bookmarks
 · 
48 Views
  • [Show abstract] [Hide abstract]
    ABSTRACT: 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-oriented programming, 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.
    ACM Transactions on Autonomous and Adaptive Systems (TAAS). 07/2013; 8(2).
  • Source
    [Show abstract] [Hide abstract]
    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.
    07/2011;
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: The CLOS Metaobject Protocol (CLOS MOP) is a specication of how major building blocks of CLOS are implemented in terms of CLOS itself. This enables programmers to subclass meta-level classes and dene meta-level state and behavior in an incremental fashion. The benets of such a meta-level architecture for object systems in general and CLOS in particular are well documented. However, some parts of the CLOS MOP are underspecied or impractical to use. We discuss a particular dark corner of the CLOS MOP, the meta-level function make-method-lambda, whose purpose is to inuence the expansion, and thus the semantics, of defmethod forms. We also make concrete suggestions for an alternative design for achieving the functionality that make-method-lambda provides, without any of its drawbacks.

Full-text

Download
0 Downloads