Context-oriented programming languages provide dedicated programming abstractions to define behavioral adaptations and means to recompose them dynamically according to sensed context changes. Ad- ditionally, some of these languages have proposed abstractions to explic- itly define dependency relations between adaptations. Such dependency relations enable programmers to specify allowed and disallowed interac- tions between behavioral adaptations at a high abstraction level. In this paper, we explore Petri nets as an underlying formalism to model context- dependent adaptations and their dependencies. Petri nets offer a precise notation and semantics for behavioral adaptations and the dependency relations between them. Even more, Petri nets can be used as an underly- ing representation to manage dependency relations, and activations and deactivations of behavioral adaptations at runtime. We illustrate the ideas through the context-oriented programming language Subjective-C.
|Vrije Universiteit Brussel
|Published - 16 apr 2012