Results 1 - 10
of
16
The Complexity of Type Inference for Higher-Order Typed Lambda Calculi
- J. Funct. Programming
, 1991
"... We analyze the computational complexity of type inference for untyped -terms in the second-order polymorphic typed -calculus (F 2 ) invented by Girard and Reynolds, as well as higher-order extensions F 3 ; F 4 ; : : : ; F ! proposed by Girard. We prove that recognizing the F 2 - typable terms requir ..."
Abstract
-
Cited by 26 (10 self)
- Add to MetaCart
We analyze the computational complexity of type inference for untyped -terms in the second-order polymorphic typed -calculus (F 2 ) invented by Girard and Reynolds, as well as higher-order extensions F 3 ; F 4 ; : : : ; F ! proposed by Girard. We prove that recognizing the F 2 - typable terms requires exponential time, and for F ! the problem is nonelementary. We show as well a sequence of lower bounds on recognizing the F k -typable terms, where the bound for F k+1 is exponentially larger than that for F k . 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-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. ...
Database Query Languages Embedded in the Typed Lambda Calculus
, 1993
"... We investigate the expressive power of the typed -calculus when expressing computations over finite structures, i.e., databases. We show that the simply typed -calculus can express various database query languages such as the relational algebra, fixpoint logic, and the complex object algebra. In ..."
Abstract
-
Cited by 23 (7 self)
- Add to MetaCart
We investigate the expressive power of the typed -calculus when expressing computations over finite structures, i.e., databases. We show that the simply typed -calculus can express various database query languages such as the relational algebra, fixpoint logic, and the complex object algebra. In our embeddings, inputs and outputs are -terms encoding databases, and a program expressing a query is a -term which types when applied to an input and reduces to an output.
Relating Typability and Expressiveness in Finite-Rank Intersection Type Systems (Extended Abstract)
- In Proc. 1999 Int’l Conf. Functional Programming
, 1999
"... 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 T1 /\ T2 to be used in some places at type T1 and in other places ..."
Abstract
-
Cited by 21 (9 self)
- Add to MetaCart
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 T1 /\ T2 to be used in some places at type T1 and in other places at type T2 . 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) = 2^K(t,n); we prove that recognizing the pure lambda-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 lambda-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. ...
A simple proof of a theorem of Statman
- Theoretical Computer Science
, 1992
"... In this note, we reprove a theorem of Statman that deciding the fij-equality of two firstorder typable -terms is not elementary recursive [Sta79]. The basic idea of our proof, like that of Statman's, is the Henkin quantifier elimination procedure [Hen63]. However, our coding is much simpler, and eas ..."
Abstract
-
Cited by 19 (5 self)
- Add to MetaCart
In this note, we reprove a theorem of Statman that deciding the fij-equality of two firstorder typable -terms is not elementary recursive [Sta79]. The basic idea of our proof, like that of Statman's, is the Henkin quantifier elimination procedure [Hen63]. However, our coding is much simpler, and easy to understand. 1 Introduction A well known theorem of Richard Statman states that if we have two -terms that are first-order typable, deciding whether the terms reduce to the same normal form is not Kalmar elementary: namely, it cannot be decided in f k (n) steps for any fixed integer k 0, where n is the length of the two terms, and f 0 (n) = n, f t+1 (n) = 2 f t (n) . The theorem is often cited, but in contrast, its proof is not well understood. In this note, we give a simple proof of the theorem. The key idea that vastly simplifies the technical details of the proof is to use list iteration as a quantifier elimination procedure. 2 Preliminaries 2.1 Deciding truth of formulas in high...
Complexity of Nonrecursive Logic Programs with Complex Values
- In Proceedings of the 17th ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS’98
, 1998
"... We investigate complexity of the SUCCESS problem for logic query languages with complex values: check whether a query defines a nonempty set. The SUCCESS problem for recursive query languages with complex values is undecidable, so we study the complexity of nonrecursive queries. By complex values we ..."
Abstract
-
Cited by 14 (2 self)
- Add to MetaCart
We investigate complexity of the SUCCESS problem for logic query languages with complex values: check whether a query defines a nonempty set. The SUCCESS problem for recursive query languages with complex values is undecidable, so we study the complexity of nonrecursive queries. By complex values we understand values such as trees, finite sets, and multisets. Due to the well-known correspondence between relational query languages and datalog, our results can be considered as results about relational query languages with complex values. The paper gives a complete complexity classification of the SUCCESS problem for nonrecursive logic programs over trees depending on the underlying signature, presence of negation, and range restrictedness. We also prove several results about finite sets and multisets. 1 Introduction A number of complexity results have been established for logic query languages. They are surveyed in [49, 18]. The major themes in these results are the complexity and expr...
Functional Database Query Languages as Typed Lambda Calculi of Fixed Order (Extended Abstract)
- In Proceedings 13th PODS
, 1994
"... We present a functional framework for database query languages, which is analogous to the conventional logical framework of first-order and fixpoint formulas over finite structures. We use atomic constants of order 0, equality among these constants, variables, application, lambda abstraction, and le ..."
Abstract
-
Cited by 12 (6 self)
- Add to MetaCart
We present a functional framework for database query languages, which is analogous to the conventional logical framework of first-order and fixpoint formulas over finite structures. We use atomic constants of order 0, equality among these constants, variables, application, lambda abstraction, and let abstraction; all typed using fixed order ( 5) functionalities. In this framework, proposed in [21] for arbitrary order functionalities, queries and databases are both typed lambda terms, evaluation is by reduction, and the main programming technique is list iteration. We define two families of languages: TLI = i or simply-typed list iteration of order i +3 with equality, and MLI = i or ML-typed list iteration of order i+3 with equality; we use i+3 since our list representation of databases requires at least order 3. We show that: FO-queries ` TLI = 0 ` MLI = 0 ` LOGSPACE-queries ` TLI = 1 = MLI = 1 = PTIME-queries ` TLI = 2 , where equality is no longer a primitive in TLI = 2 . We also show that ML type inference, restricted to fixed order, is polynomial in the size of the program typed. Since programming by using low order functionalities and type inference is common in functional languages, our results indicate that such programs suffice for expressing efficient computations and that their ML-types can be efficiently inferred.
Finite Model Theory In The Simply Typed Lambda Calculus
, 1994
"... Church's simply typed -calculus is a very basic framework for functional programming language research. However, it is common to augment this framework with additional programming constructs, because its expressive power for functions over the domain of Church numerals is very limited. In this thesi ..."
Abstract
-
Cited by 8 (5 self)
- Add to MetaCart
Church's simply typed -calculus is a very basic framework for functional programming language research. However, it is common to augment this framework with additional programming constructs, because its expressive power for functions over the domain of Church numerals is very limited. In this thesis: (1) We re-examine the expressive power of the "pure" simply typed -calculus, but over encodings of finite relational structures, i. e., finite models or databases . In this novel framework the simply typed -calculus expresses all elementary functions from finite models to finite models. In addition, many common database query languages, e. g., relational algebra, Datalog : , and the Abiteboul/Beeri complex object algebra, can be embedded into it. The embeddings are feasible in the sense that the -terms corresponding to PTIME queries can be evaluated in polynomial time. (2) We examine fixed-order fragments of the simply typed -calculus to determine machine independent characterizations of complexity classes. For this we augment the calculus with atomic constants and equality among atomic constants. We show that over ordered structures, the order 3, 4, 5, and 6 fragments express exactly the first-order, PTIME, PSPACE, and EXPTIME queries, respectively, and we conjecture that for general k 1, order 2 k + 4 expresses exactly the k-EXPTIME queries and order 2 k + 5 expresses exactly the k-EXPSPACE queries. (3) We also re-examine other functional characterizations of PTIME and we show that method schemas with ordered objects express exactly PTIME. This is a first-order framework proposed for object-oriented databases---as opposed to the above higher-order frameworks. In summary, this research provides a link between finite model theory (and thus computational complexity), dat...
The "Hardest" Natural Decidable Theory
- 12th Annual IEEE Symp. on Logic in Computer Science (LICS'97)', IEEE
, 1997
"... We prove that any decision procedure for a modest fragment of L. Henkin's theory of pure propositional types [7, 12, 15, 11] requires time exceeding a tower of 2's of height exponential in the length of input. Until now the highest known lower bounds for natural decidable theories were at most linea ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
We prove that any decision procedure for a modest fragment of L. Henkin's theory of pure propositional types [7, 12, 15, 11] requires time exceeding a tower of 2's of height exponential in the length of input. Until now the highest known lower bounds for natural decidable theories were at most linearly high towers of 2's and since mid-seventies it was an open problem whether natural decidable theories requiring more than that exist [12, 2]. We give the affirmative answer. As an application of this today's strongest lower bound we improve known and settle new lower bounds for several problems in the simply typed lambda calculus. 1. Introduction In his survey paper [12] A. Meyer mentioned (p. 479), as a curious empirical observation, that all known natural decidable non-elementary problems require at most (upper bound) F (1; n) = exp 1 (n) = 2 2 \Delta \Delta \Delta 2 oe n Turing machine steps on inputs of length n to decide 1 . Until now the highest known lower bounds for natu...
(Optimal) duplication is not elementary recursive
- Information and Computation
, 2000
"... In the last ten years there has been a steady interest in optimal reduction of -terms (or, more generally, of functional programs). The very story started, in fact, more than twenty ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
In the last ten years there has been a steady interest in optimal reduction of -terms (or, more generally, of functional programs). The very story started, in fact, more than twenty
An Analysis of the Core-ML Language: Expressive Power and Type Reconstruction
- In Proc. 21st Int'l Coll. Automata, Languages, and Programming
, 1994
"... Core-ML is a basic subset of most functional programming languages. It consists of the simply typed (or monomorphic) -calculus, simply typed equality over atomic constants, and let as the only polymorphic construct. We present a synthesis of recent results which characterize this "toy" language' ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
Core-ML is a basic subset of most functional programming languages. It consists of the simply typed (or monomorphic) -calculus, simply typed equality over atomic constants, and let as the only polymorphic construct. We present a synthesis of recent results which characterize this "toy" language's expressive power as well as its type reconstruction (or type inference) problem. More specifically: (1) Core-ML can express exactly the ELEMENTARY queries, where a program input is a database encoded as a -term and a query program is a -term whose application to the input normalizes to the output database. In addition, it is possible to express all the PTIME queries so that this normalization process is polynomial in the input size. (2) The polymorphism of let can be explained using a simple algorithmic reduction to monomorphism, and provides flexibility, without affecting expressibility. Algorithms for type reconstruction offer the additional convenience of static typing without type declarations. Given polymorphism, the price of this convenience is an increase in complexity from linear-time in the size of the program typed (without let) to completeness in exponential-time (with let).

