Inhabitation of Low-Rank Intersection Types [chapter]

Paweł Urzyczyn
2009 Lecture Notes in Computer Science  
We prove that the inhabitation problem ("Does there exist a closed term of a given type?") is undecidable for intersection types of rank 3 and exponential space complete for intersection types of rank 2. Introduction Calculi with intersection types have been known for almost 30 years [4, 16] and their importance is widely recognized in the literature. Just to mention a few applications: construction of lambda-models [2,4], normalization issues and optimal reductions [16, 15] , type inference
more » ... compilation [6, 22] . Another, more foundational, aspect is the logic of intersection types. It has been noticed long ago that this "proof-functional", rather than "truth-functional", logic significantly differs from most other logical systems [1, 13, 14] and various studies were undertaken to understand the nature of this peculiar logic [5, 12, 17, 21] . In particular, it is known that the decision problem for the logic of intersections, that is, the inhabitation problem, is undecidable [20] . This means that the expressive power of the propositional (!) logic of intersections is enormous. It is thus important to locate the exact borderline between decidable and undecidable cases. We address here the question what is the maximal rank of types for which the logic of intersection is still decidable, and what is the complexity? (Roughly speaking, an intersection of simple types is of rank 1, and a rank n + 1 type has arguments of rank n.) In [20] it is shown that the inhabitation problem is undecidable for types of rank 4. For rank 2 the problem is decidable, but Exptime-hard [10]. (Incidentally, rank 2 subsystem is interesting in that its typing power is exactly the same as of rank 2 parametric polymorphism [23].) This paper aims at closing the gap between the results of [10, 20] . We show that the logic of rank 3 types is undecidable (Theorem 4). We also improve the lower bound for rank 2, proving Expspace-hardness. Since the obvious algorithm for rank 2 runs in exponential space, we conclude that the problem is Expspacecomplete (Theorem 9). The intermediate problem used in the proof of Theorem 9 is the halting problem for a bus machine-an alternating device operating on a fixed length word, but expanding its own program (the set of available instructions) during the computation. This relatively simple model capturing the notion of exponential space, without explicitly operating in exponential space, may perhaps be of some interest by itself?
doi:10.1007/978-3-642-02273-9_26 fatcat:brffyidd3fccjkc67egifbb3tm