Skip to main content
placeholder image

Generating pseudo-code from source code using deep learning

Conference Paper


Abstract


  • Pseudo-code written in natural language and mathematical expressions is a useful description of source code. Pseudocode aids programmers in understanding the code written in a programming language they are not familiar with. However, writing pseudo-code for each code statement is labour intensive. In this paper, we propose a novel approach to automatically generate pseudo-code from source code using Neural Machine Translation. Our model is built upon the deep learning encoderdecoder using the attention-based Long Short-Term Memory architecture to capture the long-term dependencies in both source code and pseudo-code. An empirical evaluation on a real Python dataset demonstrates the applicability of our approach in practice.

UOW Authors


Publication Date


  • 2018

Citation


  • Alhefdhi, A., Dam, H. Khanh., Hata, H. & Ghose, A. (2018). Generating pseudo-code from source code using deep learning. Proceedings - 25th Australasian Software Engineering Conference, ASWEC 2018 (pp. 21-25). United States: IEEE.

Scopus Eid


  • 2-s2.0-85061063626

Start Page


  • 21

End Page


  • 25

Place Of Publication


  • United States

Abstract


  • Pseudo-code written in natural language and mathematical expressions is a useful description of source code. Pseudocode aids programmers in understanding the code written in a programming language they are not familiar with. However, writing pseudo-code for each code statement is labour intensive. In this paper, we propose a novel approach to automatically generate pseudo-code from source code using Neural Machine Translation. Our model is built upon the deep learning encoderdecoder using the attention-based Long Short-Term Memory architecture to capture the long-term dependencies in both source code and pseudo-code. An empirical evaluation on a real Python dataset demonstrates the applicability of our approach in practice.

UOW Authors


Publication Date


  • 2018

Citation


  • Alhefdhi, A., Dam, H. Khanh., Hata, H. & Ghose, A. (2018). Generating pseudo-code from source code using deep learning. Proceedings - 25th Australasian Software Engineering Conference, ASWEC 2018 (pp. 21-25). United States: IEEE.

Scopus Eid


  • 2-s2.0-85061063626

Start Page


  • 21

End Page


  • 25

Place Of Publication


  • United States