SynShine: Improved Fixing of Syntax Errors

SynShine: Improved Fixing of Syntax Errors
复制标题

DOI:
10.1109/tse.2022.3212635
复制
发表时间:
2021-04
影响因子:
7.4
通讯作者:
Toufique Ahmed;Noah Rose Ledesma;Prem Devanbu
Toufique Ahmed;Noah Rose Ledesma;Prem Devanbu
中科院分区:
计算机科学1区
文献类型:
--
作者:
Toufique Ahmed;Noah Rose Ledesma;Prem Devanbu

文献摘要

被引文献

相似文献

新手程序员在处理像Java这样的现代编程语言的复杂语法时会犯很多语法错误。来自编译器和IDE的诊断语法错误消息有时很有用,但通常这些消息都是晦涩难懂的。在处理语法错误时,自动修复建议可以帮助新手,并节省教师的时间。大量新手错误和修复的样本现在可用,提供了数据驱动的机器学习方法来帮助新手修复语法错误的可能性。目前的机器学习方法在修复较短程序中的语法错误方面做得很好,但即使对于较长的程序也不起作用。我们介绍了SynShine,这是一种基于机器学习的工具,通过学习使用编译器诊断,采用一个非常大的神经模型,利用无监督的预训练,并依赖于多标签分类而不是自回归合成来生成(修复)输出,从而大大改进了最先进的技术。我们详细描述了SynShine的架构,并提供了详细的评估。我们已将SynShine构建为Visual Studio Code(VSCode)的免费开源版本;我们免费提供所有源代码和模型。
Novice programmers struggle with the complex syntax 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. Novices could be helped, and instructors’ time saved, by automated repair suggestions when dealing with syntax errors. Large samples of novice errors and fixes are now available, offering the possibility of data-driven machine-learning approaches to help novices 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 SynShine, 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 SynShine's architecture in detail, and provide a detailed evaluation. We have built SynShine into a free, open-source version of Visual Studio Code (VSCode); we make all our source code and models freely available.