当前位置: X-MOL 学术J. Syst. Softw. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
From API to NLI: A new interface for library reuse
Journal of Systems and Software ( IF 3.5 ) Pub Date : 2020-11-01 , DOI: 10.1016/j.jss.2020.110728
Qi Shen , Shijun Wu , Yanzhen Zou , Zixiao Zhu , Bing Xie

Abstract 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.

中文翻译:

从 API 到 NLI:库重用的新接口

摘要 开发人员经常重用现有库中的 API 来实现某些功能。然而,由于 API 的规模和复杂性,学习起来很困难。在本文中,我们设计了一个抽象框架 NLI2Code 来简化重用过程。在该框架下,用户可以使用高级、自动生成的 NLI(自然语言接口)而不是详细的 API 元素来重用库功能。该框架由三个组件组成:一个功能特征提取器,以自然语言形式总结常用的库函数,一个代码模式挖掘器,为每个功能特征提供代码模板,以及一个合成器,将代码模式完成为类型良好的片段. 从用户的角度来看,NLI2Code 下的重用任务从选择功能特性开始,我们的框架将指导用户综合所需的解决方案。我们将该框架实例化为重用 Java 库的工具。评估表明,我们的工具可以生成高质量的自然语言界面,并为新手解决实际编程任务节省一半的编码时间。
更新日期:2020-11-01
down
wechat
bug