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

程序设计环境中语言到代码的映射

Mapping Language to Code in Programmatic Context

Heriot-Watt University(赫瑞-瓦特大学)

Srinivasan Iyer, Ioannis Konstas, Alvin Cheung, Luke Zettlemoyer

摘要:

源代码很少是孤立编写的。它在很大程度上取决于编程上下文,例如代码将驻留在其中的类。为了研究这种现象,我们介绍了生成类成员函数的任务,给出了英文文档和类的其余部分提供的编程上下文。这个任务是具有挑战性的,因为所需的代码可能会根据类提供的功能(例如,当我们被要求“返回特定成员变量列表中的最小元素”时,排序函数可能可用,也可能不可用)。我们介绍CONCODE,一个新的大型数据集,超过100,000个例子组成的Java类从在线代码存储库,并开发一个新的编码器-解码器架构,模型的方法文档和类环境之间的相互作用。我们还提出了一个详细的错误分析表明,有很大的空间,为今后的工作,这项任务。

英文摘要:

Source code is rarely written in isolation. It depends significantly on the programmatic context, such as the class that the code would reside in. To study this phenomenon, we introduce the task of generating class member functions given English documentation and the programmatic context provided by the rest of the class. This task is challenging because the desired code can vary greatly depending on the functionality the class provides (e.g., a sort function may or may not be available when we are asked to "return the smallest element" in a particular member variable list). We introduce CONCODE, a new large dataset with over 100,000 examples consisting of Java classes from online code repositories, and develop a new encoder-decoder architecture that models the interaction between the method documentation and the class environment. We also present a detailed error analysis suggesting that there is significant room for future work on this task.

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

↑