TY - GEN
T1 - Static type inference for parametric classes
AU - Ohori, Atsushi
AU - Buneman, Peter
N1 - Funding Information:
*This research was supported in part by grants NSF IRIM-10617, AR0 DAA62$%84k-0061 and ONR NOOO-14-88-K-0634. The first author was also supported in part by OK1 Electric In: dustry Co., Japan.
Publisher Copyright:
© 1989 ACM.
PY - 1989/9/1
Y1 - 1989/9/1
N2 - Central features of object-oriented programming are method inheritance and data abstraction attained through hierarchical organization of classes. Recent studies show that method inheritance can be nicely supported by ML style type inference when extended to labeled records. This is based on the fact 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 that allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations. Moreover, classes can be parameterized by types allowing "generic" definitions. The type correctness of class declarations is statically checked by the type system. The type system also infers a principal scheme for any type correct program containing methods and objects defined in classes.
AB - Central features of object-oriented programming are method inheritance and data abstraction attained through hierarchical organization of classes. Recent studies show that method inheritance can be nicely supported by ML style type inference when extended to labeled records. This is based on the fact 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 that allows the programmer to build a hierarchy of classes connected by multiple inheritance declarations. Moreover, classes can be parameterized by types allowing "generic" definitions. The type correctness of class declarations is statically checked by the type system. The type system also infers a principal scheme for any type correct program containing methods and objects defined in classes.
UR - http://www.scopus.com/inward/record.url?scp=84976785485&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=84976785485&partnerID=8YFLogxK
U2 - 10.1145/74877.74923
DO - 10.1145/74877.74923
M3 - Conference contribution
AN - SCOPUS:84976785485
T3 - Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1989
SP - 445
EP - 456
BT - Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1989
PB - Association for Computing Machinery, Inc
T2 - 1989 Object-Oriented Programming Systems, Languages and Applications, OOPSLA 1989
Y2 - 2 October 1989 through 6 October 1989
ER -