Connecting Object Constraints with Context-oriented Programming: Scoping Constraints with Layers and Activating Layers with Constraints
Context-oriented Programming extends object-oriented languages with a mechanism to dynamically adapt behavior. Object Constraint Programming orthogonally extends object-oriented run-times by integrating constraints, including support for constraints over mutable state, object identity, and the results of message sends. Using these two language extensions in conjunctions offers interesting opportunities.
In this paper, we report on new mechanisms involving layers and constraints that evolved from our experiences with combining Babelsberg/JS, an Object Constraint Language, and ContextJS, an implementation of Context-oriented Programming in JavaScript. First, our experience shows that it is desirable to dynamically adapt declarative constraints, which offer an orthogonal mechanism to the definition of imperative behavior, likewise at runtime. In this work, we show an extension to ContextJS to scope activation or refinement of constraints dynamically using layers. Second, ContextJS already provides different activation mechanisms for layers, including dynamically or structurally scoped, or globally through system generated events. Constraints provide an activation mechanism based on arbitrary boolean expressions changing their value, allowing for interesting applications of behavioral adaption based on certain conditions.
Sun 5 JulDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
13:30 - 15:00 | |||
13:30 30mTalk | Connecting Object Constraints with Context-oriented Programming: Scoping Constraints with Layers and Activating Layers with Constraints COP Stefan Lehmann Hasso-Plattner-Institute, Potsdam, Tim Felgentreff Hasso-Plattner-Institute, Potsdam, Robert Hirschfeld HPI | ||
14:00 30mTalk | Method Safety Mechanism for Asynchronous Layer Deactivation COP Tetsuo Kamina Ritsumeikan University, Tomoyuki Aotani Tokyo Institute of Technology, Hidehiko Masuhara Tokyo Institute of Technology, Atsushi Igarashi Kyoto University | ||
14:30 30mTalk | Context Slices: A lightweight discovery module for adaptations COP |