Type Inference for Partial Types is Decidable

The type inference problem for partial types, introduced by Thatte [15], is the problem of deducing types under a subtype relation with a largest element Ω and closed under the usual antimonotonic rule for function types. We show that this problem is decidable by reducing it to a satisfiability problem for type expressions over this partial order and giving an algorithm for the satisfiability problem. The satisfiability problem is harder than the one conventionally given because comparable types may have radically different shapes.

[1]  J. Roger Hindley,et al.  The Completeness Theorem for Typing lambda-Terms , 1983, Theor. Comput. Sci..

[2]  John C. Mitchell,et al.  Coercion and type inference , 1984, POPL.

[3]  J. Roger Hindley Curry's Type-Rules are Complete with Respect to the F-Semantics too , 1983, Theor. Comput. Sci..

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

[5]  Luca Cardelli,et al.  Basic Polymorphic Typechecking , 1987, Sci. Comput. Program..

[6]  Fritz Henglein,et al.  Efficient Type Inference for Higher-Order Binding-Time Analysis , 1991, FPCA.

[7]  Xavier Leroy,et al.  Dynamics in ML , 1991, FPCA.

[8]  Mitchell Wand,et al.  On the complexity of type inference with coercion , 1989, FPCA.

[9]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

[10]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[11]  Carsten K. Gomard Partial type inference for untyped functional programs , 1990, LISP and Functional Programming.

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

[13]  Mitchell Wand A semantic prototyping system , 1984, SIGPLAN '84.

[14]  John C. Mitchell,et al.  Type inference with simple subtypes , 1991, Journal of Functional Programming.

[15]  Satish R. Thatte,et al.  Type Inference with Partial Types , 1988, Theor. Comput. Sci..

[16]  Dominique Clément,et al.  A simple applicative language: mini-ML , 1986, LFP '86.

[17]  Prateek Mishra,et al.  Type Inference with Subtypes , 1990, Theor. Comput. Sci..