A Type System for Dynamic Layer Composition

Dynamic layer composition is one of the key features in contextoriented programming (COP), an approach to improving modularity of behavioral variations that depend on the dynamic context of the execution environment. It allows a layer—a set of new or overriding methods that can belong to several classes—to be added to or removed from existing objects in a disciplined way. We develop a type system for dynamic layer composition, which may change the interfaces of objects at run time, based on a variant of ContextFJ, a core calculus for COP, and prove its soundness.

[1]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[2]  Michael Haupt,et al.  ContextJ: Context-oriented Programming with Java , 2011 .

[3]  Sven Apel,et al.  Feature featherweight java: a calculus for feature-oriented programming and stepwise refinement , 2008, GPCE '08.

[4]  William R. Cook,et al.  A machine-checked model of safe composition , 2009, FOAL '09.

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

[6]  Viviana Bono,et al.  Delta-Oriented Programming of Software Product Lines , 2010, SPLC.

[7]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[8]  Robert E. Strom,et al.  Typestate: A programming language concept for enhancing software reliability , 1986, IEEE Transactions on Software Engineering.

[9]  Michael Haupt,et al.  An Introduction to Context-Oriented Programming with ContextS , 2007, GTTSE.

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

[11]  Yannis Smaragdakis,et al.  Implementing Layered Designs with Mixin Layers , 1998, ECOOP.

[12]  Tetsuo Tamai,et al.  A Core Calculus for Mixin-Types , 2004 .

[13]  Matthias Felleisen,et al.  Classes and mixins , 1998, POPL '98.

[14]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[15]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[16]  Ina Schaefer,et al.  Compositional type-checking for delta-oriented programming , 2011, AOSD '11.

[17]  Atsushi Igarashi,et al.  ContextFJ: a minimal core calculus for context-oriented programming , 2011, FOAL.

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

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

[20]  Don Batory,et al.  Scaling Step-Wise Refinement , 2004, IEEE Trans. Software Eng..

[21]  Vitaly Shmatikov,et al.  A Core Calculus of Classes and Mixins , 1999, ECOOP.