The Declarative Nature of Implicit Layer Activation
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 declarative expression. The associated layer stays automatically active as long as the given expression 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 trade-offs regarding code complexity as well as runtime overhead.
Tue 20 Jun
|11:00 - 11:30|
|11:30 - 12:00|
|12:00 - 12:30|