一句话:提出用关系扰动属性对示例合成施加语义偏置,自动增广示例以提升泛化能力。
基于示例的程序合成中,规约天然存在歧义,合成器可能产生在未见过输入上行为不符预期的程序。已有方法要么在假设空间上施加领域特定语法偏置,要么重度依赖用户反馈消歧。本文提出一个新框架,利用「关系扰动属性」对假设空间施加语义偏置:这类属性刻画程序输出的扰动/变化与输入的扰动/变化之间的关系,例如置换不变性——当输入数组元素被置换时输出不变。框架包含两个核心步骤:自动将关系扰动属性「施加」到用户提供的示例上以增广示例集,再用通用示例合成器生成与增广示例一致的方案。框架可跨领域与合成器移植,并支持三种用户介入程度不同的接口,包括用户仅提供示例、框架自动推断相关属性的接口。作者在面向 SKETCH 合成器的工具 SKETCHAX 中实现该框架,实验表明三种接口下 SKETCHAX 均显著提升 SKETCH 的性能。
Example-based specifications for program synthesis are inherently ambiguous and may cause synthesizers to generate programs that do not exhibit intended behavior on unseen inputs. Existing synthesis techniques attempt to address this problem by either placing a domain-specific syntactic bias on the hypothesis space or heavily relying on user feedback to help resolve ambiguity. We present a new framework to address the ambiguity/generalizability problem in example-based synthesis. The key feature of our framework is that it places a semantic bias on the hypothesis space using "relational perturbation properties" that relate the perturbation/change in a program output to the perturbation/change in a program input. An example of such a property is permutation invariance: the program output does not change when the elements of the program input (array) are permuted. The framework is portable across multiple domains and synthesizers and is based on two core steps: (1) automatically augment the set of user-provided examples by "applying" relational perturbation properties and (2) use a generic example-based synthesizer to generate a program consistent with the augmented set of examples. Our framework can be instantiated with three different user interfaces, with varying degrees of user engagement to help infer relevant relational perturbation properties. This includes an interface in which the user only provides examples and our framework automatically infers relevant properties. We implement our framework in a tool SKETCHAX specialized to the SKETCH synthesizer and demonstrate that SKETCHAX is effective in significantly boosting the performance of SKETCH for all three user interfaces.
@article{paperbot521,
title = {Augmented example-based synthesis using relational perturbation properties},
author = {Shengwei An and Rishabh Singh and Sasa Misailovic and Roopsha Samanta},
journal = {Proceedings of the ACM on Programming Languages},
volume = {4},
number = {POPL},
year = {2019},
doi = {10.1145/3371124}
}