skip to main content
10.1145/317636.317788acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free access

Relating typability and expressiveness in finite-rank intersection type systems (extended abstract)

Published: 01 September 1999 Publication History

Abstract

We investigate finite-rank intersection type systems, analyzing the complexity of their type inference problems and their relation to the problem of recognizing semantically equivalent terms. Intersection types allow something of type τ1 Λ τ2 to be used in some places at type τ1 and in other places at type τ2. A finite-rank intersection type system bounds how deeply the Λ can appear in type expressions. Such type systems enjoy strong normalization, subject reduction, and computable type inference, and they support a pragmatics for implementing parametric polymorphism. As a consequence, they provide a conceptually simple and tractable alternative to the impredicative polymorphism of System F and its extensions, while typing many more programs than the Hindley-Milner type system found in ML and Haskell.While type inference is computable at every rank, we show that its complexity grows exponentially as rank increases. Let K(0, n) = n and K(t + 1, n) = 2K(t,n); we prove that recognizing the pure λ-terms of size n that are typable at rank k is complete for DTIME[K(k−1, n)]. We then consider the problem of deciding whether two λ-terms typable at rank k have the same normal form, generalizing a well-known result of Statman from simple types to finite-rank intersection types. We show that the equivalence problem is DTIME[K(K(k − 1, n), 2)]-complete. This relationship between the complexity of typability and expressiveness is identical in wellknown decidable type systems such as simple types and Hindley-Milner types, but seems to fail for System F and its generalizations. The correspondence gives rise to a conjecture that if Τ is a predicative type system where typability has complexity t(n) and expressiveness has complexity e(n), then t(n) = Ω(log* e(n)).

References

[1]
A. Asperti and H. G. Mairson. Parallel beta reduction is not elementary recursive. In Conference Record of POPL '98: The ~5th AGM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 303-315, San Diego, California, 19-21 Jan. 1998.
[2]
S. van Bakel. Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems. PhD thesis, Catholic University of Nijmegen, 1993.
[3]
H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North-Holland, revised edition, 1984.
[4]
M. Coppo, M. Dezani-Ciancaglinl, and B. Venneri. Principal type schemes and,k-calculus semantics. In J. P. Seldin and J. R. Hindley, eds., To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism, pp. 535-560. Academic Press, 1980.
[5]
M. Coppo, M. Dezani-Ciancaglini, and B. Venneri. Functional characters of solvable terms. Zeitschrift fiir Mathematishche Logik und Grundlagen der Mathematik, 27:45-58, 1981.
[6]
F. Henglein and H. G. Mairson. The complexity of type inference for higher-order typed lambda calculi. J. Funct. Prey., 4(4):435-478, Oct. 1994.
[7]
T. Jim. What are principal typings and what are they good for? In Conf. Rec. POPL '96: 23rd A CM Syrup. Principles of Prog. Languages, 1996.
[8]
F. Kamareddine. A reduction relation for which postponement of k-contractions, conservation and preservation of strong normalisation hold. Technical Report TR- 1996-11, Univ. of Glasgow, Glasgow G12 8QQ, Scot- !and, Mar. 1996.
[9]
P. C. Kanellakis, G. G. Hillebrand, and H. G. Muirson. An analysis of the Core-ML language: Expressive power and type reconstruction. In 21st int'l Colloq. on Automata, Languages, and Programming, vol. 820 of LNCS, pp. 83-106, 1994. Invited paper.
[10]
F. Kamareddine, A. Rios, and J. B. Wells. Calculi of generalised/~-reduction and explicit substitutions: The type free and simply typed versions. J. Functional ~4 Logic Programming, 1998(5), June 1998.
[11]
A. J. Kfoury and J. Tiuryn. Type reconstruction in finite-rank fragments of the second-order A-calculus. Inf. ~ Comput., 98(2):228-257, June 1992.
[12]
A. J. Kfoury and J. B. Wells. A direct algorithm for type inference in the rank-2 fragment of the secondorder )~-calculus. In Prec. 199,$ A CM Conf. LISP Funct. Program., 1994.
[13]
A. J. Kfoury and J. B. Wells. Addendum to "New notions of reduction and non-semantic proofs of/3-strong normalization in typed A-calculi". Tech. Rep. 95-007, Comp. Sci. Dept., Boston Univ., 1995.
[14]
A. J. Kfoury and J. B. Wells. Principality and decidable type inference for finite-rank intersection types. In Conf. Rec. POPL '99: 26th ACM Syrup. Principles of Prog. Languages, 1999.
[15]
D. Leivant. Polymorphic type inference, in Conf. Rec. lOth Ann. A CM Syrup. Principles of Programming Languages, pp. 88-98, 1983.
[16]
H. G. Mairson. Deciding ML typability is complete for deterministic exponential time. In Conf. Rec. 17th Ann. A CM Syrup. Principles of Programming Languages, pp. 382-401, 1990.
[17]
H. G. Mairson. A simple proof of a theorem of Statman. Theoretical Computer Science, 103(2);387-394, Sept. 1992.
[18]
A. R. Meyer. The inherent computational complexity of theories of ordered sets. In Proceedings of the International Congress of Mathematicians., pp. 477-482, 1974.
[19]
J. C. Mitchell. Foundations for Programming Languages. MIT Press, 1996.
[20]
S. Ronchi Della Rocca and B. Venneri. Principal type schemes for an extended type theory. Theor. Comp. Sc., 28:151-169, 1984.
[21]
H. Schwichtenberg. Complexity of normalization in the pure typed lambda-calculus. In A. S. Troelstra and D. van Dalen, eds., Proceedings L. E. J. Brouwer Centenary Syrup., vet. 110 of Studies in Logic and the Foundations of Mathematics, pp. 453-457, Noordwijkerhout, The Netherlands, June8-13, 1981. North- Holland, Amsterdam. Published in 1982.
[22]
Ft. Statman. The typed lambda -calculus is not elementary recursive. Theoretical Computer Science, 9(1):73- 81, July 1979.
[23]
J. B. Wells, A. Dimock, R. Muller, and F. Turbak. A typed intermediate language for flow-directed compilation. In Prec. 7th {nt'l Joint Conf. Theory ~4 Practice of Software Development, 1997. Superseded by {WDMT9X}.
[24]
J. B. Wells, A. Dimock, R. Muller, and F. Turbak. A calculus with polymorphlc and polyvariant flow types. J. Funct. Prog., 199X. To appear after revisions. Supersedes {WDMT97}.

Cited By

View all
  • (2019)Principality and approximation under dimensional boundProceedings of the ACM on Programming Languages10.1145/32903213:POPL(1-29)Online publication date: 2-Jan-2019
  • (2017)Typability in bounded dimensionProceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science10.5555/3329995.3330062(1-12)Online publication date: 20-Jun-2017
  • (2017)Typability in bounded dimension2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)10.1109/LICS.2017.8005127(1-12)Online publication date: Jun-2017
  • Show More Cited By

Index Terms

  1. Relating typability and expressiveness in finite-rank intersection type systems (extended abstract)

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ICFP '99: Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
    September 1999
    288 pages
    ISBN:1581131119
    DOI:10.1145/317636
    • Chairmen:
    • Didier Rémy,
    • Peter Lee
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 September 1999

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Conference

    ICFP99
    Sponsor:

    Acceptance Rates

    ICFP '99 Paper Acceptance Rate 25 of 81 submissions, 31%;
    Overall Acceptance Rate 333 of 1,064 submissions, 31%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)54
    • Downloads (Last 6 weeks)19
    Reflects downloads up to 21 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2019)Principality and approximation under dimensional boundProceedings of the ACM on Programming Languages10.1145/32903213:POPL(1-29)Online publication date: 2-Jan-2019
    • (2017)Typability in bounded dimensionProceedings of the 32nd Annual ACM/IEEE Symposium on Logic in Computer Science10.5555/3329995.3330062(1-12)Online publication date: 20-Jun-2017
    • (2017)Typability in bounded dimension2017 32nd Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)10.1109/LICS.2017.8005127(1-12)Online publication date: Jun-2017
    • (2017)Execution time of λ-terms via denotational semantics and intersection typesMathematical Structures in Computer Science10.1017/S096012951600039628:7(1169-1203)Online publication date: 30-Jan-2017
    • (2011)Strict intersection types for the Lambda CalculusACM Computing Surveys10.1145/1922649.192265743:3(1-49)Online publication date: 29-Apr-2011
    • (2010)On the rôle of minimal typing derivations in type-driven program transformationProceedings of the Tenth Workshop on Language Descriptions, Tools and Applications10.1145/1868281.1868283(1-8)Online publication date: 28-Mar-2010
    • (2007)Iterator typesProceedings of the 10th international conference on Foundations of software science and computational structures10.5555/1760037.1760042(17-31)Online publication date: 24-Mar-2007
    • (2007)Iterator TypesFoundations of Software Science and Computational Structures10.1007/978-3-540-71389-0_3(17-31)Online publication date: 2007
    • (2006)On Typability for Rank-2 Intersection Types with Polymorphic RecursionProceedings of the 21st Annual IEEE Symposium on Logic in Computer Science10.1109/LICS.2006.41(111-122)Online publication date: 12-Aug-2006
    • (2004)Types, potency, and idempotencyProceedings of the ninth ACM SIGPLAN international conference on Functional programming10.1145/1016850.1016871(138-149)Online publication date: 19-Sep-2004
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media