Nli2code: Reusing Libraries With Natural Language Interface
REUSE IN THE BIG DATA ERA(2019)
摘要
Modern software development typically involves composing functionality by reusing existing libraries. This task is difficult due to the gap of abstraction levels between user tasks and APIs. In this paper we propose a new concept LibNLI (Library Natural Language Interface) to bridge the gap. LibNLI is a domain-specific language encapsulating APIs into library functions, which is more high-level and instructive than library APIs. In LibNLI, user can reuse libraries with the description of the current programming task. We design an abstract framework NLI2Code to illustrate how to build and use LibNLI.The framework combines three components: functional feature summarizes functionality of a library, code pattern maps each functional feature to its implementation, synthesizer creates local variables to complete code patterns into well-typed snippets. The main goal of NLI2Code is to show feasibility of reusing libraries with natural language interface and lay out the design space to motivate further related research.We have performed a preliminary evaluation by instantiating this framework in a tool NLI4j to reuse Java libraries. The results affirm its capability to summarize accurate functional features and synthesize correct implementation. LibNLI for the evaluated libraries is published.
更多查看译文
关键词
Library reuse, Code pattern, Program synthesis
AI 理解论文
溯源树
样例
生成溯源树,研究论文发展脉络