paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Top-Down Synthesis for Library Learning

面向库学习的自顶向下合成
POPL 7(POPL)2023匹配度 2/10 · 该论文属于程序合成与库学习,处于PL与AI交叉领域,但未涉及静态分析、形式化验证、浮点程序分析或LLM/Agent,与用户当前核心方向匹配度很低。引用 32 inbox
Matthew Bowers, Theo X. Olausson, Lionel Wong, Gabriel Grand, Joshua B. Tenenbaum, Kevin Ellis, Armando Solar-Lezama
crossref: 2026-09-10

AI 速览

一句话:提出语料引导的自顶向下合成算法 Stitch,从 DSL 程序语料中高效学习库抽象,速度与内存大幅优于 DreamCoder。

库学习旨在从某 DSL 的程序语料中抽取反复出现的功能,综合为可复用的库函数,从而压缩程序、提升开发效率。已有演绎式方法(如 DreamCoder)搜索代价高、内存开销大且难以扩展。本文提出语料引导的自顶向下合成:直接从 DSL 初始原语出发构造抽象,并利用中间抽象之间的语法模式匹配来剪除搜索空间,引导算法找到能最大程度捕获语料共享结构的抽象。作者实现了工具 Stitch,并与 DreamCoder 的演绎式库学习算法对比。实验表明,Stitch 在库质量(以压缩性衡量)相当或更优的前提下,速度快 3–4 个数量级、内存少约 2 个数量级;还能处理包含数百个复杂程序、此前演绎方法无法完成的语料,并可通过提前终止进一步扩展规模。

问题
如何从 DSL 程序语料中自动学习捕获共享功能的库抽象,且避免现有演绎式库学习方法(DreamCoder)速度慢、内存高、难以扩展的问题。
方法
提出语料引导的自顶向下合成:从 DSL 原语直接构造抽象,用中间抽象间的语法模式匹配剪枝搜索空间,引导搜索朝向最大化捕获语料共享结构的抽象,实现为 Stitch。
评估
与 DreamCoder 的演绎式库学习算法对比,以压缩性衡量库质量,并报告速度与内存开销;同时在含数百个复杂程序的语料上验证可扩展性,并测试提前终止(early stopping)的鲁棒性。
原文摘要(Abstract)

This paper introduces corpus-guided top-down synthesis as a mechanism for synthesizing library functions that capture common functionality from a corpus of programs in a domain specific language (DSL). The algorithm builds abstractions directly from initial DSL primitives, using syntactic pattern matching of intermediate abstractions to intelligently prune the search space and guide the algorithm towards abstractions that maximally capture shared structures in the corpus. We present an implementation of the approach in a tool called Stitch and evaluate it against the state-of-the-art deductive library learning algorithm from DreamCoder. Our evaluation shows that Stitch is 3-4 orders of magnitude faster and uses 2 orders of magnitude less memory while maintaining comparable or better library quality (as measured by compressivity). We also demonstrate Stitch’s scalability on corpora containing hundreds of complex programs that are intractable with prior deductive approaches and show empirically that it is robust to terminating the search procedure early—further allowing it to scale to challenging datasets by means of early stopping.

链接与引用

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

BibTeX
@article{paperbot2088,
  title = {Top-Down Synthesis for Library Learning},
  author = {Matthew Bowers and Theo X. Olausson and Lionel Wong and Gabriel Grand and Joshua B. Tenenbaum and Kevin Ellis and Armando Solar-Lezama},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {POPL},
  year = {2023},
  doi = {10.1145/3571234}
}