Efficient Layer Activation for Switching Context-Dependent Behavior [chapter]

Pascal Costanza, Robert Hirschfeld, Wolfgang De Meuter
2006 Lecture Notes in Computer Science  
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
more » ... n 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.
doi:10.1007/11860990_7 fatcat:tbjxx3gicnemplkbjnvl72suya