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

  • Authors:
  • A. J. Kfoury;J. B. Wells

  • Affiliations:
  • Dept. of Computer Science, Boston University;Dept. of Computer Science, Boston University

  • Venue:
  • LFP '94 Proceedings of the 1994 ACM conference on LISP and functional programming
  • Year:
  • 1994

Quantified Score

Hi-index 0.01

Visualization

Abstract

We examine the problem of type inference for a family of polymorphic type systems containing the power of Core-ML. This family comprises the levels of the stratification of the second-order &lgr;-calculus (system F) by “rank” of types. We show that typability is an undecidable problem at every rank k≥3. While it was already known that typability is decidable at rank 2, no direct and easy-to-implement algorithm was available. We develop a new notion of &lgr;-term reduction and use it to prove that the problem of typability at rank 2 is reducible to the problem of acyclic semi-unification. We also describe a simple procedure for solving acyclic semi-unification. Issues related to principle types are discussed.