Edinburgh Research Explorer

Static Type Inference for Parametric Classes

Research output: Chapter in Book/Report/Conference proceedingChapter

Related Edinburgh Organisations


Original languageEnglish
Title of host publicationTheoretical Aspects of Object-Oriented Programming
EditorsC.A. Gunter, J.C. Mitchel
PublisherMIT Press
Number of pages28
ISBN (Print)978-0262071550
Publication statusPublished - 1994


Method inheritance and data abstraction are central features of object-oriented programming that are attained through a hierarchical organization of classes. Recent studies have shown that method inheritance can be supported by an ML style type inference when extended to labeled records. This is based on the observation that a function that selects a field f of a record can be given a polymorphic type that enables it to be applied to any record which contains a field f. Several type systems also provide data abstraction through abstract type declarations.  However, these two features have not yet been properly integrated in a statically checked polymorphic type system.

This paper proposes a static type system that achieves this integration in an ML-like polymorphic language by adding a class construct which allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations.  Classes can be parameterized by types allowing "generic" definitions.  The type correctness of class declarations is statically checked, and a principal scheme is inferred for any type correct program containing methods and objects defined in classes.  Moreover, the type system can be extended to include the structures and operations needed for database programming and therefore can serve as a basis of an object-oriented database programming language.

Download statistics

No data available

ID: 10623630