A Calculus for Boxes and Traits in a Java-Like Setting

The box model is a component model for the object-oriented paradigm, that defines components (the boxes) with clear encapsulation boundaries. Having well-defined boundaries is crucial in component-based software development, because it enables to argue about the interference and interaction between a component and its context. In general, boxes contain several objects and inner boxes, of which some are local to the box and cannot be accessed from other boxes and some can be accessible by other boxes. A trait is a set of methods divorced from any class hierarchy. Traits can be composed together to form classes or other traits. We present a calculus for boxes and traits. Traits are units of fine-grained reuse, whereas boxes can be seen as units of coarse-grained reuse. The calculus is equipped with an ownership type system and allows us to combine coarse- and fine-grained reuse of code by maintaining encapsulation of components.

[1]  Viviana Bono,et al.  On Traits and Types in a Java-like Setting , 2008, IFIP TCS.

[2]  Viviana Bono,et al.  Separating Type, Behavior, and State to Achieve Very Fine-grained Reuse , 2007 .

[3]  Arnd Poetzsch-Heffter,et al.  A Representation-Independent Behavioral Semantics for Object-Oriented Components , 2007, FMOODS.

[4]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[5]  Martin Odersky ECOOP 2004 – Object-Oriented Programming , 2004, Lecture Notes in Computer Science.

[6]  Andrew P. Black ECOOP 2005 - Object-Oriented Programming, 19th European Conference, Glasgow, UK, July 25-29, 2005, Proceedings , 2005, ECOOP.

[7]  Aaron Turon,et al.  Metaprogramming with Traits , 2007, ECOOP.

[8]  Oscar Nierstrasz,et al.  Traits: A mechanism for fine-grained reuse , 2006, TOPL.

[9]  Erik Ernst,et al.  ECOOP 2007 - Object-Oriented Programming, 21st European Conference, Berlin, Germany, July 30 - August 3, 2007, Proceedings , 2007, ECOOP.

[10]  Martin Rinard,et al.  Safejava: a unified type system for safe programming , 2004 .

[11]  Oscar Nierstrasz,et al.  Flattening Traits , 2006, J. Object Technol..

[12]  James Noble,et al.  Generic ownership for generic Java , 2006, OOPSLA '06.

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

[14]  Frank D. Valencia,et al.  Formal Methods for Components and Objects , 2002, Lecture Notes in Computer Science.

[15]  Luigi Liquori,et al.  FeatherTrait: A modest extension of Featherweight Java , 2008, TOPL.

[16]  Craig Chambers,et al.  Organizing programs without classes , 1991, LISP Symb. Comput..

[17]  Arnd Poetzsch-Heffter,et al.  A Parameterized Type System for Simple Loose Ownership Domains , 2007, J. Object Technol..

[19]  Clemens A. Szyperski,et al.  Component software - beyond object-oriented programming , 2002 .

[20]  Thomas Reps,et al.  Program Analysis and Compilation, Theory and Practice, Essays Dedicated to Reinhard Wilhelm on the Occasion of His 60th Birthday , 2007, Program Analysis and Compilation.

[21]  Sophia Drossopoulou,et al.  Generic Universe Types , 2007, ECOOP.

[22]  Arnd Poetzsch-Heffter,et al.  Infering Ownership Types for Encapsulated Object-Oriented Program Components , 2006, Program Analysis and Compilation.

[23]  Ina Schaefer,et al.  Implementing software product lines using traits , 2010, SAC '10.

[24]  E. Zucca,et al.  Flattening versus direct semantics for Featherweight Jigsaw ∗ , 2007 .

[25]  Sophia Drossopoulou,et al.  Universe Types for Topology and Encapsulation , 2007, FMCO.

[26]  David Gerard Clarke,et al.  Object ownership and containment , 2003 .

[27]  Dave Thomas ECOOP 2006 - Object-Oriented Programming, 20th European Conference, Nantes, France, July 3-7, 2006, Proceedings , 2006, ECOOP.

[28]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

[29]  Yi Lu,et al.  On Ownership and Accessibility , 2006, ECOOP.

[30]  Sophia Drossopoulou,et al.  Chai: Traits for Java-Like Languages , 2005, ECOOP.

[31]  Arnd Poetzsch-Heffter,et al.  Modular Specification of Encapsulated Object-Oriented Components , 2005, FMCO.

[32]  Craig Chambers,et al.  Ownership Domains: Separating Aliasing Policy from Mechanism , 2004, ECOOP.