Computer Science Technical Reports
CS at VT

HANA: A Model of Type and Inheritance for Object-Oriented Programming Languages

Lee, Keung Hae and Kafura, Dennis G. (1990) HANA: A Model of Type and Inheritance for Object-Oriented Programming Languages. Technical Report TR-90-07, Computer Science, Virginia Polytechnic Institute and State University.

Full text available as:
PDF - Requires Adobe Acrobat Reader or other PDF viewer.
TR-90-07.pdf (2948994)


Most current object-oriented languages consider inheritance as subtyping. However, a type system which views inheritance as subtyping allows neither multiple representations of a type nor method exclusion without violating typing constraints. These problems and the difference between inheritance and subtyping have been well recognized recently. Another approach to subtyping found in the literature is to separate inheritance from subtyping. In this approach, subtyping is solely determined by inheritance conformance. While subtyping based on interface conformance can support multiple representations, it cannot distinguish intended conformance from accidental conformance. This paper describes a new model of type and inheritance, called HANA, in which subtyping and inheritance are not separated, although differentiated. The notion of subtyping in HANA is based on both inheritance and interface conformance. HANA integrates multiple inheritance multiple representations, method exclusion, and method name overloading with static typing. HANA extends other existing methods of inheritance and subtyping with enhanced expressive power, increased reusability, and program efficiency. We show that the differentiation made by HANA between inheritance and subtyping allows name collision to be resolved without compromising the integrity of the type system. The capability of excluding an inherited method without violating static typing offers a sound solution for resolving name collision in multiple inheritance when used together with other mechanisms. We show that the mechanisms of method exclusion, addition, and renaming are othogonal with respect to the power of resolving name collision in multiple inheritance.

Item Type:Departmental Technical Report
Subjects:Computer Science > Historical Collection(Till Dec 2001)
ID Code:189
Deposited By:User autouser
Deposited On:05 December 2001