Functional database query languages as typed lambda calculi of fixed order (extended abstract)
Functional database query languages as typed lambda calculi of fixed order (extended abstract)
复制标题
函数式数据库查询语言作为固定顺序的类型化 lambda 演算(扩展抽象)
DOI:
--
复制
发表时间:
1994
期刊:
影响因子:
--
通讯作者:
P. Kanellakis
中科院分区:
文献类型:
--
作者:
Gerd G. Hillebrand;P. Kanellakis
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 ⊆ TLI2, where equality is no longer a primitive in TLI2. 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.