Department of Computer Science and Technology

Technical reports

Higher-order unification, polymorphism, and subsorts

Tobias Nipkow

15 pages

DOI: 10.48456/tr-210

Abstract

This paper analyses the problems that arise in extending Huet’s higher-order unification algorithm from the simply typed λ-calculus to one with type variables. A simple, incomplete, but in practice very useful extension to Huet’s algorithm is discussed. This extension takes an abstract view of types. As a particular instance we explore a type system with ML-style polymorphism enriched with a notion of sorts. Sorts are partially ordered and classify types, thus giving rise to an order-sorted algebra of types. Type classes in the functional language Haskell can be understood as sorts in this sense. Sufficient conditions on the sort structure to ensure the existence of principal types are discussed. Finally we suggest a new type system for the λ-calculus which may pave the way to a complete unification algorithm for polymorphic terms.

Full text

PDF (1.1 MB)

BibTeX record

@TechReport{UCAM-CL-TR-210,
  author =	 {Nipkow, Tobias},
  title = 	 {{Higher-order unification, polymorphism, and subsorts}},
  url = 	 {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-210.pdf},
  institution =  {University of Cambridge, Computer Laboratory},
  doi = 	 {10.48456/tr-210},
  number = 	 {UCAM-CL-TR-210}
}