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 Nature]
卷期号: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.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
哈密瓜完成签到,获得积分10
刚刚
77777完成签到,获得积分20
1秒前
1秒前
烟花应助体贴的小天鹅采纳,获得10
1秒前
自觉元霜完成签到,获得积分10
2秒前
陈豆豆发布了新的文献求助10
3秒前
3秒前
勤奋的大便发布了新的文献求助150
3秒前
量子星尘发布了新的文献求助10
4秒前
qqqqqq完成签到,获得积分10
6秒前
茜你亦首歌完成签到,获得积分10
6秒前
洛城l发布了新的文献求助10
6秒前
chouchou完成签到,获得积分10
7秒前
传奇3应助陈豆豆采纳,获得10
7秒前
飞飞鱼完成签到 ,获得积分10
8秒前
Jankin发布了新的文献求助10
9秒前
欢呼的傲旋完成签到,获得积分10
11秒前
CipherSage应助mo采纳,获得30
11秒前
11秒前
无情静柏完成签到 ,获得积分20
12秒前
量子星尘发布了新的文献求助10
13秒前
14秒前
杨小鸿发布了新的文献求助10
14秒前
16秒前
上官若男应助SHARK采纳,获得10
16秒前
17秒前
完美世界应助月圆夜采纳,获得10
18秒前
19秒前
20秒前
刘勤杰发布了新的文献求助10
20秒前
ll完成签到,获得积分10
20秒前
搜集达人应助嘿嘿采纳,获得10
21秒前
西米露完成签到 ,获得积分10
23秒前
绾舟发布了新的文献求助10
23秒前
yyyy完成签到 ,获得积分10
23秒前
求助人员发布了新的文献求助10
23秒前
饶天源完成签到,获得积分10
24秒前
Acer完成签到 ,获得积分10
24秒前
古乙丁三雨完成签到,获得积分10
25秒前
kikkikPCY完成签到,获得积分10
26秒前
高分求助中
2025-2031全球及中国金刚石触媒粉行业研究及十五五规划分析报告 40000
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Introduction to strong mixing conditions volume 1-3 5000
Ägyptische Geschichte der 21.–30. Dynastie 2500
Clinical Microbiology Procedures Handbook, Multi-Volume, 5th Edition 2000
„Semitische Wissenschaften“? 1510
从k到英国情人 1500
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 计算机科学 有机化学 物理 生物化学 纳米技术 复合材料 内科学 化学工程 人工智能 催化作用 遗传学 数学 基因 量子力学 物理化学
热门帖子
关注 科研通微信公众号,转发送积分 5742602
求助须知:如何正确求助?哪些是违规求助? 5409228
关于积分的说明 15345305
捐赠科研通 4883751
什么是DOI,文献DOI怎么找? 2625329
邀请新用户注册赠送积分活动 1574165
关于科研通互助平台的介绍 1531093