Affiliation:
1. University of Texas at Austin, USA
2. University of Wisconsin-Madison, USA
Abstract
Component-based approaches to program synthesis assemble programs from a database of existing components, such as methods provided by an API. In this paper, we present a novel type-directed algorithm for component-based synthesis. The key novelty of our approach is the use of a compact Petri-net representation to model relationships between methods in an API. Given a target method signature S, our approach performs reachability analysis on the underlying Petri-net model to identify sequences of method calls that could be used to synthesize an implementation of S. The programs synthesized by our algorithm are guaranteed to type check and pass all test cases provided by the user.
We have implemented this approach in a tool called SyPet, and used it to successfully synthesize real-world programming tasks extracted from on-line forums and existing code repositories. We also compare SyPet with two state-of-the-art synthesis tools, namely InSynth and CodeHint, and demonstrate that SyPet can synthesize more programs in less time. Finally, we compare our approach with an alternative solution based on hypergraphs and demonstrate its advantages.
Funder
Defense Advanced Research Projects Agency
National Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference47 articles.
1. SyPet. http://fredfeng.github.io/sypet/. SyPet. http://fredfeng.github.io/sypet/.
2. B. Avent A. Ritz and T. Murali. halp: Hypergraph Algorithms Package. http://murali-group.github.io/halp/. B. Avent A. Ritz and T. Murali. halp: Hypergraph Algorithms Package. http://murali-group.github.io/halp/.
Cited by
78 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Towards Type-Directed API Search for Mainstream Languages;Proceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development;2024-08-28
2. Equivalence by Canonicalization for Synthesis-Backed Refactoring;Proceedings of the ACM on Programming Languages;2024-06-20
3. Reward-Guided Synthesis of Intelligent Agents with Control Structures;Proceedings of the ACM on Programming Languages;2024-06-20
4. A Case for Synthesis of Recursive Quantum Unitary Programs;Proceedings of the ACM on Programming Languages;2024-01-05
5. Survey of intelligent program synthesis techniques;International Conference on Algorithms, High Performance Computing, and Artificial Intelligence (AHPCAI 2023);2023-12-07