Pseudocode to Code Based on Adaptive Global and Local Information

Qianqian Yu, Zhangjin Huang, Naijie Gu
{"title":"Pseudocode to Code Based on Adaptive Global and Local Information","authors":"Qianqian Yu, Zhangjin Huang, Naijie Gu","doi":"10.1109/SANER56733.2023.00016","DOIUrl":null,"url":null,"abstract":"The pseudocode-to-code task has two main stages: code translation and search synthesis. It faces two main challenges: First, the generated candidate code pieces need to be more accurate. Second, there are problems with search efficiency and accuracy. To address the above challenges, this work proposes a novel approach: For the encoder of code translation, a new multi-scale pyramid feature extractor is proposed to obtain multi-scale local information, which is combined with the global information to improve the accuracy of code translation. For the search synthesis stage, this paper designs the intra-line attention, the inter-line attention, and the code-errMsg attention, which are adaptively integrated with the graph attention to effectively fuse global and local information. Under a budget of 100 program compilations, our final model, AGL-Code, outperforms the previous state-of-the-art models, achieving 46.1%/63.5% synthesis success rate on the TestP/TestW of the SPoC dataset, respectively.","PeriodicalId":281850,"journal":{"name":"2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)","volume":"46 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/SANER56733.2023.00016","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

The pseudocode-to-code task has two main stages: code translation and search synthesis. It faces two main challenges: First, the generated candidate code pieces need to be more accurate. Second, there are problems with search efficiency and accuracy. To address the above challenges, this work proposes a novel approach: For the encoder of code translation, a new multi-scale pyramid feature extractor is proposed to obtain multi-scale local information, which is combined with the global information to improve the accuracy of code translation. For the search synthesis stage, this paper designs the intra-line attention, the inter-line attention, and the code-errMsg attention, which are adaptively integrated with the graph attention to effectively fuse global and local information. Under a budget of 100 program compilations, our final model, AGL-Code, outperforms the previous state-of-the-art models, achieving 46.1%/63.5% synthesis success rate on the TestP/TestW of the SPoC dataset, respectively.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
基于自适应全局和局部信息的伪代码到代码
伪代码到代码的任务有两个主要阶段:代码转换和搜索合成。它面临两个主要挑战:首先,生成的候选代码片段需要更加准确。其次,搜索效率和准确性存在问题。针对上述挑战,本文提出了一种新颖的方法:对于代码翻译的编码器,提出了一种新的多尺度金字塔特征提取器来获取多尺度局部信息,并将其与全局信息相结合,以提高代码翻译的准确性。在搜索综合阶段,设计了线内注意、线间注意和代码errmsg注意,并与图注意自适应集成,有效融合全局和局部信息。在100个程序编译的预算下,我们的最终模型AGL-Code优于之前最先进的模型,在SPoC数据集的TestP/TestW上分别实现了46.1%/63.5%的合成成功率。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
TemLock: A Lightweight Template-based Approach for Fixing Deadlocks Caused by ReentrantLock Pseudocode to Code Based on Adaptive Global and Local Information µDetector: Automated Intrusion Detection for Microservices Documentation-Guided API Sequence Search without Worrying about the Text-API Semantic Gap Weak Labelling for File-level Source Code Classification
×
引用
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