Reflections on complexity of ML type reconstruction

This is a collection of some more or less chaotic remarks on the ML type system, definitely not sufficient to fill a research paper of reasonable quality, but perhaps interesting enough to be written down as a note. At the beginning the idea was to investigate the complexity of type reconstruction and typability in bounded order fragments of ML. Unexpectedly the problem turned out to be hard, and finally I obtained only partial results. I do not feel like spending more time on this topic, so the text is not polished, the proofs — if included at all — are only sketched and of rather poor mathematical quality. I believe however, that some remarks, especially those of “philosophical” nature, shed some light on the ML type system and may be of some value to the reader interested especially in the interaction between theory and practice of ML type reconstruction.

[1]  Mike Paterson,et al.  Linear unification , 1976, STOC '76.

[2]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[3]  OkasakiChris Even higher-order functions for parsing or Why would anyone ever want to use a sixth-order function? , 1998 .

[4]  Chris Okasaki,et al.  Even higher-order functions for parsing or Why would anyone ever want to use a sixth-order function? , 1998, Journal of Functional Programming.

[5]  M. W. Shields An Introduction to Automata Theory , 1988 .

[6]  John C. Mitchell,et al.  On the Sequential Nature of Unification , 1984, J. Log. Program..

[7]  Harry G. Mairson,et al.  An Analysis of the Core-ML Language: Expressive Power and Type Reconstruction , 1994, ICALP.

[8]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[9]  P. J. Landin,et al.  Correspondence between ALGOL 60 and Church's Lambda-notation , 1965, Commun. ACM.

[10]  J. Goguen Higher-order functions considered unnecessary for higher-order programming , 1990 .

[11]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[12]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[13]  Jeffrey D. Ullman,et al.  Set Merging Algorithms , 1973, SIAM J. Comput..

[14]  Harry G. Mairson,et al.  The Complexity of Type Inference for Higher-Order Typed lambda Calculi , 1994, J. Funct. Program..

[15]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[16]  Paris C. Kanellakis,et al.  Functional database query languages as typed lambda calculi of fixed order (extended abstract) , 1994, PODS '94.

[17]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[18]  Daniel Leivant,et al.  Polymorphic type inference , 1983, POPL '83.

[19]  Harry G. Mairson,et al.  Unification and ML-Type Reconstruction , 1991, Computational Logic - Essays in Honor of Alan Robinson.

[20]  John C. Mitchell,et al.  Polymorphic unification and ML typing , 1989, POPL '89.

[21]  Harry G. Mairson Deciding ML typability is complete for deterministic exponential time , 1989, POPL '90.

[22]  David A. McAllester,et al.  Inferring Recursive Data Types , 1996 .

[23]  Jerzy Tiuryn,et al.  An analysis of ML typability , 1994, JACM.

[24]  Fritz Henglein,et al.  Type inference with polymorphic recursion , 1993, TOPL.