Deep Learning Based Program Generation From Requirements Text: Are We There Yet?

Hui Liu*, Mingzhu Shen, Jiaqi Zhu, Nan Niu, Ge Li, Lu Zhang

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

24 Citations (Scopus)

Abstract

To release developers from time-consuming software development, many approaches have been proposed to generate source code automatically according to software requirements. With significant advances in deep learning and natural language processing, deep learning-based approaches are proposed to generate source code from natural language descriptions. The key insight is that given a large corpus of software requirements and their corresponding implementations, advanced deep learning techniques may learn how to translate software requirements into source code that fulfill such requirements. Although such approaches are reported to be highly accurate, they are evaluated on datasets that are rather small, lack of diversity, and significantly different from real-world software requirements. To this end, we build a large scale dataset that is composed of longer requirements as well as validated implementations. We evaluate the state-of-the-art approaches on this new dataset, and the results suggest that their performance on our dataset is significantly lower than that on existing datasets concerning the common metrics, i.e., BLEU. Evaluation results also suggest that the generated programs often contain syntactic and semantical errors, and none of them can pass even a single predefined test case. Further analysis reveals that the state-of-the-art approaches learn little from software requirements, and most of the successfully generated statements are popular statements in the training programs. Based on this finding, we propose a popularity-based approach that always generates the most popular statements in training programs regardless of the input (software requirements). Evaluation results suggest that none of the state-of-the-art approaches can outperform this simple statistics-based approach. As a conclusion, deep learning-based program generation requires significant improvement in the future, and our dataset may serve as a basis for future research in this direction.

Original languageEnglish
Pages (from-to)1268-1289
Number of pages22
JournalIEEE Transactions on Software Engineering
Volume48
Issue number4
DOIs
Publication statusPublished - 1 Apr 2022

Keywords

  • Software requirements
  • code generation
  • data set
  • deep learning

Fingerprint

Dive into the research topics of 'Deep Learning Based Program Generation From Requirements Text: Are We There Yet?'. Together they form a unique fingerprint.

Cite this