A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus

A. J. Kfoury, J. B. Wells
1994 Proceedings of the 1994 ACM conference on LISP and functional programming - LFP '94  
We study the problem of type inference for a family of polymorphic type disciplines containing the power of Core-ML. This family comprises all levels of the strati cation of the second-order lambda-calculus by \ r a n k " o f t ypes. We s h o w that typability is an undecidable problem at every rank k 3 of this strati cation. While it was already known that typability is decidable at rank 2, no direct and easy-to-implement algorithm was available. To design such an algorithm, we d e v elop a
more » ... notion of reduction and show h o w to use it to reduce the problem of typability at rank 2 to the problem of acyclic semi-uni cation. A by-product of our analysis is the publication of a simple solution procedure for acyclic semi-uni cation.
doi:10.1145/182409.182456 dblp:conf/lfp/KfouryW94 fatcat:b56pwql3qzgldahjpzvfdbetky