paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation Search

Polygon:使用冲突驱动欠近似搜索的 SQL 符号推理
PLDI 9(PLDI)2025匹配度 2/10 · 论文聚焦 SQL 查询的符号推理与 SMT 求解,属于程序验证/约束求解方向,但未涉及用户核心关注的 LLM/Agent、浮点程序分析或贝叶斯程序分析,也未面向 ML/Agentic 系统。引用 0 inbox
Pinhan Zhao, Yuepeng Wang, Xinyu Wang
crossref: 2026-09-10

AI 速览

一句话:提出 Polygon,用冲突驱动欠近似搜索为 SQL 查询生成满足 SMT 属性的输入,以反驳等价性或消歧查询。

论文面向 SQL 查询的符号推理问题:给定多个查询 P1,...,Pn,需高效生成一个数据库实例 I,使其输出满足用 SMT 编码的属性,以支持 SQL 等价性反驳和查询消歧等任务。方法上,Polygon 首先对每个查询构造欠近似,即其输入-输出行为的一个子集,使推理语义感知且轻量;但固定欠近似不完备,会遗漏关注行为。为此,作者在一族可表达且能共同覆盖所有关注程序行为的欠近似上进行冲突驱动搜索,从而恢复完备性。工具在超过 30,000 个基准上评估两个任务,显示显著优于先前技术。

问题
如何为多个 SQL 查询生成一个输入实例,使其输出满足给定的 SMT 属性,用于反驳查询等价性或对查询集进行消歧。
方法
对每个查询使用语义感知的欠近似,并在可覆盖关注行为的一族欠近似上进行冲突驱动搜索,兼顾轻量与完备性。
评估
在超过 30,000 个基准上,针对 SQL 等价性反驳与查询消歧两项任务,与先前技术比较,Polygon 显著更优。
原文摘要(Abstract)

We present a novel symbolic reasoning engine for SQL which can efficiently generate an input I for n queries P 1 , ⋯, P n , such that their outputs on I satisfy a given property (expressed in SMT). This is useful in different contexts, such as disproving equivalence of two SQL queries and disambiguating a set of queries. Our first idea is to reason about an under-approximation of each P i –that is, a subset of P i ’s input-output behaviors. While it makes our approach both semantics-aware and lightweight, this idea alone is incomplete (as a fixed under-approximation might miss some behaviors of interest). Therefore, our second idea is to perform search over an expressive family of under-approximations (which collectively cover all program behaviors of interest), thereby making our approach complete. We have implemented these ideas in a tool, Polygon , and evaluated it on over 30,000 benchmarks across two tasks (namely, SQL equivalence refutation and query disambiguation). Our evaluation results show that Polygon significantly outperforms all prior techniques.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot3094,
  title = {Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation Search},
  author = {Pinhan Zhao and Yuepeng Wang and Xinyu Wang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {PLDI},
  year = {2025},
  doi = {10.1145/3729303}
}