paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Synthesizing Graph Queries from Demonstrations

从演示中合成图查询
OOPSLA 10(OOPSLA2)2026匹配度 3/10 · 论文属于程序合成与领域特定语言方向,虽涉及图查询合成和工具实现,但用户核心关注的是静态分析、Agentic/ML 系统中的 PL 应用、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉;本文不直接涉及这些主题,LLM 仅作为基线出现。引用 0 inbox
Xiaoyu Liu, Qikang Liu, Evan Dyce, Keval Vora, Yuepeng Wang
crossref: 2026-10-02

AI 速览

一句话:提出结合图挖掘与演绎剪枝的图查询合成方法,实现工具 DMiner,可从用户的计算演示中高效合成图查询。

图数据模型复杂且需要识别合适的图模式,非专家编写图查询十分困难;尽管关系与文档数据库的查询合成已有进展,图查询合成问题仍研究不足。本文提出从计算演示中合成图查询的方法:用户在输入图的属性上以表达式形式给出期望输出。方法将图挖掘与基于演绎的剪枝相结合——前者在输入图上识别候选匹配模式,后者引导过滤谓词与返回子句的高效合成。作者实现工具 DMiner,并在 90 个基准上评估:DMiner 成功为 87 个基准合成出目标查询,平均每查询耗时 0.6 秒,优于枚举搜索与 LLM 基线。用户研究进一步表明,用户能以适度代价提供演示,且 87.5% 的演示足以让 DMiner 合成出目标查询。

问题
非专家因图数据模型复杂且难以识别合适的图模式,编写图查询十分困难;而现有查询合成工作主要面向关系与文档数据库,图查询合成尚未得到充分探索。
方法
从用户给出的计算演示(对输入图属性求值的表达式)出发,结合图挖掘识别候选图模式,并用基于演绎的剪枝高效合成过滤谓词与返回子句。
评估
在 90 个基准上评估工具 DMiner,87 个基准成功合成目标查询,平均每查询 0.6 秒,优于枚举搜索与 LLM 基线;并通过用户研究验证演示的提供代价与充分性。
原文摘要(Abstract)

Writing graph queries is challenging for non-experts due to the complexity of graph data models and the need to identify proper graph patterns. While recent research has advanced query synthesis for relational and document databases, the problem of synthesizing graph queries remains under-explored. We present a novel approach for synthesizing graph queries from computation demonstrations, where users specify the desired output through expressions over properties of input graphs. Our method addresses the challenge of inferring meaningful graph patterns for matching and efficiently constructing the remaining components of the query. Specifically, we combine graph mining, which identifies candidate patterns across input graphs, with deduction-based pruning, which guides an efficient synthesis of the filtering predicate and return clause. We have implemented our approach in a tool called DMiner and evaluated it on 90 benchmarks. Experimental results show that DMiner successfully synthesizes desired queries for 87 benchmarks, with an average synthesis time of 0.6 seconds per query. This outperforms both enumerative search and LLM baselines. We also conducted a user study, which shows that users can provide demonstrations with modest effort and 87.5% of the provided demonstrations are sufficient for DMiner to synthesize the desired query.

链接与引用

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

BibTeX
@article{paperbot12160,
  title = {Synthesizing Graph Queries from Demonstrations},
  author = {Xiaoyu Liu and Qikang Liu and Evan Dyce and Keval Vora and Yuepeng Wang},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839524}
}