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

一种基于AST的代码抄袭检测方法*
引用本文:张丽萍,刘东升,李彦臣,钟美.一种基于AST的代码抄袭检测方法*[J].计算机应用研究,2011,28(12):4616-4620.
作者姓名:张丽萍  刘东升  李彦臣  钟美
作者单位:内蒙古师范大学计算机与信息工程学院,呼和浩特,010022
基金项目:国家自然科学基金资助项目( 60841003);江苏省信息产业厅资助项目(2009[100]);江苏省高校自然科学基金资助项目(10KJB520004)
摘    要:针对目前代码抄袭检测方面的研究大多是基于程序源码层面进行相似度比较,不需要对代码进行语法分析,由于忽略程序语法语义,对稍加结构修改的抄袭行为无法有效检测的现状,提出一种基于AST的代码抄袭检测方法.先将代码进行格式化预处理,再进行词法分析、语法分析,得到对应的AST;然后遍历AST生成代码序列,对代码序列进行相似度计算,从而得到代码的抄袭检测报告.实验结果表明,该方法能够有效检测出C程序代码的抄袭行为,并对C++、Java等多种程序代码的抄袭检测具有一定的通用性和可扩展性.

关 键 词:抽象语法树  抄袭检测  开源语法分析器  相似度

AST-based code plagiarism detection method
ZHANG Li-ping,LIU Dong-sheng,LI Yan-chen,ZHONG Mei.AST-based code plagiarism detection method[J].Application Research of Computers,2011,28(12):4616-4620.
Authors:ZHANG Li-ping  LIU Dong-sheng  LI Yan-chen  ZHONG Mei
Affiliation:(School of Computer Science & Communication Engineering, Jiangsu University, Zhenjiang Jiangsu 212013, China)
Abstract:On the basis of analyzing existing mapping schemes, this paper proposed a new model mapping scheme from XML document to relational database.According to the node type, mapped the information of each node in XML document to diffe-rent table in relational database.All non-leaf nodes stored its child nodes,which could effectively reduce the document restructuring time, while all leaf nodes were grouped,which could effectively reduce the cost of the node join operation. The results of experiment show that this scheme has a higher efficiency than existing mapping schemes in document restructuring and query.It is universal and can be used to process any XML document.
Keywords:relational database  model mapping  XML data model  document restructuring  query efficiency
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《计算机应用研究》浏览原始摘要信息
点击此处可从《计算机应用研究》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

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