Automatic Generation of Pseudocode with Attention Seq2seq Model

被引:7
作者
Xu, Shaofeng [1 ]
Xiong, Yun [1 ]
机构
[1] Fudan Univ, Sch Comp Sci, Shanghai Key Lab Data Sci, Shanghai, Peoples R China
来源
2018 25TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2018) | 2018年
关键词
pseudocode; neural machine translation; seq2seq; software engineering;
D O I
10.1109/APSEC.2018.00101
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Automatic pseudocode generation has become a growing demand for software engineers. However, most code snippets in production environments do not have corresponding pseudocode, because writing comments or textual descriptions of program source code typically consumes a lot of manpower. In this paper, we treat pseudocode generation task as a language translation task which means translating programming code into natural language description, and conduct a sophisticated neural machine translation model, attention seq2seq model, on this task. Experiments on a real-world dataset from an open source Python project reveal that seq2seq model could generate understandable pseudocode for practical usage.
引用
收藏
页码:711 / 712
页数:2
相关论文
共 3 条
  • [1] [Anonymous], 2015, P 2015 C EMP METH NA, DOI DOI 10.18653/V1/D15-1166
  • [2] Learning to Generate Pseudo-code from Source Code using Statistical Machine Translation
    Oda, Yusuke
    Fudaba, Hiroyuki
    Neubig, Graham
    Hata, Hideaki
    Sakti, Sakriani
    Toda, Tomoki
    Nakamura, Satoshi
    [J]. 2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, : 574 - 584
  • [3] BLEU: a method for automatic evaluation of machine translation
    Papineni, K
    Roukos, S
    Ward, T
    Zhu, WJ
    [J]. 40TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, PROCEEDINGS OF THE CONFERENCE, 2002, : 311 - 318