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 Followers
 · 
55 Views
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: This paper proposes EventCJ, a context-oriented programming (COP) language that can modularly control layer activation based on user-defined events. In addition to defining context-specific behaviors by using existing COP constructs, the EventCJ programmer declares events to specify when and on which instance layer switching should happen, and layer transition rules to specify which layers should be activated/deactivated upon events. These constructs enable controlling layer activation on a per-instance basis, separately from a base program. We also demonstrate an approach to verify safety properties of layer transitions by using a model checker. With these advantages, EventCJ enables more modular descriptions of context-aware programs, especially when layer switching is triggered in many places of a program, or by activities external to the base program. We implemented a prototype EventCJ compiler with Eclipse IDE support.
    Proceedings of the 10th International Conference on Aspect-Oriented Software Development, AOSD 2011, Porto de Galinhas, Brazil, March 21-25, 2011; 01/2011
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: Context-oriented programming languages ease the design and implementation of context-dependent applications. ContextJ is a context-oriented extension to the Java pro-gramming language. In this paper, we assess the applicabil-ity 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.
  • Source
    [Show abstract] [Hide abstract]
    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.
    International Workshop on Context-Oriented Programming; 01/2009

Preview

Download
0 Downloads