Presynthesis:迈向通过更细粒度抽象语义扩大程序合成的规模
Presynthesis: Towards Scaling Up Program Synthesis with Finer-Grained Abstract Semantics
AI总结:
本文提出Presynthesis方法,通过引入离线预合成阶段,利用树自动机和oracle提升程序合成效率,显著优于现有方法。
摘要:
抽象语义已被证明对加速基于搜索的程序合成至关重要,因为它能够通过不枚举程序集来对错误程序进行有效剪枝。然而,随着抽象粒度的增加,剪枝成本也随之增加,从而限制了整体合成性能。本文提出一种离线预合成阶段,包括两个步骤:首先构建输入空间的树自动机A,然后构建oracle O,以实现快速剪枝。我们已在Foresighter框架中实现了该方法,并在SQL、字符串变换和矩阵操作领域开发了三种实例,均显著优于现有方法。
英文摘要:
Abstract semantics has proven to be instrumental for accelerating search-based program synthesis, by enabling the sound pruning of a set of incorrect programs (without enumerating them). One may expect faster synthesis with increasingly finer-grained abstract semantics. Unfortunately, to the best of our knowledge, this is not the case, yet. The reason is because, as abstraction granularity increases -- while fewer programs are enumerated -- pruning becomes more costly. This imposes a fundamental limit on the overall synthesis performance, which we aim to address in this work. Our key idea is to introduce an offline presynthesis phase, which consists of two steps. Given a DSL with abstract semantics, the first semantics modeling step constructs a tree automaton A for a space of inputs -- such that, for any program P and for any considered input I, A has a run that corresponds to P's execution on I under abstract semantics. Then, the second step builds an oracle O for A. This O enables fast pruning during synthesis, by allowing us to efficiently find exactly those DSL programs that satisfy a given input-output example under abstract semantics. We have implemented this presynthesis-based synthesis paradigm in a framework, Foresighter. On top of it, we have developed three instantiations for SQL, string transformation, and matrix manipulation. All of them significantly outperform prior work in the respective domains.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。