Results 1 
5 of
5
On the Complexity of Nonrecursive XQuery and Functional Query Languages on Complex Values
 In Proc. PODS’05
"... This article studies the complexity of evaluating functional query languages for complex values such as monad algebra and the recursionfree fragment of XQuery. We show that monad algebra with equality restricted to atomic values is complete for the class TA[2O(n) , O(n)] of problems solvable in lin ..."
Abstract

Cited by 47 (2 self)
 Add to MetaCart
This article studies the complexity of evaluating functional query languages for complex values such as monad algebra and the recursionfree fragment of XQuery. We show that monad algebra with equality restricted to atomic values is complete for the class TA[2O(n) , O(n)] of problems solvable in linear exponential time with a linear number of alternations. The monotone fragment of monad algebra with atomic value equality but without negation is complete for nondeterministic exponential time. For monad algebra with deep equality, we establish TA[2O(n) , O(n)] lower and exponentialspace upper bounds. We also study a fragment of XQuery, Core XQuery, that seems to incorporate all the features of a query language on complex values that are traditionally deemed essential. A close connection between monad algebra on lists and Core XQuery (with “child ” as the only axis) is exhibited, and it is shown that these languages are expressively equivalent up to representation issues. We show that Core XQuery is just as hard as monad algebra w.r.t. query and combined complexity, and that it is in TC0 if the query is assumed fixed. As Core XQuery is NEXPTIMEhard, it is commonly believed that any algorithm for evaluating Core XQuery has to require exponential amounts of working memory and doubly exponential time in the worst case. We present a property of queries – the lack of a certain form of composition – that virtually all realworld XQueries have and that allows for query evaluation in singly exponential time and polynomial space. Still, we are able to show for an important special case – Core XQuery with equality testing restricted to atomic values – that the compositionfree language is just as expressive as the language with composition. Thus, under widelyheld complexitytheoretic assumptions, the compositionfree language is an exponentially less succinct version of the language with composition.
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 28 (6 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.
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 firstorder 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 13 (5 self)
 Add to MetaCart
We present a functional framework for database query languages, which is analogous to the conventional logical framework of firstorder 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 simplytyped list iteration of order i +3 with equality, and MLI = i or MLtyped 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: FOqueries ` TLI = 0 ` MLI = 0 ` LOGSPACEqueries ` TLI = 1 = MLI = 1 = PTIMEqueries ` 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 MLtypes can be efficiently inferred.
On the expressive power of simply typed and letpolymorphic lambda calculi
 11th Annual IEEE Symp. on Logic in Computer Science (LICS'96)
, 1996
"... We present a functional framework for descriptive computational complexity, in which the Regular, Firstorder, Ptime, Pspace, kExptime, kExpspace (k 1), and Elementary sets have syntactic characterizations. In this framework, typed lambda terms represent inputs and outputs as well as programs. The ..."
Abstract

Cited by 9 (0 self)
 Add to MetaCart
We present a functional framework for descriptive computational complexity, in which the Regular, Firstorder, Ptime, Pspace, kExptime, kExpspace (k 1), and Elementary sets have syntactic characterizations. In this framework, typed lambda terms represent inputs and outputs as well as programs. The lambda calculi describing the above computational complexity classes are simply or letpolymorphically typed with functionalities of fixed order. They consist of: order 0 atomic constants, order 1 equality among these constants, variables, application, and abstraction. Increasing functionality order by one for these languages corresponds to increasing the computational complexity by one alternation. This exact correspondence is established using a semantic evaluation of languages for each fixed order, which is the primary technical contribution of this paper.
An Analysis of the CoreML Language: Expressive Power and Type Reconstruction
 In Proc. 21st Int'l Coll. Automata, Languages, and Programming
, 1994
"... CoreML 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" ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
CoreML 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) CoreML 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 lineartime in the size of the program typed (without let) to completeness in exponentialtime (with let).