Contextual values

É Tanter - Proceedings of the 2008 symposium on Dynamic …, 2008 - dl.acm.org
Proceedings of the 2008 symposium on Dynamic languages, 2008dl.acm.org
Context-oriented programming proposes to treat execution context explicitly and to provide
means for context-dependent adaptation at runtime. There are many mechanisms that can
be used to make either variable bindings or application code adapt dynamically, like
dynamically-scoped variables, dynamic layer activation, and contextual dispatch. There are
no means however, to make actual values be context-dependent. This means that side
effects engendered by dynamically-activated adaptations are potentially global. We propose …
Context-oriented programming proposes to treat execution context explicitly and to provide means for context-dependent adaptation at runtime. There are many mechanisms that can be used to make either variable bindings or application code adapt dynamically, like dynamically-scoped variables, dynamic layer activation, and contextual dispatch. There are no means however, to make actual values be context-dependent. This means that side effects engendered by dynamically-activated adaptations are potentially global. We propose contextual values: values that actually depend on the context in which they are looked at and modified. We explore how contextual values can be provided, either as a simple library or directly into the language through different designs, for which we provide the operational semantics in the form of Scheme interpreters. Being able to scope side effects to certain contexts is a step forward for context-oriented programming, and can have interesting applications in other areas like security and dynamic software evolution.
ACM Digital Library