一种改进的基于抽象语法树的软件源代码比对算法  被引量:9

An Improved Algorithm based on Abstract Syntax Tree for Source Code Plagiarism Detection

在线阅读下载全文

作  者:刘楠[1] 韩丽芳[1] 夏坤峰[2] 曲通[2] 

机构地区:[1]中国电力科学研究院,北京100192 [2]北京邮电大学计算机学院,北京100876

出  处:《信息网络安全》2014年第1期38-42,共5页Netinfo Security

基  金:国家自然科学基金[61170268;61100047;61272493];国家国际科技合作专项[2013DFG72850];973计划[2012CB724400]

摘  要:在软件同源性检测方法中,基于抽象语法树的比对方法能够有效地检测出基于代码全文拷贝、修改变量名、调整代码顺序等的抄袭手段,被广泛用于抄袭检测工具中。但基于抽象语法树的比对方法对于修改变量类型和添加无意义变量的抄袭手段束手无策。针对这种情况,提出了一种基于抽象语法树的改进思想,该思想通过剪去语法树中影响判断的叶子节点的手段来还原检测原文抄袭,能够达到有效检测修改变量类型和添加无意义变量等抄袭的目的。Among the source code plagiarism detection algorithms used in software engineering, the algorithm based on abstract syntax tree (AST) can effectively detect those plagiarized cases of copying with no modification, modifying variable names and changing the source code sequence, but the algorithm can not detect the cases of modifying the variable type, adding no useful variables and so on. In this paper, we propose an improved algorithm based on abstract syntax tree, which is implemented by cutting out the syntax tree leaf nodes that may affect the judgment. This improved algorithm can positively detect the plagiarism cases described in the previous.

关 键 词:抽象语法树 AST 改进算法 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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