arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2001.03277cs.SE
收藏

使用上下文代码搜索搜索Source Codes数据库

Searching a Database of Source Codes Using Contextualized Code Search

Rohan Mukherjee, Swarat Chaudhuri, Chris Jermaine

摘要:

考虑这样一种情况:程序员已经编写了程序的某一部分,但程序的某一部分(如方法或函数体)尚未完成。目标是使用缺失代码周围的上下文来自动“找出”数据库中的哪些代码对程序员有用,以帮助完成缺失的代码。搜索是“上下文化的”,在这个意义上,搜索引擎应该使用部分完成的代码中的线索来找出哪个数据库代码最有用。不应要求用户制定显式查询。我们将上下文化代码搜索视为一个学习问题,其目标是学习一个分布函数,计算每个数据库代码完成程序的可能性,并提出一个神经模型来预测哪个数据库代码可能最有用。由于在搜索时将神经模型应用于数百万或数十亿代码的数据库中的每个代码将是非常昂贵的,因此我们的关键技术问题之一是确保快速搜索。我们通过学习“反向编码器”来解决这个问题,该编码器可用于将评估每个数据库代码的问题减少到计算两个正态分布的卷积。

英文摘要:

Consider the case where a programmer has written some part of a program, but has left part of the program (such as a method or a function body) incomplete. The goal is to use the context surrounding the missing code to automatically 'figure out' which of the codes in the database would be useful to the programmer in order to help complete the missing code. The search is 'contextualized' in the sense that the search engine should use clues in the partially-completed code to figure out which database code is most useful. The user should not be required to formulate an explicit query. We cast contextualized code search as a learning problem, where the goal is to learn a distribution function computing the likelihood that each database code completes the program, and propose a neural model for predicting which database code is likely to be most useful. Because it will be prohibitively expensive to apply a neural model to each code in a database of millions or billions of codes at search time, one of our key technical concerns is ensuring a speedy search. We address this by learning a 'reverse encoder' that can be used to reduce the problem of evaluating each database code to computing a convolution of two normal distributions.

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

↑