A Core Calculus for Mixin-Types

The programming construct mixinwas invented to implement modules that provide the mechanism of abstracting uniform extensions and modifications to superclasses. One approach to implement a mixin is to parameterize a superclass of a generic class using a type parameter; however, this approach lacks the ability to declare a mixin that is also used as a type. In this paper, we propose a programming language McJava, an extension of Java that is equipped with mixin-types, a mechanism to declare a mixin that is also used as a type. Then, we develop Core McJava, a core language for McJava, and show its type soundness theorem. This core language is based on Featherweight Java (FJ), a minimum core calculus for Java. FJ is a very small subset of Java. Focusing on a few key issues, we have developed a flexible subtyping relation among mixin compositions.

[1]  Dominic Duggan,et al.  Mixin modules , 1996, ICFP '96.

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

[3]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[4]  Matthew Flatt,et al.  Jiazzi: new-age components for old-fasioned Java , 2001, OOPSLA '01.

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

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

[7]  Tetsuo Tamai,et al.  Objects and roles: modeling based on the dualistic view , 1999, Inf. Softw. Technol..

[8]  Stephen N. Freund,et al.  Adding type parameterization to the Java language , 1997, OOPSLA '97.

[9]  Robert Cartwright,et al.  A first-class approach to genericity , 2003, OOPSLA '03.

[10]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[11]  Kenneth E. Iverson,et al.  A programming language , 1899, AIEE-IRE '62 (Spring).

[12]  Tetsuo Tamai,et al.  Evolvable programming based on collaboration-field and role model , 2002, IWPSE '02.

[13]  Dominic Duggan,et al.  Modular mixin-based inheritance for application frameworks , 2001, OOPSLA '01.

[14]  William R. Cook,et al.  Mixin-based inheritance , 1990, OOPSLA/ECOOP '90.

[15]  Yuanfang Cai,et al.  Non-modularity in aspect-oriented languages: integration as a crosscutting concern for AspectJ , 2002, AOSD '02.

[16]  Naoyasu Ubayashi,et al.  Separation of Concerns in Mobile Agent Applications , 2001, Reflection.

[17]  Akira Tanaka,et al.  Difference-Based Modules: A Class-Independent Module Mechanism , 2002, ECOOP.

[18]  Oscar Nierstrasz,et al.  Traits: Composable Units of Behaviour , 2002, ECOOP.

[19]  David Notkin,et al.  Reconciling environment integration and software evolution , 1992, TSEM.

[20]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[21]  Davide Ancona,et al.  Jam - A Smooth Extension of Java with Mixins , 2000, ECOOP.