Type inference with simple subtypes
John C. Mitchell · Journal of Functional Programming · 1991
Abstract 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.
Cited by 139 works. doi:10.1017/s0956796800000113 Open-access PDF
Authors
References
- Lecture Notes in Computer Science 1205
- A Machine-Oriented Logic Based on the Resolution Principle
- Compilers: Principles, Techniques, and Tools
- Data Structures and Algorithms
- A theory of type polymorphism in programming
- Handbook of theoretical computer science
- Data Structures and Algorithms
- The Lambda Calculus - Its Syntax and Semantics
- Graduate Texts in Mathematics
- Data types as lattices