Database
SeQLean: Verifying SQL queries using Lean
arXiv cs.DB0 views
arXiv:2611.33181v1 Announce Type: cross Abstract: We present SeQLean, a system that uses formal verification in Lean to increase the accuracy of translation from natural language to SQL. This is based on modelling SQL in Lean via relational algebras. Since we do not have a translation known to be correct, we cannot directly prove correctness. Instead, we use proof challenges: tests of internal consistency that are unlikely to be satisfied by an incorrect translation. The simplest proof challenge is based on generating two translations of the same natural language query into SQL, ideally with one being optimized for performance and the other for understandability. If two translations are equivalent, they must give the same answer for every database. This can be checked using proof automation in Lean. Using Lean allows us to have essentially arbitrary properties as proof challenges, and also check these (including equivalence) taking into account known properties of the underlying database system. Even for equivalence queries of an arithmetic nature, we show that Lean can be more powerful than traditional tools due to the availability of Mathlib theorems. A JSON API over HTTP allows the verifier to be integrated into agentic frameworks.
Source:https://arxiv.org/abs/2611.33181PreviousCache Replacement in Direct-Access Cloud OLAP-An Experimental Comparison and Practical GuidanceNextFirst-Class Relationships as a Representation Threshold: Identity, Time, Confidence, and Causation
Related posts
Building an Arabic and English QR menu for a restaurant: what to check first
0dev.to PHP
`wp search-replace` and Serialized Strings: Why a Plain Replace Can Corrupt Your Data
0dev.to PHP
From Herd Lite to Native PHP on Windows 11: Setting Up PHP 8.4.1, Composer and Laravel
0dev.to PHP
How a private tutor can track lesson minutes and cancellations
0dev.to PHP
csvq: a CSV command-line toolkit in Rust with Parquet conversion and SQL over files
0dev.to Rust

I made a free, fast, minimal, local to do note app built by Rust that helps you manage tasks better
0dev.to Rust