arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2203.08941cs.PLcs.DB
收藏

规范SQL到命令码的Coq翻译

Translating Canonical SQL to Imperative Code in Coq

Véronique Benzaken, Évelyne Contejean, Mohammed Houssem Hachmaoui, Chantal Keller, Louis Mandel, Avraham Shinnar, Jérôme Siméon

摘要:

SQL是迄今为止使用和实现最广泛的查询语言。然而,在一些关键特性上,比如相关查询和空值语义,许多实现存在分歧或包含错误。我们利用SQL和查询编译器的形式化的最新进展来开发DBCert,这是第一个从以规范形式编写的SQL查询到命令式代码的机械验证编译器。构建DBCert需要几个新的贡献,本文对此进行了描述。首先,我们指定和机械化一个完整的转换,从SQL到嵌套关系代数,可用于查询优化。其次,我们定义了Imp,这是一种足以表达SQL的小型命令式语言,可以针对包括JavaScript在内的几种执行语言。最后,我们开发了一个机械化的翻译从嵌套关系代数Imp,使用嵌套的关系演算作为中间步骤。

英文摘要:

SQL is by far the most widely used and implemented query language. Yet, on some key features, such as correlated queries and NULL value semantics, many implementations diverge or contain bugs. We leverage recent advances in the formalization of SQL and query compilers to develop DBCert, the first mechanically verified compiler from SQL queries written in a canonical form to imperative code. Building DBCert required several new contributions which are described in this paper. First, we specify and mechanize a complete translation from SQL to the Nested Relational Algebra which can be used for query optimization. Second, we define Imp, a small imperative language sufficient to express SQL and which can target several execution languages including JavaScript. Finally, we develop a mechanized translation from the nested relational algebra to Imp, using the nested relational calculus as an intermediate step.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑