%0 Conference Proceedings %F hema91 %A Henglein, Fritz %A Mairson, Harry G. %T The complexity of type inference for higher-order lambda calculi %B POPL '91: Proceedings of the 18th ACM SIGPLAN-SIGACT symposium on Principles of programming languages %P 119-130 %I ACM %C New York, NY, USA %X We analyze the computational complexity of type inference for untyped lambda-terms in the second-order polymorphic typed lambda-calculus (F2) invented by Gi- rard and Reynolds, as well as higher-order extensions F3, F4, . . . . Fw proposed by Girard. We prove that recognizing the F2-typable terms requires exponential time, and for Fw the problem is nonelementary. We show as well a sequence of lower bounds on recogniz- ing the Fk-typable terms, where the bound for Fk+1 is exponentially larger than that for Fk. The lower bounds are based on generic simulation of Turing Machines, where computation is simulated at the expression and type level simultaneously. Nonaccepting computations are mapped to non-normalizing reduction sequences, and hence non-typable terms. The accepting computations are mapped to typable terms, where higher-order types encode reduction sequences, and first-order types encode the entire computation as a circuit, based on a unification simulation of Boolean logic. A primary technical tool in this reduction is the composition of polymorphic functions having different domains and ranges. These results are the first nontrivial lower bounds on type inference for the Girard/Reynolds system as well as its higher-order extensions. We hope that the analy- sis provides important combinatorial insights which will prove useful in the ultimate resolution of the complexity of the type inference problem %U http://www.diku.dk/hjemmesider/ansatte/henglein/papers/henglein1991.pdf %U http://doi.acm.org/10.1145/99583.99602 %8 January %D 1991 %K parametricity