arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1608.07745cs.SEcs.PL
收藏

基于线性规划的面向类型的代码重用

Type-Directed Code Reuse using Integer Linear Programming

Yuepeng Wang, Yu Feng, Ruben Martins, Arati Kaushik, Isil Dillig, Steven P. Reiss

摘要:

在许多常见的场景中,程序员需要实现一些第三方库已经提供的功能。本文提出了一个工具,称为猎人,促进代码重用,在大型代码库中找到相关的方法,并自动合成任何必要的包装器代码。我们的方法背后的关键技术思想是使用类型来改进搜索结果并指导合成。具体来说,我们的方法计算类型之间的相似性度量,并使用这些信息来解决整数线性规划(ILP)的问题,其目标是最大限度地减少成本的合成。我们已经将Hunter实现为Eclipse插件,并通过(a)将其与S6(一种最先进的代码重用工具)进行比较,以及(b)执行用户研究来对其进行评估。我们的评估表明,Hunter与S6相比毫不逊色,并显着提高了程序员的工作效率。

英文摘要:

In many common scenarios, programmers need to implement functionality that is already provided by some third party library. This paper presents a tool called Hunter that facilitates code reuse by finding relevant methods in large code bases and automatically synthesizing any necessary wrapper code. The key technical idea underlying our approach is to use types to both improve search results and guide synthesis. Specifically, our method computes similarity metrics between types and uses this information to solve an integer linear programming (ILP) problem in which the objective is to minimize the cost of synthesis. We have implemented Hunter as an Eclipse plug-in and evaluate it by (a) comparing it against S6, a state-of-the-art code reuse tool, and (b) performing a user study. Our evaluation shows that Hunter compares favorably with S6 and significantly increases programmer productivity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑