DeepAI AI Chat
Log In Sign Up

Generating collection queries from proofs

05/13/2020
by   Michael Benedikt, et al.
0

Nested relations, built up from atomic types via tupling and set types, form a rich data model. Over the last decades the nested relational calculus, NRC, has emerged as a standard language for defining transformations on nested collections. NRC is a strongly-typed functional language which allows building up queries using products and projections, a singleton-former, and a map operation that lifts queries on tuples to queries on sets. In this work we show that NRC has a strong connection with first-order logic: it contains exactly the transformations that are implicitly definable by formulas φ in first-order logic with quantification suited for nested collections. We also prove an effective variant of our result, providing a procedure that synthesizes an NRC expression in polynomial time from a proof witnessing that φ provides an implicit definition for one subset of its free variables in terms of another subset of the variables. This synthesis result works off of proofs within an intuitionistic calculus that captures a natural style of reasoning about implicit definability in the context of nested collections.

READ FULL TEXT

page 1

page 2

page 3

page 4

12/06/2022

Synthesizing nested relational queries from implicit specifications: via model theory and via proof theory

Derived datasets can be defined implicitly or explicitly. An implicit de...
09/17/2022

Synthesizing Nested Relational Queries from Implicit Specifications

Derived datasets can be defined implicitly or explicitly. An implicit de...
11/12/2020

Scalable Querying of Nested Data

While large-scale distributed data processing platforms have become an a...
11/26/2020

Strongly-Normalizing Higher-Order Relational Queries

Language-integrated query is a powerful programming construct allowing d...
05/06/2019

Mixing set and bag semantics

The conservativity theorem for nested relational calculus implies that q...
01/13/2021

Parametricity for Nested Types and GADTs

This paper considers parametricity and its consequent free theorems for ...
06/09/2011

A Knowledge Compilation Map

We propose a perspective on knowledge compilation which calls for analyz...