Uniting global and local context behavior with context Petri nets

Context-oriented programming enables adaptation of systems to their execution environment. Behavioral adaptations are defined in the system and then associated to a context. Such adaptations are made available at runtime when their context is deemed more appropriate by the execution environment. Context activation is reified using two techniques. Global to all running threads in the system, or local to a particular thread of execution. Providing one technique or the other may hinder the adaptable capabilities of the system. This paper extends the context Petri nets model to unify global and local context behavior. Global and local context behavior are represented as multicolored tokens in context Petri nets, by assigning a color to each thread in the system. By means of context Petri nets, context-oriented systems can unambiguously adapt their behavior globally, or to a particular thread of execution.

[1]  Kim Mens,et al.  Context Petri Nets: Enabling Consistent Composition of Context-dependent Behavior , 2012, PNSE.

[2]  Kim Mens,et al.  Predicated generic functions: enabling context-dependent method dispatch , 2010 .

[3]  Matteo Pradella,et al.  ContextErlang: introducing context-oriented programming in the actor model , 2012, AOSD '12.

[4]  Robert Hirschfeld,et al.  An open implementation for context-oriented layer composition in ContextJS , 2011, Sci. Comput. Program..

[5]  Lars Michael Kristensen,et al.  Coloured Petri Nets - Modelling and Validation of Concurrent Systems , 2009 .

[6]  Falko Bause On the analysis of Petri nets with static priorities , 2009, Acta Informatica.

[7]  Kim Mens,et al.  Subjective-C - Bringing Context to Mobile Platform Programming , 2010, SLE.

[8]  Kim Mens,et al.  Context-Oriented Programming with the Ambient Object System , 2008, J. Univers. Comput. Sci..

[9]  Hidehiko Masuhara,et al.  EventCJ: a context-oriented programming language with declarative event-based context transition , 2011, AOSD '11.

[10]  Robert Hirschfeld,et al.  Language constructs for context-oriented programming: an overview of ContextL , 2005, DLS '05.

[11]  Kim Mens,et al.  Highly dynamic behaviour adaptability through prototypes with subjective multimethods , 2007, DLS '07.

[12]  Maciej Koutny,et al.  Petri Net Semantics of Priority Systems , 1992, Theor. Comput. Sci..

[13]  Rik Eshuis,et al.  Reactive Petri Nets for Workflow Modeling , 2003, ICATPN.

[14]  Michael Haupt,et al.  A comparison of context-oriented programming languages , 2009, COP@ECOOP.

[15]  Kim Mens,et al.  Context Petri Nets : Definition and Manipulation , 2012 .