Language Constructs for Context-oriented Programming

ContextL is an extension to the Common Lisp Object System that allows for Context-oriented Programming. It provides means to associate partial class and method definitions with layers and to activate and deactivate such layers in the control flow of a running program. When a layer is activated, the partial definitions become part of the program until this layer is deactivated. This has the eect that the behavior of a program can be modified according to the context of its use without the need to mention such context dependencies in the aected base program. We illustrate these ideas by providing dierent UI views on the same object while, at the same time, keeping the conceptual simplicity of objectoriented programming that objects know by themselves how to behave, in our case how to display themselves. These seemingly contradictory goals can be achieved by separating class definitions into distinct layers instead of factoring out the display code into dierent classes.

[1]  Hidehiko Masuhara,et al.  Modeling Crosscutting in Aspect-Oriented Mechanisms , 2003, ECOOP.

[2]  Robert Hirschfeld,et al.  Dynamic Service Adaptation for Runtime System Extensions , 2004, WONS.

[3]  Jonathan Aldrich,et al.  Prototypes with Multiple Dispatch: An Expressive and Dynamic Object Model , 2005, ECOOP.

[4]  Pascal Costanza,et al.  Dynamically scoped functions as the essence of AOP , 2003, SIGP.

[5]  Robert Hirschfeld,et al.  AspectS - Aspect-Oriented Programming with Squeak , 2002, NetObjectDays.

[6]  Michael Haupt,et al.  Virtual machine support for dynamic join points , 2004, AOSD '04.

[7]  Daniel G. Bobrow,et al.  Representing design alternatives , 1980 .

[8]  Gregor Kiczales,et al.  Towards a new model of abstraction in software engineering , 1991, Proceedings 1991 International Workshop on Object Orientation in Operating Systems.

[9]  Daniel G. Bobrow,et al.  Common lisp object system specification , 1988, SIGP.

[10]  Stephen Travis Pope,et al.  A cookbook for using the model-view controller user interface paradigm in Smalltalk-80 , 1988 .

[11]  M. L. Gassanenko CONTEXT-ORIENTED PROGRAMMING , 1998 .

[12]  Günter Kniesel Type-Safe Delegation for Run-Time Component Adaptation , 1999, ECOOP.

[13]  Henry Lieberman,et al.  Using Prototypical Objects to Implement Shared Behavior in Object Oriented Systems , 1986, OOPSLA.

[14]  Rainer Unland,et al.  Objects, Components, Architectures, Services, and Applications for a Networked World , 2003, Lecture Notes in Computer Science.

[15]  Robert Hirschfeld,et al.  Extending Advice Activation in AspectS , 2006 .

[16]  Andry Rakotonirainy,et al.  Context-oriented programming , 2003, MobiDe '03.

[17]  Daniel G. Bobrow,et al.  Book review: The Art of the MetaObject Protocol By Gregor Kiczales, Jim des Rivieres, Daniel G. and Bobrow(MIT Press, 1991) , 1991, SGAR.

[18]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[19]  Suresh Jagannathan,et al.  Environments as first class objects , 1987, POPL '87.

[20]  Wolfgang Weck,et al.  Generic Wrappers , 2000, ECOOP.

[21]  Randall B. Smith,et al.  A Simple and Unifying Approach to Subjective Objects , 1996, Theory Pract. Object Syst..

[22]  Randall B. Smith,et al.  Self: The power of simplicity , 1987, OOPSLA 1987.

[23]  John Maloney,et al.  The Self-4.0 user interface: manifesting a system-wide vision of concreteness, uniformity, and flexibility , 1995, OOPSLA 1995.

[24]  Klaus Ostermann,et al.  Dynamically Composable Collaborations with Delegation Layers , 2002, ECOOP.

[25]  Armin B. Cremers,et al.  Lava-Spracherweiterungen für Delegation in Java , 1999, Java-Informations-Tage.

[26]  Harold Ossher,et al.  Subject-oriented programming: a critique of pure objects , 1993, OOPSLA '93.

[27]  David A. Moon,et al.  Flavors: Message Passing in the Lisp Machine. , 1980 .