Partial Polymorphic Type Inference Is Undecidable

Polymorphic type systems combine the reliability and efficiency of static type-checking with the flexibility of dynamic type checking. Unfortunately, such languages tend to be unwieldy unless they accommodate omission of much of the information necessary to perform type checking. The automatic inference of omitted type information has emerged as one of the fundamental new implementation problems of these languages. We show here that a natural formalization of the problem is undecidable. The proof is directly applicable to some practical situations, and provides a partial explanation of the difficulties encountered in other cases.

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

[2]  Richard D. Jenks,et al.  A Primer: 11 Keys to New Scratchpad , 1984, Symbolic and Algebraic Computation.

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

[4]  Hans-Juergen Boehm,et al.  Implementing RUSSELL , 1986, SIGPLAN '86.

[5]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[6]  Gordon D. Plotkin,et al.  An ideal model for recursive polymorphic types , 1984, Inf. Control..

[7]  Nancy McCracken,et al.  The Typechecking of Programs with Implicit Type Structure , 1984, Semantics of Data Types.

[8]  John L. Bell,et al.  A course in mathematical logic , 1977 .

[9]  Warren D. Goldfarb,et al.  The Undecidability of the Second-Order Unification Problem , 1981, Theor. Comput. Sci..

[10]  James E. Donahue,et al.  An Informal Description of Russell , 1980 .

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

[12]  John Mitchell,et al.  Type Inference and Type Containment , 1984, Semantics of Data Types.