Abstract

Program synthesis is one of the key research areas in software engineering. Many approaches design domain-specific language to constrain the program space to make the problem tractable. Although these approaches can be effective in certain domains, it is still a challenge to synthesize programs in generic programming languages. Fortunately, the component-based synthesis provides a promising way to generate generic programs from a component library of application programming interfaces (APIs). However, the program space constituted by all the APIs in the library is still very large. Hence, only small programs can be synthesized in practice. In recent years, many approaches of API recommendation have been proposed, which can recommend relevant APIs given some specifications. We think that applying this technique to component-based synthesis is a feasible way to reduce the program space. And we believe that how much support the API recommendation methods can provide to component-based synthesis is also an important criterion in measuring the effectiveness of these methods. In this paper, we investigate 5 state-of-the-art API recommendation methods to study their effectiveness in supporting component-based synthesis. Besides, we propose an approach of API Recommendation via General Search (ARGS). We collect a set of programming tasks and compare our approach with these 5 API recommendation methods on synthesizing these tasks. The experimental results show that the capability of these API recommendation methods is limited in supporting component-based synthesis. On the contrary, ARGS can support component-based synthesis well, which can effectively narrow down the program space and eventually improve the efficiency of program synthesis. The experimental results show that ARGS can help to significantly reduce the synthesis time by 86.1% compared to the original SyPet.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call