← 研踪 PaperTrailarXiv:2611.28516 · v1
Bound to be Complete: Efficient Verification for SQL Equivalence via U-Expressions
首次提交 2026-11-21 11:09
版本更新 2026-11-21 11:09
雷达观测 2026-11-24 11:42
摘要
Automated verification of SQL query equivalence is a fundamental problem in database area. Recent works developed verifiers with guaranteed completeness, which can generate counterexamples to disprove non-equivalent queries and are useful in various scenarios. However, they have to solve complex formulas and can fail to produce counterexamples within a reasonable time budget. This paper presents a new complete verifier called SQLution, which not only greatly reduces the verification time, but also supports more SQL features. The key insight is to represent SQL semantics using U-expression, a functional algebra that can model SQL with significantly simpler formulas than prior works, thereby leading to more efficient SMT solving. To turn this insight into a practical verifier, SQLution further tackles two technical challenges associated with modeling SQL using U-expression, namely, the lack of tuple ordering and the presence of unbounded summations. In particular, to support tuple ordering, SQLution proposes order semantics encoding which combines U-expressions with first-order logic. To handle unbounded summation, SQLution introduces unbounded summation expansion to transform them into bounded summations, which can be directly encoded into FOL formulas. Evaluation shows that compared with state-of-the-art verifiers, SQLution can support all 271 non-equivalent query pairs derived from the Spider dataset and reduces verification time by up to 98.6%.
观测到的版本
相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。
v1 · 2026-11-21 11:09 · 最新观测版本
Bound to be Complete: Efficient Verification for SQL Equivalence via U-Expressions
Automated verification of SQL query equivalence is a fundamental problem in database area. Recent works developed verifiers with guaranteed completeness, which can generate counterexamples to disprove non-equivalent queries and are useful in various scenarios. However, they have to solve complex formulas and can fail to produce counterexamples within a reasonable time budget. This paper presents a new complete verifier called SQLution, which not only greatly reduces the verification time, but also supports more SQL features. The key insight is to represent SQL semantics using U-expression, a functional algebra that can model SQL with significantly simpler formulas than prior works, thereby leading to more efficient SMT solving. To turn this insight into a practical verifier, SQLution further tackles two technical challenges associated with modeling SQL using U-expression, namely, the lack of tuple ordering and the presence of unbounded summations. In particular, to support tuple ordering, SQLution proposes order semantics encoding which combines U-expressions with first-order logic. To handle unbounded summation, SQLution introduces unbounded summation expansion to transform them into bounded summations, which can be directly encoded into FOL formulas. Evaluation shows that compared with state-of-the-art verifiers, SQLution can support all 271 non-equivalent query pairs derived from the Spider dataset and reduces verification time by up to 98.6%.
查看此版本解读 →查看此版本原文 ↗