A Deep Learning Model for Source Code Generation
Authors:
- 1 April 2019
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 1-7
Abstract
Natural Language Processing (NLP) models have been used extensively to study relationship among words in a corpus. Inspired by models such as n-gram we developed a model for analyzing source code via its Abstract Syntax Tree (AST). This study has applications in source code generation, code completion, and software forensics and investigation. The study also benefits software developers and programmers striving to improve code efficiency and speed up development process. With source code analysis, the Natural Language Tool Kit (NLTK) which is very useful in NLP, becomes severely limited by its inability to handle the semantic and syntactic properties of source codes. Therefore, we processed the source code datasets as Abstract Syntax Trees (ASTs) rather than the source code text itself to take advantage of the information-rich structure of the AST. The proposed model is built on the deep learning-based Long Short-Term Memory (LSTM) and Multiple Layer Perceptron (MLP) architectures. Results from our intrinsic evaluation on a corpus of python projects have demonstrated its ability of effectively predicting a sequence of source code tokens and show an improvement over previous work in this field.Keywords
This publication has 11 references indexed in Scilit:
- Recurrent Neural Network Grammars2016
- Span-Based Constituency Parsing with a Structure-Label System and Provably Optimal Dynamic Oracles2016
- Fast and Precise Statistical Code Completion2015
- Toward Deep Learning Software Repositories2015
- Context-Sensitive Code Completion Tool for Better API Usability2014
- Understanding Machine Learning2014
- A study on repetitiveness of code completion operations2012
- On the naturalness of software2012
- Active code completion2011
- Code Completion from Abbreviated Input2009