Strongly-Normalizing Higher-Order Relational Queries
-
Published:2022-08-17
Issue:
Volume:Volume 18, Issue 3
Page:
-
ISSN:1860-5974
-
Container-title:Logical Methods in Computer Science
-
language:en
-
Short-container-title:
Author:
Ricciotti Wilmer,Cheney James
Abstract
Language-integrated query is a powerful programming construct allowing
database queries and ordinary program code to interoperate seamlessly and
safely. Language-integrated query techniques rely on classical results about
the nested relational calculus, stating that its queries can be algorithmically
translated to SQL, as long as their result type is a flat relation. Cooper and
others advocated higher-order nested relational calculi as a basis for
language-integrated queries in functional languages such as Links and F#.
However, the translation of higher-order relational queries to SQL relies on a
rewrite system for which no strong normalization proof has been published: a
previous proof attempt does not deal correctly with rewrite rules that
duplicate subterms. This paper fills the gap in the literature, explaining the
difficulty with a previous proof attempt, and showing how to extend the
$\top\top$-lifting approach of Lindley and Stark to accommodate duplicating
rewrites. We also show how to extend the proof to a recently-introduced
calculus for heterogeneous queries mixing set and multiset semantics.
Funder
European Commission
Publisher
Centre pour la Communication Scientifique Directe (CCSD)
Subject
General Computer Science,Theoretical Computer Science
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Compiling Higher-Order Specifications to SMT Solvers: How to Deal with Rejection Constructively;Proceedings of the 12th ACM SIGPLAN International Conference on Certified Programs and Proofs;2023-01-11
2. A Formalization of SQL with Nulls;Journal of Automated Reasoning;2022-07-27
3. Reorganizing queries with grouping;Proceedings of the 19th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2020-11-16