arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2206.07828cs.PL
收藏

搜索纠缠程序空间

Searching Entangled Program Spaces

James Koppel, Zheng Guo, Edsko de Vries, Armando Solar-Lezama, Nadia Polikarpova

摘要:

许多问题领域,包括程序合成和基于重写的优化,需要搜索天文数字般大的程序空间。现有的方法通常依赖于构建专门的数据结构--版本空间代数、有限树自动机或e图--来复杂地表示这些程序。为了找到一个紧凑的表示,现有的数据结构利用子项的独立性;当子项的选择纠缠在一起时,它们会爆炸。我们引入了等式约束树自动机(ECTA),这是上述三种数据结构的推广,可以有效地表示具有纠缠子项的大型程序空间。我们提出了有效的算法,从ECTA提取程序,实现在一个高性能的Haskell库,\texttt{ecta}。使用\texttt{ecta},我们构建了\textsc{Hectare},一个类型驱动的Haskell程序合成器。\textsc{Hectare}的性能明显优于最先进的合成器Hocycle + --提供8倍的平均加速--尽管其实现要小一个数量级。

英文摘要:

Many problem domains, including program synthesis and rewrite-based optimization, require searching astronomically large spaces of programs. Existing approaches often rely on building specialized data structures -- version-space algebras, finite tree automata, or e-graphs -- to compactly represent these programs. To find a compact representation, existing data structures exploit independence of subterms; they blow up when the choices of subterms are entangled. We introduce equality-constrained tree automata (ECTAs), a generalization of the three aforementioned data structures that can efficiently represent large spaces of programs with entangled subterms. We present efficient algorithms for extracting programs from ECTAs, implemented in a performant Haskell library, \texttt{ecta}. Using \texttt{ecta} we construct \textsc{Hectare}, a type-driven program synthesizer for Haskell. \textsc{Hectare} significantly outperforms a state-of-the-art synthesizer Hoogle+ -- providing an average speedup of 8x -- despite its implementation being an order of magnitude smaller.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑