论文标题
部分可观测时空混沌系统的无模型预测
TransRepair: Context-aware Program Repair for Compilation Errors
论文作者
论文摘要
通过指导新手或AI程序员编写和调试代码,可以自动修复编译错误可以大大提高软件开发的生产率。最近,基于学习的计划维修受到了广泛的关注,并成为实践中最先进的关注。但这仍然留出足够的改进空间。在本文中,我们提出了一个端到端的解决方案,以定位误差线,并同时创建正确的C程序替代品。优于对应的方法,我们的方法考虑了错误的代码和诊断汇编反馈的上下文。然后,我们设计了一个基于变压器的神经网络,以从错误的代码及其上下文和诊断反馈中学习维修方式。为了提高TransRepair的有效性,我们总结了两个现实世界程序数据集和Internet的5种类型和74种汇编错误。然后,开发了一种程序损坏技术,以通过1,821,275个错误的C程序合成大型数据集。通过广泛的实验,我们证明了TransRepair在单修理精度和完全维修精度方面都优于最先进的方法。进一步的分析阐明了当代解决方案中未来改进的优势和劣势。
Automatically fixing compilation errors can greatly raise the productivity of software development, by guiding the novice or AI programmers to write and debug code. Recently, learning-based program repair has gained extensive attention and became the state-of-the-art in practice. But it still leaves plenty of space for improvement. In this paper, we propose an end-to-end solution TransRepair to locate the error lines and create the correct substitute for a C program simultaneously. Superior to the counterpart, our approach takes into account the context of erroneous code and diagnostic compilation feedback. Then we devise a Transformer-based neural network to learn the ways of repair from the erroneous code as well as its context and the diagnostic feedback. To increase the effectiveness of TransRepair, we summarize 5 types and 74 fine-grained sub-types of compilations errors from two real-world program datasets and the Internet. Then a program corruption technique is developed to synthesize a large dataset with 1,821,275 erroneous C programs. Through the extensive experiments, we demonstrate that TransRepair outperforms the state-of-the-art in both single repair accuracy and full repair accuracy. Further analysis sheds light on the strengths and weaknesses in the contemporary solutions for future improvement.