检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:王一凡 赵逢禹[1] 艾均[1] WANG Yi-fan;ZHAO Feng-yu;AI Jun(School of Optical-Electrical&Computer Engineering,University of Shanghai for Science and Technology,Shanghai 200093,China)
机构地区:[1]上海理工大学光电信息与计算机工程学院,上海200093
出 处:《小型微型计算机系统》2022年第11期2302-2307,共6页Journal of Chinese Computer Systems
基 金:国家自然科学基金项目(61803264)资助。
摘 要:在基于学习的方法代码抽象命名研究中,现有工作中的模型学习的代码表示缺少方法代码的控制流与动态可执行的信息.针对这一问题,本文提出一种面向基本路径学习的代码自动命名模型.该模型首先将方法代码通过编译器得到三地址码的中间表示并在其基础上通过本文给出的算法构建控制流图,然后基于深度优先搜索的思想构建算法提取基本路径集作为代码表示,最后引入使用注意力机制神经网络对基本路径集学习建模,训练得到方法名命名模型.为了验证模型的有效性,基于先前工作的数据集进行实验,实验结果表明本文提出的方法在本实验数据集上实验评估效果优于基线模型,并且在代码较复杂的情况下模型能够更好的理解代码语义.In studies of learning-based abstract naming methods,the code representation learned by the model in the existing work is lack of control flow and dynamic executable information of the method code.To address this problem,this paper proposes an automatic code naming model for basic path learning.The model first passes the method code through the compiler to obtain the intermediate representations of the three-address code?and on its basis through the algorithm presented in this paper builds a control flow graph,then,gives algorithm based on the idea of depth first search to extract the basic path set as code representation,and finally,introduces an attention mechanism neural network to model the basic path set learning,and the method name named model is trained on this basis.In order to verify the effectiveness of the model,an experiment was constructed based on the data set of the previous work.The experimental results show that the method proposed in this paper is better than baseline models on the experimental data set,and the model can better understand the code semantics in the case of complex code.
关 键 词:基本路径 程序语义 机器学习 注意力机制 代码特征
分 类 号:TP391[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.229