Deciding ML typability is complete for deterministic exponential time
@inproceedings{Mairson1989DecidingMT, title={Deciding ML typability is complete for deterministic exponential time}, author={Harry G. Mairson}, booktitle={POPL '90}, year={1989} }
A well known but incorrect piece of functional programming folklore is that ML expressions can be efficiently typed in polynomial time. In probing the truth of that folklore, various researchers, including Wand, Buneman, Kanellakis, and Mitchell, constructed simple counterexamples consisting of typable ML programs having length n, with principal types having &OHgr;(2cn) distinct type variables and length &OHgr;(22cn). When the types associated with these ML constructions were represented as…
Figures from this paper
122 Citations
Unification and ML-Type Reconstruction
- Computer ScienceComputational Logic - Essays in Honor of Alan Robinson
- 1991
The generic simulation of any exponential time Turing Machine by ML type reconstruction may be viewed as a nonstandard way of computing with types and its worst-case lower bounds stand in contrast to practical experience, which suggests that commonly used algorithms for type reconstruction do not slow compilation substantially.
On the Complexity of ML Typability with Overloading
- MathematicsFPCA
- 1991
It is shown that under a correct notion of well-typed terms, the problem of determining whether a term is well typed with respect to an assumption set in an ML-style type system is undecidable, and a limited form of recursion called parametric recursion is considered.
Inferring Recursive Data Types
- Computer Science
- 1996
The result is that for any xed bound on order and arity Hindley-Milner typability can be determined in pseudo-linear time, i.e., O(nn(n)) where is the inverse Ackerman function and the last two results suggest that let-polymorphism over simple types is fundamentally more tractable than let- poly Morphism over recursive types.
An analysis of ML typability
- MathematicsJACM
- 1994
It is proved that ML typability and acyclic semi-unification can be reduced to each other in polynomial time.
Efficient type inference using ranked type variables
- Computer ScienceML '07
- 2007
Two ranking systems based on lambda depth, used in the SML/NJ compiler and OCaml, are formalized, both with and without the value restriction, and they are proved correct relative to the classic algorithm W.
Type Inference with Inequalities
- Computer ScienceTAPSOFT, Vol.1
- 1991
This work considers an implicitly typed language equipped with recursive types, multiple inheritance, 1st order parametric polymorphism, and assignments, and type correctness as satisfiability of a possibly infinite collection of inequalities on the types of variables and expressions.
Incremental Polymorphism Incremental Polymorphism
- Computer Science
- 1991
An incremental typing mechanism in which top-level phrases can be compiled one by one, in any order, and repeatedly (due to editing), and it is shown that the incremental type system is sound and complete with respect to the more traditional \batch system.
The Nimble Type Inferencer for Common Lisp-84
- Computer Science
- 1990
Kaplan's algorithm provides the maximal amount of information, but it depends upon a rather simplified model for a programming language: a language with variables and iteration, but no recursion or data structures.
Syntactic Properties of Polymorphic Subtyping
- Biology
- 2009
This paper identifies a new instance relation on typing judgements, the halbstark relation, and presents a sound and complete type inference algorithm in the style of Milner's Algorithm W, which provides a generalized correctness argument for Al algorithm W independent of any particular constraint simplification strategy chosen.
Extending the Type Checker of Standard ML by Polymorphic Recursion
- Computer ScienceTheor. Comput. Sci.
- 1999
References
SHOWING 1-10 OF 15 REFERENCES
Polymorphic unification and ML typing
- Computer SciencePOPL '89
- 1989
After observing that ML typing is in DEXPTIME, it is shown that polymorphic unification is PSPACE hard, and it is proved that recognizing the typable core ML programs is also PSPACEhard.
Relationships Between Nondeterministic and Deterministic Tape Complexities
- Computer ScienceJ. Comput. Syst. Sci.
- 1970
Partial polymorphic type inference and higher-order unification
- Computer ScienceLISP and Functional Programming
- 1988
It is shown that the problem of partial type inference in the nth-order polymorphic &lgr;-calculus is equivalent to n fourth-order unification, and an implementation in &l gr;Prolog in full is presented.
The undecidability of the semi-unification problem
- Computer ScienceSTOC '90
- 1990
It is shown that SUP in general is undecidable, by reducing what is called the "boundedness problem of Turing machines to SUP", which is a natural generalization of both first-order unification and matching.
The Design and Analysis of Computer Algorithms
- Computer Science
- 1974
This text introduces the basic data structures and programming techniques often used in efficient algorithms, and covers use of lists, push-down stacks, queues, trees, and graphs.
Proofs and types
- Philosophy
- 1989
Sense, denotation and semantics natural deduction the Curry-Howard isomorphism the normalisation theorem Godel's system T coherence spaces denotational semantics of T sums in natural deduction system…
Structure and Interpretation of Computer Programs
- Computer Science
- 1985
Structure and Interpretation of Computer Programs emphasizes the central role played by different approaches to dealing with time in computational models, appropriate for an introduction to computer science courses, as well as programming languages and program design.