Interfaces for strongly-typed object-oriented programming

This paper develops a system of explicit interfaces for object-oriented programming. The system provides the benefits of module interfaces found in languages like Ada and Modula-2 while preserving the expressiveness that gives untyped object-oriented languages like Smalltalk their flexibility. Interfaces are interpreted as polymorphic types to make the system sufficiently powerful. We use interfaces to analyze the properties of inheritance, and identify three distinct kinds of inheritance in object-oriented programming, corresponding to objects, classes, and interfaces, respectively. Object interfaces clarify the distinction between interface containment and inheritance and give insight into limitations caused by equating the notions of type and class in many typed object-oriented programming languages. Interfaces also have practical consequences for design, specification, and maintenance of object-oriented systems.

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

[2]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[3]  Henry Lieberman,et al.  Using prototypical objects to implement shared behavior in object-oriented systems , 1986, OOPLSA '86.

[4]  Kim B. Bruce,et al.  A modest model of records, inheritance and bounded quantification , 1988, [1988] Proceedings. Third Annual Information Symposium on Logic in Computer Science.

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

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

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

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

[9]  Robin Milner,et al.  The definition of standard ML, Version 3 , 1988 .

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

[11]  Butler W. Lampson,et al.  A Kernel Language for Abstract Data Types and Modules , 1984, Semantics of Data Types.

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

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

[14]  Larry Carter,et al.  Distrbution and Abstract Types in Emerald , 1987, IEEE Transactions on Software Engineering.

[15]  Jens Palsberg,et al.  A denotational model of inheritance and its correctness , 1989 .

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

[17]  Uday S. Reddy,et al.  Objects as closures: abstract semantics of object-oriented languages , 1988, LISP and Functional Programming.

[18]  Ralph E. Johnson,et al.  TS: an optimizing compiler for smalltalk , 1988, OOPSLA '88.

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

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

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

[22]  Al Stevens,et al.  C programming , 1990 .

[23]  Craig Schaffert,et al.  An introduction to Trellis/Owl , 1986, OOPLSA '86.

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