Learning to Generate Pseudo-Code from Source Code Using Statistical Machine Translation (T)

By Yusuke Oda, Hiroyuki Fudaba, Graham Neubig, Hideaki Hata, Sakriani Watiasri Sakti, Tomoki Toda, Satoshi Nakamura. 2015

319 citations recorded by the source corpus.

Pseudo-code written in natural language can aid the comprehension of source code in unfamiliar programming languages. However, the great majority of source code has no corresponding pseudo-code, because pseudo-code is redundant and laborious to create. If pseudo-code could be generated automatically and instantly from given source code, we could allow for on-demand production of pseudo-code without human effort. In this paper, we propose a method to automatically generate pseudo-code from source code, specifically adopting the statistical machine translation (SMT) framework. SMT, which was originally designed to translate between two natural languages, allows us to automatically learn the relationship between source code/pseudo-code pairs, making it possible to create a pseudo-code generator with less human effort. In experiments, we generated English or Japanese pseudo-code from Python statements using SMT, and find that the generated pseudo-code is largely accurate, and aids code understanding.

Subfields: Artificial Intelligence, Information Systems, 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 Artificial Intelligence

  1. Graham Neubig
  2. Luke S. Zettlemoyer
  3. Percy Liang
  4. Mohit Bansal
  5. Jianfeng Gao
  6. Caiming Xiong
  7. Jonathan Berant
  8. Richard Socher

In Information Systems

  1. Miltiadis Allamanis
  2. Charles Sutton
  3. Michael Pradel
  4. Graham Neubig
  5. Ge Li
  6. Percy Liang
  7. Earl T. Barr
  8. Zhi Jin

In Natural Language Processing

  1. Graham Neubig
  2. Luke S. Zettlemoyer
  3. Percy Liang
  4. Mohit Bansal
  5. Mirella Lapata
  6. Jonathan Berant
  7. Jianfeng Gao
  8. Caiming Xiong

Citations in the corpus