Dynamic Neural Program Embedding for Program Repair
arXiv:1711.07163
Abstract
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.
9 pages
References in corpus (3)
Cited by in corpus (24)
- SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair
- Neural Program Repair with Execution-based Backpropagation
- Checking Smart Contracts with Structural Code Embedding
- Unsupervised Translation of Programming Languages
- A Literature Study of Embeddings on Source Code
- Embedding API Dependency Graph for Neural Code Generation
- DOBF: A Deobfuscation Pre-Training Objective for Programming Languages
- Learning Blended, Precise Semantic Program Embeddings
- Learning Scalable and Precise Representation of Program Semantics
- Testing Neural Program Analyzers
- Learning to Synthesize Programs as Interpretable and Generalizable Policies
- Leveraging Automated Unit Tests for Unsupervised Code Translation
- Neutaint: Efficient Dynamic Taint Analysis with Neural Networks
- Evaluation of Generalizability of Neural Program Analyzers under Semantic-Preserving Transformations
- Learning a Static Bug Finder from Data
- Neural Program Synthesis with a Differentiable Fixer
- Learning to Encode and Classify Test Executions
- Amanuensis: The Programmer's Apprentice
- Enabling Open-World Specification Mining via Unsupervised Learning
- A Neural-based Program Decompiler
- Universal Policies for Software-Defined MDPs
- Learning Execution through Neural Code Fusion
- Comparison of Syntactic and Semantic Representations of Programs in Neural Embeddings
- Biological Blueprints for Next Generation AI Systems