F-bounded polymorphism for object-oriented programming

Bounded quantification was introduced by Cardelli and Wegner as a means of typing functions that operate uniformly over all subtypes of a given type. They defined a simple “object” model and used bounded quantification to type-check functions that make sense on all objects having a specified set of “attributes.” A more realistic presentation of object-oriented languages would allow objects that are elements of recursively-defined types. In this context, bounded quantification no longer serves its intended purpose. It is easy to find functions that makes sense on all objects having a specified set of methods, but which cannot be typed in the Cardelli-Wegner system. To provide a basis for typed polymorphic functions in object-oriented languages, we introduce F-bounded quantification. Some applications of F-bounded quantification are presented and semantic issues are discussed. Although our original motivation was to type polymorphic functions over objects, F-bounded quantification is a general form of polymorphism that seems useful whenever recursive type definitions and subtyping are used.

[1]  Thierry Coquand,et al.  Inheritance as Implicit Coercion , 1991, Inf. Comput..

[2]  Gordon D. Plotkin,et al.  The category-theoretic solution of recursive domain equations , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[3]  Justin O. Graver,et al.  TS: an optimizing compiler for smalltalk , 1988, OOPSLA 1988.

[4]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Inf. Comput..

[5]  A. Snyder CommonObjects: an overview , 1986, OOPWORK '86.

[6]  John C. Mitchell,et al.  ML with extended pattern matching and subtypes , 1988, LISP and Functional Programming.

[7]  John Mitchell,et al.  Type Inference and Type Containment , 1984, Semantics of Data Types.

[8]  B BruceKim,et al.  A modest model of records, inheritance, and unbounded quantification , 1990 .

[9]  Kim B. Bruce,et al.  A Modest Model of Records, Inheritance and Bounded Quantification , 1990, Inf. Comput..

[10]  Alan Borning,et al.  Multiple Inheritance in Smalltalk-BO , 1982, AAAI.

[11]  Luca Cardelli,et al.  Structural subtyping and the notion of power type , 1988, POPL '88.

[12]  簡聰富,et al.  物件導向軟體之架構(Object-Oriented Software Construction)探討 , 1989 .

[13]  Pavel Curtis Constrained qualification in polymorphic type analysis , 1990 .

[14]  William R. Cook,et al.  A denotational semantics of inheritance , 1989 .

[15]  Luca Cardelli. Amber Combinators and Functional Programming Languages , 1985, Lecture Notes in Computer Science.

[16]  Mitchell Wand,et al.  Type inference for record concatenation and multiple inheritance , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[17]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

[18]  Thierry Coquand,et al.  Inheritance and explicit coercion , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[19]  Luca Cardelli,et al.  On understanding types, data abstraction, and polymorphism , 1985, CSUR.

[20]  William R. Cook,et al.  A Proposal for Making Eiffel Type-Safe , 1989, Comput. J..

[21]  John C. Mitchell,et al.  The Semantics of Second-Order Lambda Calculus , 1990, Inf. Comput..

[22]  Luca Cardelli,et al.  The Modula–3 type system , 1989, POPL '89.

[23]  Luca Cardelli,et al.  A Semantics of Multiple Inheritance , 1984, Information and Computation.

[24]  Alan Borning,et al.  A type declaration and inference system for smalltalk , 1982, POPL '82.

[25]  William R. Cook,et al.  Interfaces for strongly-typed object-oriented programming , 1989, OOPSLA 1989.

[26]  Bernard Robinet,et al.  Combinators and functional programming languages : Thirteenth Spring School of the LITP, Val d'Ajol, France, May 6-10, 1985, proceedings , 1986 .

[27]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[28]  Alan Snyder Encapsulation and inheritance in object-oriented programming languages , 1986, OOPSLA 1986.

[29]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[30]  Mitchell Wand,et al.  Complete Type Inference for Simple Objects , 1987, LICS.