Affiliation:
1. University of California at Berkeley, USA
2. University of California at Irvine, USA
Abstract
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Cited by
42 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Programming by Example Made Easy;ACM Transactions on Software Engineering and Methodology;2023-11-24
2. Principled and practical static analysis for Python: Weakest precondition inference of hyperparameter constraints;Software: Practice and Experience;2023-11-22
3. C2TACO: Lifting Tensor Code to TACO;Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2023-10-22
4. mlirSynth: Automatic, Retargetable Program Raising in Multi-Level IR Using Program Synthesis;2023 32nd International Conference on Parallel Architectures and Compilation Techniques (PACT);2023-10-21
5. Fast and Reliable Program Synthesis via User Interaction;2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE);2023-09-11