AutoPandas: Neural-Backed Generators for Program Synthesis

AutoPandas: Neural-Backed Generators for Program Synthesis
复制标题

DOI:
10.1145/3360594
复制
发表时间:
2019-10-01
影响因子:
1.8
通讯作者:
Stoica, Ion
Stoica, Ion
中科院分区:
其他
文献类型:
--
作者:
Bavishi, Rohan;Lemieux, Caroline;Stoica, Ion

文献摘要

被引文献

相似文献

如今,开发人员必须应对越来越多的API。虽然从长远来看,它们对开发人员非常有用,但许多现代API的学习曲线非常陡峭,因为它们有数百个函数处理许多参数,模糊的文档以及频繁更改的语义。对于执行数据转换的API,新手通常可以提供一个I/O示例来演示所需的转换,但可能会被如何将其转换为API所困。一个采用这种I/O示例并直接在目标API中生成程序的示例编程合成引擎可以帮助这些新手。由于真实世界API的广度以及函数参数上通常复杂的约束,这样的引擎提出了独特的挑战。我们提出了一个基于生成器的综合方法来对付这些问题。这种方法使用了一个程序候选生成器,它编码的空间上的程序的基本约束。我们引入了神经支持的操作符,可以无缝集成到程序生成器中。为了提高搜索的效率,我们只是在不确定的决策点使用这些操作符,而不是依赖于特定于域的算法。我们在AUTOPANDAS中为Python pandas库实现了这种技术。AUTOPANDAS支持119个pandas框架转换函数。我们在26个真实世界的基准测试中评估了AUTOPANDAS,发现它解决了其中的17个。
Developers nowadays have to contend with a growing number of APIs. While in the long-term they are very useful to developers, many modern APIs have an incredibly steep learning curve, due to their hundreds of functions handling many arguments, obscure documentation, and frequently changing semantics. For APIs that perform data transformations, novices can often provide an I/O example demonstrating the desired transformation, but may be stuck on how to translate it to the API. A programming-by-example synthesis engine that takes such I/O examples and directly produces programs in the target API could help such novices. Such an engine presents unique challenges due to the breadth of real-world APIs, and the often-complex constraints over function arguments. We present a generator-based synthesis approach to contend with these problems. This approach uses a program candidate generator, which encodes basic constraints on the space of programs. We introduce neural-backed operators which can be seamlessly integrated into the program generator. To improve the efficiency of the search, we simply use these operators at non-deterministic decision points, instead of relying on domain-specific heuristics. We implement this technique for the Python pandas library in AUTOPANDAS. AUTOPANDAS supports 119 pandas dataframe transformation functions. We evaluate AUTOPANDAS on 26 real-world benchmarks and find it solves 17 of them.