一句话:提出程序拼接方法,通过程序合成器与可检索的代码片段数据库交互,自动将草稿补全为满足需求的程序。
论文提出“程序拼接”这一编程方法,旨在自动化程序员在线复制、粘贴并修改代码的工作流。程序员首先编写一个草稿,其中混合了未完成的代码、自然语言注释以及正确性需求。随后,一个与大型可检索程序片段数据库交互的合成器被用来把草稿自动补全为满足需求的程序。整个合成过程分为两个阶段:首先,合成器识别数据库中与当前合成任务相关的小部分程序;其次,它利用枚举式搜索,系统地用这些相关程序中的表达式和语句填充草稿。生成的程序会返回给程序员,程序员可以对其进行修改,并可能触发额外的多轮合成。该工作将代码复用、程序合成与交互式开发流程结合起来。
We introduce program splicing, a programming methodology that aims to automate the workflow of copying, pasting, and modifying code available online. Here, the programmer starts by writing a "draft" that mixes unfinished code, natural language comments, and correctness requirements. A program synthesizer that interacts with a large, searchable database of program snippets is used to automatically complete the draft into a program that meets the requirements. The synthesis process happens in two stages. First, the synthesizer identifies a small number of programs in the database that are relevant to the synthesis task. Next it uses an enumerative search to systematically fill the draft with expressions and statements from these relevant programs. The resulting program is returned to the programmer, who can modify it and possibly invoke additional rounds of synthesis.
DOI 原文 ·
@inproceedings{paperbot4513,
title = {Program splicing},
author = {Yanxin Lu and Swarat Chaudhuri and Chris Jermaine and David Melski},
booktitle = {ICSE},
year = {2018},
doi = {10.1145/3180155.3180190}
}