...
首页> 外文期刊>Mathematical Problems in Engineering: Theory, Methods and Applications >Computation of Program Source Code Similarity by Composition of Parse Tree and Call Graph
【24h】

Computation of Program Source Code Similarity by Composition of Parse Tree and Call Graph

机译:通过解析树和调用图的组合来计算程序源代码的相似度

获取原文
   

获取外文期刊封面封底 >>

       

摘要

This paper proposes a novel method to compute how similar two program source codes are. Since a program source code is represented as a structural form, the proposed method adopts convolution kernel functions as a similarity measure. Actually, a program source code has two kinds of structural information. One is syntactic information and the other is the dependencies of function calls lying on the program. Since the syntactic information of a program is expressed as its parse tree, the syntactic similarity between two programs is computed by a parse tree kernel. The function calls within a program provide a global structure of a program and can be represented as a graph. Therefore, the similarity of function calls is computed with a graph kernel. Then, both structural similarities are reflected simultaneously into comparing program source codes by composing the parse tree and the graph kernels based on a cyclomatic complexity. According to the experimental results on a real data set for program plagiarism detection, the proposed method is proved to be effective in capturing the similarity between programs. The experiments show that the plagiarized pairs of programs are found correctly and thoroughly by the proposed method.
机译:本文提出了一种新颖的方法来计算两个程序源代码的相似程度。由于程序源代码以结构形式表示,因此该方法采用卷积核函数作为相似性度量。实际上,程序源代码具有两种结构信息。一种是语法信息,另一种是依赖于程序的函数调用的依存关系。由于程序的语法信息表示为其语法树,因此两个程序之间的语法相似性是由语法树内核计算的。程序内的函数调用提供了程序的全局结构,并且可以表示为图形。因此,函数调用的相似性是通过图形内核来计算的。然后,通过基于循环复杂度组成解析树和图形内核,将两种结构相似性同时反映到比较程序源代码中。根据在真实数据集上进行程序窃检测的实验结果,证明该方法可有效捕获程序之间的相似性。实验表明,所提出的方法可以正确,彻底地找到the窃的程序对。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号