Automated Correction for Syntax Errors in Programming Assignments using Recurrent Neural Networks

By Sahil Bhatia, Rishabh Singh. 2016

120 citations recorded by the source corpus.

We present a method for automatically generating repair feedback for syntax errors for introductory programming problems. Syntax errors constitute one of the largest classes of errors (34%) in our dataset of student submissions obtained from a MOOC course on edX. The previous techniques for generating automated feed- back on programming assignments have focused on functional correctness and style considerations of student programs. These techniques analyze the program AST of the program and then perform some dynamic and symbolic analyses to compute repair feedback. Unfortunately, it is not possible to generate ASTs for student pro- grams with syntax errors and therefore the previous feedback techniques are not applicable in repairing syntax errors. We present a technique for providing feedback on syntax errors that uses Recurrent neural networks (RNNs) to model syntactically valid token sequences. Our approach is inspired from the recent work on learning language models from Big Code (large code corpus). For a given programming assignment, we first learn an RNN to model all valid token sequences using the set of syntactically correct student submissions. Then, for a student submission with syntax errors, we query the learnt RNN model with the prefix to- ken sequence to predict token sequences that can fix the error by either replacing or inserting the predicted token sequence at the error location. We evaluate our technique on over 14, 000 student submissions with syntax errors. Our technique can completely re- pair 31.69% (4501/14203) of submissions with syntax errors and in addition partially correct 6.39% (908/14203) of the submissions.

Subfields: Computer Science Applications, Information Systems, Software, Natural Language Processing

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Computer Science Applications

  1. Michael Pradel
  2. Premkumar T. Devanbu
  3. Charles Sutton
  4. Koushik Sen
  5. Rishabh Singh
  6. Miltiadis Allamanis
  7. Pushmeet Kohli
  8. Earl T. Barr

In Information Systems

  1. Charles Sutton
  2. Michael Pradel
  3. Miltiadis Allamanis
  4. Rishabh Singh
  5. Koushik Sen
  6. Rafael-Michael Karampatsis
  7. Premkumar T. Devanbu
  8. Earl T. Barr

In Software

  1. Michael Pradel
  2. Charles Sutton
  3. Rishabh Singh
  4. Miltiadis Allamanis
  5. Koushik Sen
  6. Premkumar T. Devanbu
  7. Earl T. Barr
  8. Pushmeet Kohli

In Natural Language Processing

  1. Charles Sutton
  2. Rishabh Singh
  3. Miltiadis Allamanis
  4. Premkumar T. Devanbu
  5. Rafael-Michael Karampatsis
  6. Michael Pradel
  7. Koushik Sen
  8. Earl T. Barr

Citations in the corpus