From API to NLI: A New Interface for Library Reuse

07/07/2020
by   Qi Shen, et al.
0

Developers frequently reuse APIs from existing libraries to implement certain functionality. However, learning APIs is difficult due to their large scale and complexity. In this paper, we design an abstract framework NLI2Code to ease the reuse process. Under the framework, users can reuse library functionalities with a high-level, automatically-generated NLI (Natural Language Interface) instead of the detailed API elements. The framework consists of three components: a functional feature extractor to summarize the frequently-used library functions in natural language form, a code pattern miner to give a code template for each functional feature, and a synthesizer to complete code patterns into well-typed snippets. From the perspective of a user, a reuse task under NLI2Code starts from choosing a functional feature and our framework will guide the user to synthesize the desired solution. We instantiated the framework as a tool to reuse Java libraries. The evaluation shows our tool can generate a high-quality natural language interface and save half of the coding time for newcomers to solve real-world programming tasks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/16/2020

Optimising the Fit of Stack Overflow Code Snippets into Existing Code

Software developers often reuse code from online sources such as Stack O...
research
03/15/2019

Automatically Generating Documentation for Lambda Expressions in Java

When lambda expressions were introduced to the Java programming language...
research
10/08/2018

POLO: a POLicy-based Optimization library

We present POLO --- a C++ library for large-scale parallel optimization ...
research
10/16/2017

Collaboration Spheres: a Visual Metaphor to Share and Reuse Research Objects

Research Objects (ROs) are semantically enhanced aggregations of resourc...
research
07/03/2019

Towards Automated Application-Specific Software Stacks

Software complexity has increased over the years. One common way to tack...
research
04/19/2022

Plots.jl – a user extendable plotting API for the julia programming language

There are plenty of excellent plotting libraries. Each excels at a diffe...
research
01/30/2018

Automatically Leveraging MapReduce Frameworks for Data-Intensive Applications

MapReduce is a popular programming paradigm for running large-scale data...

Please sign up or login with your details

Forgot password? Click here to reset