数据驱动程序完成
Data-Driven Program Completion
摘要:
我们介绍程序拼接,一种编程方法,旨在自动化复制,粘贴和修改在线可用代码的常用工作流程。在这里,程序员首先编写一个“草稿”,其中混合了未完成的代码、自然语言注释和测试用例或API调用序列约束形式的正确性要求。一个程序合成器,与一个大型的,可搜索的程序片段数据库进行交互,用于自动完成草案到一个程序,满足要求。合成过程分为两个阶段。首先,合成器识别数据库中与合成任务相关的少量节目。接下来,它使用枚举搜索,系统地填充这些相关程序的表达式和语句的草案。生成的程序返回给程序员,程序员可以修改它,并可能调用额外的合成轮。我们提出了一个实现的Java程序设计语言的程序拼接。该实施使用来自开源软件库的超过350万个程序的语料库。我们的评估使用该系统在一套日常编程任务,并包括一个比较与国家的最先进的竞争方法,以及用户研究。结果表明,广泛的范围和可扩展性的程序拼接,并表明该方法可以显着提高程序员的生产力。
英文摘要:
We introduce program splicing, a programming methodology that aims to automate the commonly used 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 in the form of test cases or API call sequence constraints. 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. We present an implementation of program splicing for the Java programming language. The implementation uses a corpus of over 3.5 million procedures from an open-source software repository. Our evaluation uses the system in a suite of everyday programming tasks, and includes a comparison with a state-of-the-art competing approach as well as a user study. The results point to the broad scope and scalability of program splicing and indicate that the approach can significantly boost programmer productivity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。