Finitely Stratified Polymorphism

Abstract We consider predicative type-abstraction disciplines based on type quantification with finitely stratified levels. These lie in the vast middle ground between quantifier-free parametric abstraction and full impredicative abstraction. Stratified polymorphism has an unproblematic set-theoretic semantics, and may lend itself to new approaches to type inference, without sacrificing useful expressive power. Our main technical result is that the functions representable in the finitely stratified polymorphic λ-calculus are precisely the super-elementary functions, i.e., the class e4 in Grzegorczyk's subrecursive hierarchy. This implies that there is no super-elementary bound on the length of optimal normalization sequences, and that the equality problem for finitely stratified polymorphic λ-expressions is not super-elementary. We also observe that finitely stratified polymorphism augmented with type recursion admits functional algorithms that are not typable in the full second order λ-calculus.

[1]  Daniel Leivant,et al.  Contracting proofs to programs , 1989 .

[2]  Rozsa Peter Review: Andrzej Grzegorczyk, Some Classes of Recursive Functions , 1955 .

[3]  N. P. Mendler,et al.  Recursive Types and Type Constraints in Second-Order Lambda Calculus , 1987, LICS.

[4]  Daniel Leivant Discrete polymorphism , 1990, LISP and Functional Programming.

[5]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[6]  Daniel Leivant,et al.  Stratified polymorphism , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[7]  H. Friedman Equality between functionals , 1975 .

[8]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[9]  Richard Statman,et al.  The Typed lambda-Calculus is not Elementary Recursive , 1979, Theor. Comput. Sci..

[10]  Daniel Leivant,et al.  The Expressiveness of Simple and Second-Order Type Structures , 1983, JACM.

[11]  Hao Wang,et al.  The Formalization of Mathematics , 1954, J. Symb. Log..

[12]  A. Grzegorczyk Some classes of recursive functions , 1964 .

[13]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[14]  H. Schwichtenberg,et al.  Rekursionszahlen und die Grzegorczyk-Hierarchie , 1969 .

[15]  Jon L. White Proceedings of the 1992 ACM conference on LISP and functional programming , 1992 .

[16]  Alan Mycroft,et al.  Polymorphic Type Schemes and Recursive Definitions , 1984, Symposium on Programming.

[17]  John C. Reynolds,et al.  Polymorphism is not Set-Theoretic , 1984, Semantics of Data Types.

[18]  John C. Reynolds,et al.  On Functors Expressible in the Polymorphic Typed Lambda Calculus , 1993, Inf. Comput..

[19]  B. Russell Mathematical Logic as Based on the Theory of Types , 1908 .

[20]  Richard Statman,et al.  The typed λ-calculus is not elementary recursive , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[21]  Hao Wang,et al.  Logic, Computers, and Sets , 1970 .

[22]  R. Statman Number theoretic functions computable by polymorphic programs , 1981, 22nd Annual Symposium on Foundations of Computer Science (sfcs 1981).

[23]  Michael O'Donnell,et al.  A programming language theorem which is independent of Peano Arithmetic , 1979, STOC.

[24]  Jerzy Tiuryn,et al.  A proper extension of ML with an effective type-assignment , 1988, POPL '88.

[25]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[26]  Peter Aczel,et al.  An Introduction to Inductive Definitions , 1977 .