LAUSR.org creates dashboard-style pages of related content for over 1.5 million academic articles. Sign Up to like articles & get recommendations!

Accelerating API-Based Program Synthesis via API Usage Pattern Mining

Photo by bady from unsplash

Program Synthesis is an exciting topic in software engineering which aims to generate programs satisfying user intent automatically. Although different approaches have been proposed in program synthesis, only small or… Click to show full abstract

Program Synthesis is an exciting topic in software engineering which aims to generate programs satisfying user intent automatically. Although different approaches have been proposed in program synthesis, only small or domain-specific programs can be generated in practice, the main obstacle of which lies in the intractability of program space. With the rapid growth of reusable libraries, component-based synthesis provides a promising way, such as synthesizing Java programs that are only composed of APIs. However, the efficiency of searching for proper solutions for complex tasks is still a challenge. In certain scenarios, some API methods are frequently called together. The usage of these API methods always follows some usage patterns. Incorporating the information about API usage patterns will help to accelerate the speed of program synthesis. However, state-of-the-art synthesis tools do not capture the inherent relationships between API methods. Aiming at this problem, we propose a novel approach to accelerate the speed of API-based program synthesis via API usage pattern mining. It is a general approach that can be applied to any approach of API-based synthesis. We first collect open source projects of high quality from the Internet and use an off-the-shelf API-usage-pattern-mining tool to mine API usage patterns from these code snippets. We use two strategies to incorporate the information about API usage patterns with program synthesis, and either strategy can improve the efficiency of program synthesis. We evaluate our approach on 20 real programming tasks, which shows that our approach can accelerate the speed of program synthesis by 86% compared to the baseline.

Keywords: program; synthesis; usage pattern; api based; api usage; program synthesis

Journal Title: IEEE Access
Year Published: 2019

Link to full text (if available)


Share on Social Media:                               Sign Up to like & get
recommendations!

Related content

More Information              News              Social Media              Video              Recommended



                Click one of the above tabs to view related content.