Hostname: page-component-77f85d65b8-8wtlm Total loading time: 0 Render date: 2026-03-29T12:32:10.436Z Has data issue: false hasContentIssue false

The complexity of type inference for higher-order typed lambda calculi

Published online by Cambridge University Press:  07 November 2008

Fritz Henglein
Affiliation:
DIKU, University of Copenhagen, Universitetsparken 1, 2100 Copenhagen, Denmark
Harry G. Mairson
Affiliation:
Computer Science Department, Brandeis University, Waltham, MA 02254, USA
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

We analyse the computational complexity of type inference for untyped λ-terms in the second-order polymorphic typed λ-calculus (F2) invented by Girard and Reynolds, as well as higher-order extensions F3, F4, …, Fω proposed by Girard. We prove that recognising the F2-typable terms requires exponential time, and for Fω the problem is non-elementary. We show as well a sequence of lower bounds on recognising 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. Non-accepting computations are mapped to non-normalising 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 analysis provides important combinatorial insights which will prove useful in the ultimate resolution of the complexity of the type inference problem.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 1994
Submit a response

Discussions

No Discussions have been published for this article.