Abstract
This paper analyzes 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.
(Extended Abstract)
Research supported by ESPRIT BRA 3245, Logical Frameworks.
Preview
Unable to display preview. Download preview PDF.
References
P.B. Andrews, D.A. Miller, E.L. Cohen, F. Pfenning. Automating Higher-Order Logic. In Automated Theorem Proving: After 25 Years, AMS Contemporary Mathematics Series 29 (1984), 169–192.
H. Barendregt. Introduction to Generalised Type Systems. To appear in J. Functional Programming.
N. G. de Bruijn. Lambda Calculus Notation with Nameless Dummies, a Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem. Indagationes Mathematicae 34 (1972), 381–392.
N. Dershowitz, J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen (editor), Handbook of Theoretical Computer Science, Vol B: Formal Methods and Semantics, North-Holland, to appear.
C. Elliot. Higher-Order Unification with Dependent Function Types. Proc. Rewriting Techniques and Applications, LNCS 355 (1989), 121–136.
K. Futatsugi, J.A. Goguen, J.-P. Jouannaud, J. Meseguer. Principles of OBJ2. Proc. 12th ACM Symp. Principles of Programming Languages (1985), 52–66.
P. Hudak, P. Wadler (Eds.). Report on the Programming Language Haskell. Version 1.0, April 1990.
J.-P. Jouannaud, C. Kirchner. Solving Equations in Abstract Algebras: A Rule-Based Survey of Unification. Technical report, March 1990.
W. Goldfarb. The Undecidability of the Second-Order Unification Problem. Theoretical Computer Science 13 (1981), 225–230.
J.R. Hindley, J.P. Seldin. Introduction to Combinators and λ-Calculus, Cambridge University Press (1986).
G.P. Huet. A Unification Algorithm for Typed λ-Calculus. Theoretical Computer Science 1 (1975), 27–57.
P. Martin-Löf. Intuitionistic Type Theory. Bibliopolis (1984).
J. Meseguer, J.A. Goguen, G. Smolka. Order-Sorted Unification. J. Symbolic Computation 8 (1989), 383–413.
G. Nadathur. A Higher-Order Logic as the Basis for Logic Programming. PhD Thesis, University of Pennsylvania (1987).
P. Narendran, F. Pfenning, R. Statman. On the Unification Problem for Cartesian Closed Categories. Ergo Report 89-082, School of Computer Science, Carnegie Mellon University, September 1989.
T. Nipkow, G. Snelting. Type Classes and Overloading Resolution via Order-Sorted Unification. Tech. Rep. 200, University of Cambridge, Computer Laboratory, August 1990.
L.C. Paulson. Natural Deduction as Higher-Order Resolution. J. Logic Programming 3 (1986), 237–258.
L.C. Paulson. Isabelle: The Next 700 Theorem Provers. In P. Odifreddi (editor), Logic and Computer Science, Academic Press (1990), 361–385.
L.C. Paulson. T. Nipkow: Isabelle Tutorial and User's Manual, Tech. Rep. 189, University of Cambridge, Computer Laboratory, January 1990.
M. Schmidt-Schauß. A Many-Sorted Calculus with Polymorphic Functions Based on Resolution and Paramodulation. Proc. 9th Int. Joint Conf. Artificial Intelligence (1985), 1162–1168.
M. Schmidt-Schauß. Computational Aspects of an Order-Sorted Logic with Term Declarations, LNCS 395 (1989).
G. Smolka, W. Nutt, J.A. Goguen, J. Meseguer. Order-Sorted Equational Computation. In H. Aït-Kaci and M. Nivat (eds.), Resolution of Equations in Algebraic Structures Vol. 2, Academic Press (1989), 297–367.
W. Snyder, J. Gallier. Higher-Order Unification Revisited: Complete Sets of Transformations. J. Symbolic Computation 8 (1989), 101–140.
P. Wadler, S. Blott. How to Make ad-hoc Polymorphism Less ad hoc. Proc. 16th ACM Symp. Principles of Programming Languages (1989), 60–76.
U. Waldmann: Unification in Order-Sorted Signatures. Forschungsbericht 298, Universität Dortmund, Fachbereich Informatik (1989).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nipkow, T. (1991). Higher-order unification, polymorphism, and subsorts. In: Kaplan, S., Okada, M. (eds) Conditional and Typed Rewriting Systems. CTRS 1990. Lecture Notes in Computer Science, vol 516. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54317-1_112
Download citation
DOI: https://doi.org/10.1007/3-540-54317-1_112
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54317-6
Online ISBN: 978-3-540-47558-3
eBook Packages: Springer Book Archive