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.
翻译:从示例中合成程序需要搜索一个庞大的组合空间。 在这一搜索过程中, 关键的挑战在于代表一个部分书面程序在可以执行之前的行为, 判断它是否在正确的轨道上, 并预测下一步要搜索的位置 。 我们引入了一种在程序合成引擎中代表部分书面程序的一般技术 。 我们从抽象解释技术中得到灵感, 在这种技术中, 使用一个近似执行模型来确定一个未完成程序最终是否达到目标规格 。 我们在这里学习了一个作为模块神经网络执行的大致执行模型 。 通过构建一个含有隐含基本程序语言解释语义的构成方案演示, 我们可以代表部分程序, 使用具体执行状态和知识神经表现的灵活组合, 在具体语义不为人知( 程序未完成的部分 ) 时使用所学到的近似语义 。 我们显示, 这些混合神经- 数学表现使执行引导合成器能够使用更强大的语言构造, 如循环和更高排序功能, 并且可以用来将程序合成比多个区域纯神经学方法更精确地用于给定的搜索预算。