Lune

OOPSLA2023Top-tier venue

Mobius: Synthesizing Relational Queries with Recursive and Invented Predicates

Aalok Thakkar, Nathaniel Sands, George Petrou, Rajeev Alur, Mayur Naik, Mukund Raghothaman

Abstract

Synthesizing relational queries from data is challenging in the presence of recursion and invented predicates. We propose a fully automated approach to synthesize such queries. Our approach comprises of two steps: it first synthesizes a non-recursive query consistent with the given data, and then identifies recursion schemes in it and thereby generalizes to arbitrary data. This generalization is achieved by an iterative predicate unification procedure which exploits the notion of data provenance to accelerate convergence. In each iteration of the procedure, a constraint solver proposes a candidate query, and a query evaluator checks if the proposed program is consistent with the given data. The data provenance for a failed query allows us to construct additional constraints for the constraint solver and refine the search. We have implemented our approach in a tool named Mobius. On a suite of 21 challenging recursive query synthesis tasks, Mobius outperforms three state-of-the-art baselines Gensynth, ILASP, and Popper, both in terms of runtime and accuracy. We also demonstrate that the synthesized queries generalize well to unseen data.

Ask Lune

Know where this paper stands in minutes, not an afternoon.

Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

its abstract · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Inductive Synthesis of Inductive Heap PredicatesZiyi Yang, Ilya SergeyOOPSLA 2025 · 1 citation
  2. Polygon: Symbolic Reasoning for SQL using Conflict-Driven Under-Approximation SearchPinhan Zhao, Yuepeng Wang, Xinyu WangPLDI 2025

Related papers

  1. Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik et al.POPL 2020 · 49 citations
  2. Counterexample-Guided Partial Bounding for Recursive Function SynthesisAzadeh Farzan, Victor NicoletCAV 2021 · 13 citations
  3. Optimizing Recursive Queries with Progam SynthesisYisu Remy Wang, Mahmoud Abo Khamis, Hung Q. Ngo, Reinhard Pichler et al.SIGMOD 2022 · 9 citations
  4. Relational Query Synthesis ⋈ Decision Tree LearningAaditya Naik, Aalok Thakkar, Adam Stein, Rajeev Alur et al.VLDB 2024 · 2 citations
  5. Data-driven Recurrent Set Learning For Non-termination AnalysisZhilei Han, Fei HeICSE 2023 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines