Lune

PLDI2025Top-tier venue

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

Pinhan Zhao, Yuepeng Wang, Xinyu Wang

2025Year
1Top-tier citations

Abstract

We present a novel symbolic reasoning engine for SQL which can efficiently generate an input ๐ผ for ๐‘› queries ๐‘ƒ 1 , โ€ข โ€ข โ€ข , ๐‘ƒ ๐‘› , such that their outputs on ๐ผ 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 ๐‘ƒ ๐‘– -that is, a subset of ๐‘ƒ ๐‘– '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.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 9d848db5-804d-47ab-9d10-1d167651ae9c

Cited by top-tier papers1

Ask how each one uses it

Builds on14

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines