Q*cert: A Platform for Implementing and Verifying Query Compilers

We present Q*cert, a platform for the specification, verification, and implementation of query compilers written using the Coq proof assistant. The Q*cert platform is open source and includes some support for SQL and OQL, and for code generation to Spark and Cloudant. It internally relies on familiar database intermediate representations, notably the nested relational algebra and calculus and a novel extension of the nested relational algebra that eases the handling of environments. The platform also comes with simple but functional and extensible query optimizers. We demonstrate how the platform can be used to implement a compiler for a new input language or develop new optimizations that can be formally verified. We also demonstrate a web-based interface that allows the developer to explore various compilation and optimization strategies.

[1]  Hugo Herbelin,et al.  The Coq proof assistant : reference manual, version 6.1 , 1997 .

[2]  Hamid Pirahesh,et al.  Extensible/rule based query rewrite optimization in Starburst , 1992, SIGMOD '92.

[3]  David J. DeWitt,et al.  The Architecture of the EXODUS Extensible DBMS , 1986, On Object-Oriented Database System.

[4]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[5]  Stanley B. Zdonik,et al.  Rule languages and internal algebras for rule-based optimizers , 1996, SIGMOD '96.

[6]  Guido Moerkotte,et al.  Nested Queries in Object Bases , 1993, DBPL.

[7]  Hafedh Mili,et al.  Agile Business Rule Development - Process, Architecture, and JRules Examples , 2011 .

[8]  Scott Shenker,et al.  Spark: Cluster Computing with Working Sets , 2010, HotCloud.

[9]  Martin Hirzel,et al.  A Pattern Calculus for Rule Languages: Expressiveness, Compilation, and Mechanization (Artifact) , 2015, Dagstuhl Artifacts Ser..

[10]  Erik Meijer The world according to LINQ , 2011, CACM.

[11]  Christine Paulin-Mohring,et al.  The coq proof assistant reference manual , 2000 .

[12]  Joshua S. Auerbach,et al.  Handling Environments in a Nested Relational Algebra with Combinators and an Implementation in a Verified Query Compiler , 2017, SIGMOD Conference.

[13]  Pierre Letouzey Extraction in Coq: An Overview , 2008, CiE.

[14]  Véronique Benzaken,et al.  A Coq Formalization of the Relational Data Model , 2014, ESOP.

[15]  Martin Hirzel,et al.  A Pattern Calculus for Rule Languages: Expressiveness, Compilation, and Mechanization , 2015, ECOOP.

[16]  Hafedh Mili,et al.  Agile Business Rule Development , 2011 .