paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SQLess: Dialect-Agnostic SQL Query Simplification

SQLess:方言无关的 SQL 查询简化
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 1/10 · 该论文聚焦数据库测试中的 SQL 查询简化,使用方言无关解析和依赖分析来缩短查询,属于测试/调试与修复领域;它与用户关注的 ML/Agentic 程序静态分析、LLM 与静态分析/形式化验证结合、浮点程序分析或贝叶斯程序分析均无直接关联。引用 2 inbox
Li Lin, Zongyin Hao, Chengpeng Wang, Zhuangda Wang, Rongxin Wu, Gang Fan
crossref: 2026-09-12

AI 速览

一句话:提出方言无关的 SQL 查询简化技术 SQLess,借助自适应解析与语义敏感裁剪,在保留触发缺陷能力的同时大幅缩短复杂查询。

DBMS 测试常需生成冗长复杂的 SQL 查询以触发深层缺陷,但这给开发者调试带来沉重负担,因此需要在保持触发缺陷能力的前提下简化查询。已有工作依赖特定 DBMS 语法,难以跨方言通用。本文提出 SQLess,采用方言无关的方法实现高效且语义正确的 SQL 查询简化:其自适应解析器结合错误恢复与语法扩展来支持不同 DBMS 方言,并通过别名分析与依赖分析实现语义敏感的查询裁剪,在缩减查询的同时保留触发缺陷的能力。作者在两个来自最新数据库缺陷检测研究的数据集上评估 SQLess,覆盖六种主流 DBMS 与三万二千余条复杂 SQL 查询。结果显示其平均简化率达 72.45%,相对当前最先进方法提升 84.91%。

问题
DBMS 测试生成的复杂冗长 SQL 查询虽能触发深层缺陷,却难以调试,而已有的查询简化方法依赖特定 DBMS 语法,无法跨方言通用。
方法
SQLess 使用带错误恢复与语法扩展的自适应解析器支持多种 DBMS 方言,并执行语义敏感的查询裁剪,借助别名与依赖分析在保留触发缺陷能力的同时简化查询。
评估
在两个来自最先进数据库缺陷检测研究的数据集上评估,覆盖六种广泛使用的 DBMS 与超过 32,000 条复杂 SQL 查询;平均简化率 72.45%,相较最先进方法提升 84.91%。
原文摘要(Abstract)

Database Management Systems (DBMSs) are fundamental to numerous enterprise applications. Due to the significance of DBMSs, various testing techniques have been proposed to detect DBMS bugs. However, to trigger deep bugs, most of the existing techniques focus on generating lengthy and complex queries which burdens developers with the difficult of debugging. Therefore, SQL query simplification, which aims to reduce lengthy SQL queries without compromising their ability to detect bugs, is highly demanded. To bridge this gap, we introduce SQLess, an innovative approach that employs a dialect-agnostic method for efficient and semantically correct SQL query simplification tailored for various DBMSs. Unlike previous works that have to depend on DBMS-specific grammar, SQLess utilizes an adaptive parser, which leverages error recovery and grammar expansion to support DBMS dialects. Moreover, SQLess performs a semantics-sensitive SQL query trimming, which leverages alias and dependency analysis to simplify SQL queries with preserving bug-triggering capability. We evaluate SQLess using two datasets from the state-of-theart database bug detection studies, encompassing six widely-used DBMSs and over 32,000 complex SQL queries. The results demonstrate SQLess’s superior performance: it achieves an average simplification rate of 72.45%, which significantly outperforms the stateof-the-art approaches by 84.91%.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8600,
  title = {SQLess: Dialect-Agnostic SQL Query Simplification},
  author = {Li Lin and Zongyin Hao and Chengpeng Wang and Zhuangda Wang and Rongxin Wu and Gang Fan},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680317}
}