Test-driven synthesis

Test-driven synthesis
复制标题

测试驱动综合

DOI:
--
复制
发表时间:
2014
期刊:
ACM-SIGPLAN Symposium on Programming Language Design and Implementation
影响因子:
--
通讯作者:
Peter Provost
Peter Provost
中科院分区:
--
文献类型:
--
作者:
Daniel Perelman;Sumit Gulwani;D. Grossman;Peter Provost

文献摘要

被引文献

相似文献

典型的编程技术仅通过提供输入/输出示例来授权最终用户创建简单程序。现有系统围绕专门针对特定数据类型或域特异性语言(DSL)的求解器设计。我们提出了一个程序合成器,该程序可以通过任意DSL进行参数化,该DSL可能包含条件和循环,因此能够在任何域中合成程序。为了使用我们的合成器,用户提供了一系列越来越复杂的输入/输出示例以及专家写的DSL定义。这两个输入对应于允许我们的合成器在任意域中工作的两个关键想法。首先,我们开发了一种受测试驱动开发启发的新型迭代合成技术---这也使我们的技术以测试驱动的合成的名称---在该程序进行完善的过程中一次消耗一个输入/输出示例。其次,DSL允许我们的系统采用有效的基于组件的方法来枚举可能的程序。我们介绍了合成方法对最终用户编程的应用,以在字符串,XML和表布局上进行转换。我们将这些应用程序的合成器与最先进的DSL特异性合成器以及通用合成器草图进行了比较。
Programming-by-example technologies empower end-users to create simple programs merely by providing input/output examples. Existing systems are designed around solvers specialized for a specific set of data types or domain-specific language (DSL). We present a program synthesizer which can be parameterized by an arbitrary DSL that may contain conditionals and loops and therefore is able to synthesize programs in any domain. In order to use our synthesizer, the user provides a sequence of increasingly sophisticated input/output examples along with an expert-written DSL definition. These two inputs correspond to the two key ideas that allow our synthesizer to work in arbitrary domains. First, we developed a novel iterative synthesis technique inspired by test-driven development---which also gives our technique the name of test-driven synthesis---where the input/output examples are consumed one at a time as the program is refined. Second, the DSL allows our system to take an efficient component-based approach to enumerating possible programs. We present applications of our synthesis methodology to end-user programming for transformations over strings, XML, and table layouts. We compare our synthesizer on these applications to state-of-the-art DSL-specific synthesizers as well to the general purpose synthesizer Sketch.