ASTSDL: predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model

IF 7.3 2区 计算机科学 Q1 COMPUTER SCIENCE, INFORMATION SYSTEMS Science China Information Sciences Pub Date : 2023-12-27 DOI:10.1007/s11432-021-3665-1
Yaoshen Yu, Zhiqiu Huang, Guohua Shen, Weiwei Li, Yichao Shao
{"title":"ASTSDL: predicting the functionality of incomplete programming code via an AST-sequence-based deep learning model","authors":"Yaoshen Yu, Zhiqiu Huang, Guohua Shen, Weiwei Li, Yichao Shao","doi":"10.1007/s11432-021-3665-1","DOIUrl":null,"url":null,"abstract":"<p>Code recommendation systems have been widely used in helping developers implement unfamiliar programming tasks. Many existing code recommenders or code search engines can retrieve relevant code rapidly with high accuracy, however, they cannot recommend any code outside similar ones. We propose an approach to predict the functionality of incomplete programming code by using syntactical information, and providing a list of potential functionalities to guess what the developers want, in order to increase the diversity of recommendations. In this paper, we propose a deep learning model called ASTSDL, which uses a sequence-based representation of source code to predict functionality. We extract syntactical information from the abstract syntax tree (AST) of the source code, apply a deep learning model to capture the syntactic and sequential information, and predict the functionality of the source code fragments. The experimental results demonstrate that ASTSDL can effectively predict the functionality of incomplete code with an accuracy above 84% in the top-10 list, even if there is only half of the complete code.</p>","PeriodicalId":21618,"journal":{"name":"Science China Information Sciences","volume":"78 1","pages":""},"PeriodicalIF":7.3000,"publicationDate":"2023-12-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Science China Information Sciences","FirstCategoryId":"94","ListUrlMain":"https://doi.org/10.1007/s11432-021-3665-1","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Code recommendation systems have been widely used in helping developers implement unfamiliar programming tasks. Many existing code recommenders or code search engines can retrieve relevant code rapidly with high accuracy, however, they cannot recommend any code outside similar ones. We propose an approach to predict the functionality of incomplete programming code by using syntactical information, and providing a list of potential functionalities to guess what the developers want, in order to increase the diversity of recommendations. In this paper, we propose a deep learning model called ASTSDL, which uses a sequence-based representation of source code to predict functionality. We extract syntactical information from the abstract syntax tree (AST) of the source code, apply a deep learning model to capture the syntactic and sequential information, and predict the functionality of the source code fragments. The experimental results demonstrate that ASTSDL can effectively predict the functionality of incomplete code with an accuracy above 84% in the top-10 list, even if there is only half of the complete code.

查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
ASTSDL:通过基于 AST 序列的深度学习模型预测不完整编程代码的功能性
代码推荐系统已被广泛用于帮助开发人员执行陌生的编程任务。现有的许多代码推荐器或代码搜索引擎可以快速、高精度地检索相关代码,但它们无法推荐类似代码之外的任何代码。我们提出了一种方法,利用语法信息预测不完整编程代码的功能,并提供一个潜在功能列表来猜测开发人员的需求,从而增加推荐的多样性。在本文中,我们提出了一种名为 ASTSDL 的深度学习模型,它使用基于序列的源代码表示法来预测功能。我们从源代码的抽象语法树(AST)中提取语法信息,应用深度学习模型捕捉语法和序列信息,并预测源代码片段的功能。实验结果表明,即使只有一半的完整代码,ASTSDL 也能有效预测不完整代码的功能,在前 10 名中的准确率超过 84%。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Science China Information Sciences
Science China Information Sciences COMPUTER SCIENCE, INFORMATION SYSTEMS-
CiteScore
12.60
自引率
5.70%
发文量
224
审稿时长
8.3 months
期刊介绍: Science China Information Sciences is a dedicated journal that showcases high-quality, original research across various domains of information sciences. It encompasses Computer Science & Technologies, Control Science & Engineering, Information & Communication Engineering, Microelectronics & Solid-State Electronics, and Quantum Information, providing a platform for the dissemination of significant contributions in these fields.
期刊最新文献
Weighted sum power maximization for STAR-RIS-aided SWIPT systems with nonlinear energy harvesting TSCompiler: efficient compilation framework for dynamic-shape models NeurDB: an AI-powered autonomous data system State and parameter identification of linearized water wave equation via adjoint method An STP look at logical blocking of finite state machines: formulation, detection, and search
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1