Translating canonical SQL to imperative code in Coq - Archive ouverte HAL Accéder directement au contenu
Article Dans Une Revue Proceedings of the ACM on Programming Languages Année : 2022

Translating canonical SQL to imperative code in Coq

Résumé

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.
Fichier principal
Vignette du fichier
oopsla22main-p90-p-849926a7a9-61675-final.pdf (400.69 Ko) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte

Dates et versions

hal-03876233 , version 1 (28-11-2022)

Identifiants

Citer

Véronique Benzaken, Évelyne Contejean, Mohammed Houssem Hachmaoui, Chantal Keller, Louis Mandel, et al.. Translating canonical SQL to imperative code in Coq. Proceedings of the ACM on Programming Languages, 2022, 6 (OOPSLA1), pp.1-27. ⟨10.1145/3527327⟩. ⟨hal-03876233⟩
65 Consultations
52 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More