Hostname: page-component-77f85d65b8-9nbrm Total loading time: 0 Render date: 2026-04-20T05:15:33.099Z Has data issue: false hasContentIssue false

Type inference with simple subtypes

Published online by Cambridge University Press:  07 November 2008

John C. Mitchell
Affiliation:
Department of Computer Science, Margaret Jacks Hall, Stanford University, Stanford, CA 94305-2140USA
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Subtyping appears in a variety of programming languages, in the form of the ‘automatic coercion’ of integers to reals, Pascal subranges, and subtypes arising from class hierarchies in languages with inheritance. A general framework based on untyped lambda calculus provides a simple semantic model of subtyping and is used to demonstrate that an extension of Curry's type inference rules are semantically complete. An algorithm G for computing the most general typing associated with any given expression, and a restricted, optimized algorithm GA using only atomic subtyping hypotheses are developed. Both algorithms may be extended to insert type conversion functions at compile time or allow polymorphic function declarations as in ML.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 1991
Submit a response

Discussions

No Discussions have been published for this article.