学习将程序图扩展到正在进行的代码
Learning to Extend Program Graphs to Work-in-Progress Code
摘要:
在软件开发过程中,源代码的大部分时间都处于损坏或不完整的状态。这对代码的机器学习提出了挑战,因为高性能模型通常依赖于从传统程序分析导出的程序的图形结构化表示。这种分析可能是不确定的,因为代码损坏或不完整。我们通过学习预测令牌之间的边关系、在转移到进行中代码之前对格式良好的代码进行训练,将程序图的概念扩展到进行中代码。我们考虑的任务代码完成和本地化和修复变量误用在一个工作过程中的情况。我们证明,训练具有微调边缘的关系感知模型始终会提高这两项任务的性能。
英文摘要:
Source code spends most of its time in a broken or incomplete state during software development. This presents a challenge to machine learning for code, since high-performing models typically rely on graph structured representations of programs derived from traditional program analyses. Such analyses may be undefined for broken or incomplete code. We extend the notion of program graphs to work-in-progress code by learning to predict edge relations between tokens, training on well-formed code before transferring to work-in-progress code. We consider the tasks of code completion and localizing and repairing variable misuse in a work-in-process scenario. We demonstrate that training relation-aware models with fine-tuned edges consistently leads to improved performance on both tasks.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。