arrow
Return

Embedding API dependency graph for neural code generation

delete2021-04-21
delete14
delete
OA
AI
C
Chen Lyu *
R
Ruyun Wang
张宏玉 (Hongyu Zhang)
H
Hanwen Zhang
S
Songlin Hu
DOI:10.1007/s10664-021-09968-2delete
deleteOriginal
deleteShare
deleteSave
View PDF
Abstract

Abstract

En 中文
The problem of code generation from textual program descriptions has long been viewed as a grand challenge in software engineering. In recent years, many deep learning based approaches have been proposed, which can generate a sequence of code from a sequence of textual program description. However, the existing approaches ignore the global relationships among API methods, which are important for understanding the usage of APIs. In this paper, we propose to model the dependencies among API methods as an API dependency graph (ADG) and incorporate the graph embedding into a sequence-to-sequence (Seq2Seq) model. In addition to the existing encoder-decoder structure, a new module named embedder is introduced. In this way, the decoder can utilize both global structural dependencies and textual program description to predict the target code. We conduct extensive code generation experiments on three public datasets and in two programming languages (Python and Java). Our proposed approach, called ADG-Seq2Seq, yields significant improvements over existing state-of-the-art methods and maintains its performance as the length of the target code increases. Extensive ablation tests show that the proposed ADG embedding is effective and outperforms the baselines.
Keywords:
Code generation
Program synthesis
API dependency graph
Graph embedding
Deep learning
AI Summary

AI Summary

Key information extracted from the uploaded paper, including a brief overview, abstract, background, key highlights, visual analysis, and future outlook.

Journal

Empirical Software Engineering cover
Empirical Software Engineering
IF:
3.6
Papers:
2.0K
Citations:
5.3K

Organization

I
institute of information engineering, cas
Scholars:
474
Papers: 466
Citations: 0
U
University of Newcastle
Scholars:
1.5W
Papers: 1.5W
Citations: 16
S
shandong normal university
Scholars:
1.0W
Papers: 8.2K
Citations: 3
C
chinese academy of sciences
Scholars:
56.2W
Papers: 44.8W
Citations: 704
researcher View more organizations