论文标题
用混合抽象语义代表部分程序
Representing Partial Programs with Blended Abstract Semantics
论文作者
论文摘要
从示例中综合程序需要在可能的程序中搜索庞大的组合空间。在此搜索过程中,一个关键的挑战是代表在执行部分书面程序之前的行为,以判断它是否在正确的轨道上并预测下一步搜索的位置。我们介绍了一种通用技术,用于代表程序合成引擎中的部分书面程序。我们从抽象解释的技术中汲取灵感,其中使用大约执行模型来确定未完成的程序是否最终会满足目标规范。在这里,我们学习了实现的模块化神经网络的近似执行模型。通过构建基础编程语言的解释语义的构成程序表示形式,我们可以使用具体执行状态和学习的神经表示的灵活组合来表示部分程序,并在未知的具体语义时使用学识渊博的近似语义(在程序中未知零件中)。我们表明,这些混合神经符号表示使执行引导的合成器能够使用更强大的语言构建体,例如循环和高阶功能,并且可用于比在几个领域中的纯神经方法更准确地合成程序。
Synthesizing programs from examples requires searching over a vast, combinatorial space of possible programs. In this search process, a key challenge is representing the behavior of a partially written program before it can be executed, to judge if it is on the right track and predict where to search next. We introduce a general technique for representing partially written programs in a program synthesis engine. We take inspiration from the technique of abstract interpretation, in which an approximate execution model is used to determine if an unfinished program will eventually satisfy a goal specification. Here we learn an approximate execution model implemented as a modular neural network. By constructing compositional program representations that implicitly encode the interpretation semantics of the underlying programming language, we can represent partial programs using a flexible combination of concrete execution state and learned neural representations, using the learned approximate semantics when concrete semantics are not known (in unfinished parts of the program). We show that these hybrid neuro-symbolic representations enable execution-guided synthesizers to use more powerful language constructs, such as loops and higher-order functions, and can be used to synthesize programs more accurately for a given search budget than pure neural approaches in several domains.