Interfaces and specifications for the Smalltalk-80 collection classes

The hierarchy of interfaces implicit in the Smalltalkcollection class library is computed and analyzed. The interface hierarchy is independent of the inheritance hierarchy because methods are frequently deleted by subclasses, and because unrelated classes sometimes implement the same messages. Specifications of the interfaces are developed, revealing subtle relationships among messages and their methods. The specifications help identify several kinds of problems in the library: inherited methods that violate the subclass invariant; methods that have the same name but unrelated behaviors; methods that have the same (or related) behavior but different names. This exercise demonstrates the utility of interfaces and specilications, and suggests improvements to the collection class library structure.

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

[2]  Wilf R. LaLonde,et al.  An exemplar based Smalltalk , 1986, OOPLSA '86.

[3]  Gary T. Leavens,et al.  Reasoning about object-oriented programs that use subtypes , 1990, OOPSLA/ECOOP '90.

[4]  Luca Cardelli,et al.  Operations on records , 1989, Mathematical Structures in Computer Science.

[5]  William R. Cook,et al.  Inheritance is not subtyping , 1989, POPL '90.

[6]  David A. Moon,et al.  Object-oriented programming with flavors , 1986, OOPLSA '86.

[7]  Justin O. Graver,et al.  Type checking and type inference for object-oriented programming languages , 1989 .

[8]  Ralph E. Johnson,et al.  Type-checking Smalltalk , 1986, OOPLSA '86.

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

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

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

[12]  Bertrand Meyer,et al.  Lessons from the design of the Eiffel libraries , 1990, CACM.

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

[14]  Daniel Joseph Carnese,et al.  Multiple inheritance in contemporary programming languages , 1984 .

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

[16]  Norihisa Suzuki,et al.  Inferring types in Smalltalk , 1981, POPL '81.

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

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

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