Semantics for consistent activation in context-oriented systems

Context: Context-oriented programming languages provide dedicated programming abstractions to define behavioral adaptations and means to combine those adaptations dynamically according to sensed context changes. Some of these languages feature programming abstractions to explicitly define interaction dependencies among contexts. However, the semantics of context activation and the meaning of dependency relations have been described only informally, which in some cases has led to incorrect specifications, faulty implementations and inconsistent system behavior. Objective: With the aim of avoiding faulty implementations and inconsistencies during system execution, this paper proposes both a formal and run-time model of contexts, context activation and context interaction. Method: As a formal and computational basis, we introduce context Petri nets, a model based on Petri nets, which we found to match closely the structure of contexts in context-oriented systems. The operational semantics of Petri nets permits the modeling of run-time context activations, and existing Petri net analyses allow to reason about system properties. As validation, we carried out small and medium-sized case studies. Results: In the explored cases, Context Petri nets served effectively as underlying run-time model to ensure that declared context interaction constraints remain consistent during context manipulation. Moreover, context Petri nets enabled us to analyze certain properties regarding the activation state of particular contexts. Conclusion: Context Petri nets thus proved to be an appropriate formalism to encode and manage the semantics of context activation, both formally and computationally, so as to preserve the consistency of context-oriented systems.

[1]  Dave Clarke,et al.  Feature Petri Nets , 2010, SPLC Workshops.

[2]  Hidehiko Masuhara,et al.  Featherweight EventCJ: a core calculus for a context-oriented language with event-based per-instance layer transition , 2011, COP@ECOOP.

[3]  Dirk Janssens,et al.  A graph-based operational semantics for context-oriented programming , 2010, COP@ECOOP.

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

[5]  Nicolas Guelfi,et al.  Object-Oriented Nets with Algebraic Specifications: The CO-OPN/2 Formalism , 2001, Concurrent Object-Oriented Programming and Petri Nets.

[6]  Theo D'Hondt,et al.  Feature Descriptions for Context-oriented Programming , 2008, SPLC.

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

[8]  Gérard Berry,et al.  The Esterel Synchronous Programming Language: Design, Semantics, Implementation , 1992, Sci. Comput. Program..

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

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

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

[12]  Antoni W. Mazurkiewicz,et al.  Compositional Semantics of Pure Place/ Transition Systems , 1988, European Workshop on Applications and Theory of Petri Nets.

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

[14]  Karsten Wolf,et al.  Transforming BPEL to Petri Nets , 2005, Business Process Management.

[15]  Wil M. P. van der Aalst,et al.  The Application of Petri Nets to Workflow Management , 1998, J. Circuits Syst. Comput..

[16]  Nadia Busi Analysis issues in Petri nets with inhibitor arcs , 2002, Theor. Comput. Sci..

[17]  Sebastian Andres Gonzalez Montesinos Programming in ambience : gearing up for dynamic adaptation to context , 2008 .

[18]  Matteo Pradella,et al.  Context-oriented programming: A software engineering perspective , 2012, J. Syst. Softw..

[19]  Tadao Murata,et al.  Petri nets: Properties, analysis and applications , 1989, Proc. IEEE.

[20]  Nicolás Alvarez,et al.  Identification and management of inconsistencies in dynamically adaptive software systems , 2013 .

[21]  Theo D'Hondt,et al.  Context-Oriented Domain Analysis , 2007, CONTEXT.

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

[23]  Dirk Fahland,et al.  Instantaneous Soundness Checking of Industrial Business Process Models , 2009, BPM.

[24]  Hidehiko Masuhara,et al.  Bridging real-world contexts and units of behavioral variations by composite layers , 2012, COP@ECOOP.

[25]  Dave Clarke,et al.  A semantics for context-oriented programming with layers , 2009, COP@ECOOP.

[26]  Karsten Schmidt LoLA: a low level analyser , 2000 .

[27]  Kim Mens,et al.  Uniting global and local context behavior with context Petri nets , 2012, COP@ECOOP.

[28]  Dave Clarke,et al.  How should context-escaping closures proceed? , 2009, COP@ECOOP.

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

[30]  Klaus Reinhardt,et al.  Reachability in Petri Nets with Inhibitor Arcs , 2008, RP.

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