Embedding API dependency graph for neural code generation

计算机科学 依赖关系图 Python(编程语言) 嵌入 Java 程序设计语言 依赖关系(UML) 代码生成 编码器 图形 脚本语言 源代码 理论计算机科学 编码(集合论) 人工智能 软件 操作系统 集合(抽象数据类型) 计算机安全 钥匙(锁)
作者
Chen Lyu,Ruyun Wang,Hongyu Zhang,Hanwen Zhang,Songlin Hu
出处
期刊:Empirical Software Engineering [Springer Science+Business Media]
卷期号:26 (4) 被引量:5
标识
DOI:10.1007/s10664-021-09968-2
摘要

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.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
1秒前
1秒前
2秒前
室内设计发布了新的文献求助10
3秒前
锅包肉爱吃肉完成签到 ,获得积分10
3秒前
居崽完成签到 ,获得积分10
3秒前
汉堡包应助yecheng采纳,获得10
4秒前
ZY发布了新的文献求助10
4秒前
feizhuliu完成签到,获得积分20
5秒前
5秒前
6秒前
JJ完成签到,获得积分10
7秒前
莫莉完成签到,获得积分10
7秒前
赘婿应助板凳采纳,获得10
9秒前
10秒前
粗心的胜完成签到,获得积分10
11秒前
杋困了完成签到 ,获得积分10
11秒前
egnaro完成签到,获得积分10
12秒前
12秒前
李驰完成签到 ,获得积分10
12秒前
叶子关注了科研通微信公众号
12秒前
13秒前
xixi完成签到 ,获得积分10
13秒前
婷婷子完成签到,获得积分10
14秒前
ding应助ly采纳,获得10
14秒前
14秒前
14秒前
英俊的铭应助曾经问玉采纳,获得10
15秒前
17秒前
17秒前
WYJie发布了新的文献求助10
17秒前
egnaro发布了新的文献求助10
18秒前
Jeffery426发布了新的文献求助200
18秒前
所所应助热心的诗蕊采纳,获得10
18秒前
我是老大应助ffchen111采纳,获得10
19秒前
tangz发布了新的文献求助10
19秒前
ira完成签到,获得积分10
20秒前
张雪敏完成签到,获得积分10
20秒前
脑洞疼应助邵老头采纳,获得10
20秒前
22秒前
高分求助中
【提示信息,请勿应助】关于scihub 10000
The Mother of All Tableaux: Order, Equivalence, and Geometry in the Large-scale Structure of Optimality Theory 3000
Social Research Methods (4th Edition) by Maggie Walter (2019) 2390
A new approach to the extrapolation of accelerated life test data 1000
北师大毕业论文 基于可调谐半导体激光吸收光谱技术泄漏气体检测系统的研究 390
Phylogenetic study of the order Polydesmida (Myriapoda: Diplopoda) 370
Robot-supported joining of reinforcement textiles with one-sided sewing heads 360
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 生物化学 物理 内科学 纳米技术 计算机科学 化学工程 复合材料 遗传学 基因 物理化学 催化作用 冶金 细胞生物学 免疫学
热门帖子
关注 科研通微信公众号,转发送积分 4010128
求助须知:如何正确求助?哪些是违规求助? 3550139
关于积分的说明 11304931
捐赠科研通 3284614
什么是DOI,文献DOI怎么找? 1810733
邀请新用户注册赠送积分活动 886556
科研通“疑难数据库(出版商)”最低求助积分说明 811451