Abstract

We extend polymorphic type inference with a very general notion of subtype based on the concept of type transformation. This paper describes the following results. We prove the existence of (i) principal type property and (ii) syntactic completeness of the type-checker, for type inference with subtypes. This result is developed with only minimal assumptions on the underlying theory of subtypes. As a consequence, it can be used as the basis for type inference with a broad class of subtype theories. For a particular “structural” theory of subtypes, those engendered by inclusions between type constants only, we show that principal types are compactly expressible. This suggests that type inference for the structured theory of subtypes is feasible. We describe algorithms necessary for such a system. The main algorithm we develop is called MATCH, an extension to the classical unification algorithm. A proof of correctness for MATCH is given.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call