SYNFIX: Automatically Fixing Syntax Errors using Compiler Diagnostics

04/29/2021
by   Toufique Ahmed, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/09/2023

COOLIO: A Language Support Extension for the Classroom Object Oriented Language

COOL is an Object-Oriented programming language used to teach compiler d...
research
06/27/2019

Investigating Compilation Errors of Students Learning Haskell

While functional programming is an efficient way to express complex soft...
research
09/02/2019

Targeted Example Generation for Compilation Errors

We present TEGCER, an automated feedback tool for novice programmers. TE...
research
07/17/2019

Syntax and Stack Overflow: A methodology for extracting a corpus of syntax errors and fixes

One problem when studying how to find and fix syntax errors is how to ge...
research
03/17/2023

ChameleonIDE: Untangling Type Errors Through Interactive Visualization and Exploration

Dynamically typed programming languages are popular in education and the...
research
08/25/2017

Learning to Blame: Localizing Novice Type Errors with Data-Driven Diagnosis

Localizing type errors is challenging in languages with global type infe...
research
11/04/2019

Learning to Fix Build Errors with Graph2Diff Neural Networks

Professional software developers spend a significant amount of time fixi...

Please sign up or login with your details

Forgot password? Click here to reset