首页 | 本学科首页   官方微博 | 高级检索  
     

一种改进的基于抽象语法树的软件源代码比对算法
引用本文:刘楠,韩丽芳,夏坤峰,曲通.一种改进的基于抽象语法树的软件源代码比对算法[J].信息网络安全,2014(1):38-42.
作者姓名:刘楠  韩丽芳  夏坤峰  曲通
作者单位:[1]中国电力科学研究院,北京100192 [2]北京邮电大学计算机学院,北京100876
基金项目:基金项目:国家自然科学基金[61170268,61100047,61272493]、国家国际科技合作专项[2013DFG72850]、973计划[2012CB724400]
摘    要:在软件同源性检测方法中,基于抽象语法树的比对方法能够有效地检测出基于代码全文拷贝、修改变量名、调整代码顺序等的抄袭手段,被广泛用于抄袭检测工具中。但基于抽象语法树的比对方法对于修改变量类型和添加无意义变量的抄袭手段束手无策。针对这种情况,提出了一种基于抽象语法树的改进思想,该思想通过剪去语法树中影响判断的叶子节点的手段来还原检测原文抄袭,能够达到有效检测修改变量类型和添加无意义变量等抄袭的目的。

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

An Improved Algorithm based on Abstract Syntax Tree for Source Code Plagiarism Detection
LIU Nan,HAN Li-fang,XIA Kun-feng,QU Tong.An Improved Algorithm based on Abstract Syntax Tree for Source Code Plagiarism Detection[J].Netinfo Security,2014(1):38-42.
Authors:LIU Nan  HAN Li-fang  XIA Kun-feng  QU Tong
Affiliation:1.China Electric Power Research Institute, Beijing 100192, China, 2.School of Computer Since, Beijing University of Posts and Telecommunications, Beijing 100876, China)
Abstract: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.
Keywords:abstract syntax tree  AST  improved algorithm
本文献已被 CNKI 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号