北京航空航天大学学报 ›› 2008, Vol. 34 ›› Issue (06): 711-715.

• 论文 • 上一篇    下一篇

基于编译优化和反汇编的程序相似性检测方法

赵长海, 晏海华, 金茂忠   

  1. 北京航空航天大学 计算机学院, 北京 100191
  • 收稿日期:2007-05-23 出版日期:2008-06-30 发布日期:2010-09-17
  • 作者简介:赵长海(1979-),男,河南驻马店人,博士生,zch@sei.buaa.edu.cn.
  • 基金资助:

    国家自然科学基金资助项目(60703057)

Approach based on compiling optimization and disassembling to detect program similarity

Zhao Changhai, Yan Haihua, Jin Maozhong   

  1. School of Computer Science and Technology, Beijing University of Aeronautics and Astronautics, Beijing 100191, China
  • Received:2007-05-23 Online:2008-06-30 Published:2010-09-17

摘要: 提出了基于编译优化和反汇编的程序相似性检测方法,能够检测出标识符重命名、增加冗余语句、等价的控制结构替换等12种学生常用的抄袭手段.基于该方法,设计和实现了一个程序相似性检测系统BuaaSim,采用编译优化和反汇编技术将源程序转化为汇编指令集合,删除和替换汇编指令中对程序本质特征影响不大的易变元素,使用一个与指令顺序无关的决策函数计算程序相似度;还给出一个简单有效的聚类算法,从程序集合中聚类出相似的程序子集.通过与著名的JPlag系统针对两份典型的抄袭样本集进行评测对比,表明本文方法的检测效果具有明显的优势.

Abstract: An approach based on compiling optimization and disassembling was proposed to detect similarity in computer programs. It can detect 12 modification strategies that are often used by students, such as renaming identifiers, adding redundant statements and replacing control structures with equivalent structures. The implemented software, called BuaaSim, translates source code into assembly instructions with the help of compiler and disassembler, removes and replaces those easily changed elements in the assembly instructions, and applies a decision function to calculate the similarity, which doesn-t depend on the order of assembly instructions. A simple clustering algorithm was also introduced to find all groups of similar programs. By using two sets of plagiarized transcripts as testing programs, the comparative evaluation shows that BuaaSim has more advantages than JPlag, a famous similarity detection system.

中图分类号: 


版权所有 © 《北京航空航天大学学报》编辑部
通讯地址:北京市海淀区学院路37号 北京航空航天大学学报编辑部 邮编:100191 E-mail:jbuaa@buaa.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发