Inheritance-Based Subtyping

Classes play a dual role in mainstream statically typed object-oriented languages, serving as both object generators and object types. In such languages, inheritance implies subtyping. In contrast, the theoretical language community has viewed this linkage as a mistake and has focused on subtyping relationships determined by the structure of object types, without regard to their underlying implementations. In this paper, we explore why inheritance-based subtyping relations are useful, and we describe two different approaches to extending the MOBY programming language with inheritance-based subtyping relations. In addition, we present a typed object calculus that supports both structural and inheritance-based subtyping, and which provides a formal accounting of our extensions to MOBY.

[1]  Xavier Leroy,et al.  Unboxed objects and polymorphic typing , 1992, POPL '92.

[2]  Kim B. Bruce,et al.  Subtyping Is Not a Good "Match" for Object-Oriented Languages , 1997, ECOOP.

[3]  Damien Doligez,et al.  The Objective Caml system release 2.04 , 2002 .

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

[5]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[6]  R. Dreisbach,et al.  STANFORD UNIVERSITY. , 1914, Science.

[7]  Mehmet Aksit,et al.  Proceedings of the 11th European Conference on Object-Oriented Programming , 1997 .

[8]  Verzekeren Naar Sparen,et al.  Cambridge , 1969, Humphrey Burton: In My Own Time.

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

[10]  Giorgio Ghelli Foundations for Extensible Objects with Roles , 2002, Inf. Comput..

[11]  Ken Arnold,et al.  The Java programming language (2nd ed.) , 1998 .

[12]  Benjamin C. Pierce,et al.  Statically typed friendly functions via partially abstract types , 1993 .

[13]  Jon G. Riecke,et al.  Privacy via Subsumption , 2002, Inf. Comput..

[14]  David B. MacQueen,et al.  The Definition of Standard ML (Revised) , 1997 .

[15]  John H. Reppy,et al.  A Calculus for Compiling and Linking Classes , 2000, ESOP.

[16]  Luca Cardelli,et al.  On Binary Methods , 1995, Theory Pract. Object Syst..

[17]  Xavier Leroy,et al.  A syntactic theory of type generativity and sharing , 1996, Journal of Functional Programming.

[18]  Ken Arnold,et al.  The Java Programming Language , 1996 .

[19]  John C. Mitchell,et al.  A type system for prototyping languages , 1994, POPL '94.

[20]  Richard S. Bird,et al.  Generic functional programming with types and relations , 1996, Journal of Functional Programming.

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

[22]  John C. Mitchell,et al.  Type systems for object-oriented programming languages , 1996 .

[23]  John H. Reppy,et al.  The design of a class mechanism for Moby , 1999, PLDI '99.

[24]  Robin Milner,et al.  Definition of standard ML , 1990 .