基于动态AST与GCN的代码变更影响范围分析  被引量:1

Analysis of the Impact Scope of Code Changes Basedon DAST and GCN

在线阅读下载全文

作  者:姜瑛[1,2] 黄培凤 顾加伟 JIANG Ying;HUANG Peifeng;GU Jiawei(Yunnan Provincial Key Laboratory of Artificial Intelligence,Kunming University of Science and Technology,Kunming 650500,China;Faculty of Information Engineering and Automation,Kunming University of Science and Technology,Kunming 650500,China)

机构地区:[1]昆明理工大学云南省人工智能重点实验室,云南昆明650500 [2]昆明理工大学信息工程与自动化学院,云南昆明650500

出  处:《昆明理工大学学报(自然科学版)》2024年第4期118-127,共10页Journal of Kunming University of Science and Technology(Natural Science)

基  金:国家自然科学基金项目(62162038);国家重点研发计划项目(2018YFB1003904).

摘  要:识别代码变更在程序中的影响范围对确保软件正确性、安全性、可靠性至关重要.代码变更影响分析主要基于代码间的依赖关系识别受影响部分,对受影响部分的权重分析较少涉及.作者提出了一种基于DAST与GCN的代码变更影响范围分析方法.首先扩展了DAST的相关内容以记录代码变更的相关信息,然后提出了基于DAST的代码依赖分析类型及方法,在构建DAST节点权重矩阵后,使用基于GCN的代码变更影响范围分析模型,以确定代码的变更影响范围.实验结果表明,通过对DAST中的token信息进行扩展可建立代码依赖关系分析的基础;DAST节点权重矩阵与注意力机制相结合,并采用两层GCN,能够得到较好的代码变更影响分析结果.Identifying the impact scope of code changes in a program is crucial for ensuring the correctness,security,and reliability of software.Code change impact analysis primarily focuses on recognizing the affected parts based on inter-code dependencies,with less involvement in the weight analysis of the affected sections.This paper proposes a method for analyzing the impact scope of code changes based on DAST and GCN.Firstly,this paper expands the content of DAST to record relevant information related to code changes.Then the code dependency analysis types and methods based on DAST are proposed.After constructing the DAST node weight matrix,the impact scope of code changes based on GCN is used to determine the impact range of code changes.Experimental results show that the foundation for code dependency analysis can be established by expanding the token information in DAST.After combining the DAST node weight matrix with attention mechanisms,better results in code change impact analysis can be yielded using a 2-layer GCN.

关 键 词:代码变更 影响范围分析 DAST GCN 节点权重矩阵 注意力机制 

分 类 号:TP311.52[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象