Dynamic Neural Program Embedding for Program Repair

By Ke Wang, Ke Wang, Rishabh Singh, Zhendong Su. 2017

144 citations recorded by the source corpus.

Neural program embeddings have shown much promise recently for a variety of program analysis tasks, including program synthesis, program repair, fault localization, etc. However, most existing program embeddings are based on syntactic features of programs, such as raw token sequences or abstract syntax trees. Unlike images and text, a program has an unambiguous semantic meaning that can be difficult to capture by only considering its syntax (i.e. syntactically similar pro- grams can exhibit vastly different run-time behavior), which makes syntax-based program embeddings fundamentally limited. This paper proposes a novel semantic program embedding that is learned from program execution traces. Our key insight is that program states expressed as sequential tuples of live variable values not only captures program semantics more precisely, but also offer a more natural fit for Recurrent Neural Networks to model. We evaluate different syntactic and semantic program embeddings on predicting the types of errors that students make in their submissions to an introductory programming class and two exercises on the CodeHunt education platform. Evaluation results show that our new semantic program embedding significantly outperforms the syntactic program embeddings based on token sequences and abstract syntax trees. In addition, we augment a search-based program repair system with the predictions obtained from our se- mantic embedding, and show that search efficiency is also significantly improved.

Subfields: Information Systems, Software, Code Generation & Program Synthesis, Program Analysis & Verification

How researchers see this paper

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

In Information Systems

  1. Percy Liang
  2. Rishabh Singh
  3. Michihiro Yasunaga
  4. Armando Solar-Lezama
  5. Michael Pradel
  6. Aditya Kanade
  7. Dawn Song
  8. Xinyun Chen

In Software

  1. Rishabh Singh
  2. Armando Solar-Lezama
  3. Percy Liang
  4. Michihiro Yasunaga
  5. Dawn Song
  6. Xinyun Chen
  7. Michael Pradel
  8. Aditya Kanade

In Code Generation & Program Synthesis

  1. Rishabh Singh
  2. Dawn Song
  3. Baptiste Rozière
  4. Armando Solar-Lezama
  5. Xinyun Chen
  6. Sumit Gulwani
  7. Guillaume Lample
  8. Chang Liu

In Program Analysis & Verification

  1. Petros Maniatis
  2. Percy Liang
  3. Aditya Kanade
  4. Michihiro Yasunaga
  5. Xinyun Chen
  6. Dawn Song
  7. Rishabh Singh
  8. Michael Pradel

Citations in the corpus