SYNFIX:使用故障诊断程序自动修复故障诊断错误
SYNFIX: Automatically Fixing Syntax Errors using Compiler Diagnostics
摘要:
初级程序员要与现代程序设计语言(如Java)的复杂语法作斗争,并犯下许多语法错误。来自编译器和IDE的诊断语法错误消息有时很有用,但通常这些消息都是晦涩难懂的。在处理语法错误时,自动修复建议可以帮助学生,节省教师的时间。学生错误和修复的大样本现在可用,提供了数据驱动的机器学习方法来帮助学生修复语法错误的可能性。目前的机器学习方法在修复较短程序中的语法错误方面做得很好,但即使对于较长的程序也不起作用。我们介绍了SYNFIX,一种基于机器学习的工具,通过学习使用编译器诊断,采用一个非常大的神经模型,利用无监督的预训练,并依赖于多标签分类而不是自回归合成来生成(修复)输出,从而大大提高了最新技术水平。我们详细描述了SYNFIX的体系结构,并提供了详细的评估。我们已经将SYNFIX构建为Visual Studio Code的免费开源版本;我们免费提供所有源代码和模型。
英文摘要:
Beginning programmers struggle with the complex grammar of modern programming languages like Java, and make lot of syntax errors. The diagnostic syntax error messages from compilers and IDEs are sometimes useful, but often the messages are cryptic and puzzling. Students could be helped, and instructors' time saved, by automated repair suggestions when dealing with syntax errors. Large samples of student errors and fixes are now available, offering the possibility of data-driven machine-learning approaches to help students fix syntax errors. Current machine-learning approaches do a reasonable job fixing syntax errors in shorter programs, but don't work as well even for moderately longer programs. We introduce SYNFIX, a machine-learning based tool that substantially improves on the state-of-the-art, by learning to use compiler diagnostics, employing a very large neural model that leverages unsupervised pre-training, and relying on multi-label classification rather than autoregressive synthesis to generate the (repaired) output. We describe SYNFIX's architecture in detail, and provide a detailed evaluation. We have built SYNFIX into a free, open-source version of Visual Studio Code; we make all our source code and models freely available.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。