期刊文献+

一种基于程序依赖图的代码聚类方法 被引量:1

A Clustering Approach for Classifying Code Based on Program Dependency Graph
下载PDF
导出
摘要 在“人工智能+教育”的教学背景下,针对学生程序设计类作业的反馈工作,提出了一种基于程序依赖图(PDG)的程序代码分类方法。该方法将一组学生程序代码按照求解思路进行自动分类,为教师后续形成有针对性的反馈提供帮助。包括三个关键步骤:首先采用静态分析技术,将源代码生成PDG;然后采用一种基于结构特征的向量表示,将程序表达为特征向量;最后通过k-means聚类算法对一组PDG进行分类。实验对38个求解同一编程问题但实现算法有差异的程序代码开展研究,结果表明了该方法的有效性。 In the light of huge workload for providing targeted feedback to students’programming assignments under the background of“artificial intelligence(AI)+education”teaching,we proposed a program code classification method based on program dependency graph(PDG),which automatically classified a group of student program codes according to algorithm and helped teachers to form targeted feedback in the follow-up.The method included three key steps,firstly,static analysis technology was used to generate PDG from the source code;secondly,a vector representation based on structural features was applied to express the program as a feature vector;finally,a group of PDGs were classified by k-means clustering algorithm.Empirical study of the experiments for 38 program codes which solved the same problem with different implementation algorithms confirmed the effectiveness of the method.
作者 翟晔 刘志国 王春晖 ZHAI Ye;LIU Zhi-guo;WANG Chun-hui(College of Computer Science and Technology,Inner Mongolia NormalUniversity,Hohhot 010022,China;Center of Applied Mathematics,Inner Mongolia NormalUniversity,Hohhot 010022,China)
出处 《内蒙古师范大学学报(自然科学版)》 CAS 2021年第6期513-517,525,共6页 Journal of Inner Mongolia Normal University(Natural Science Edition)
基金 内蒙古自治区自然科学基金资助项目(2021MS06024) 内蒙古师范大学师范专业认证专项重点课题资助项目(2020jxyj045)。
关键词 代码分类 聚类算法 程序依赖图 K-MEANS算法 code classification clustering algorithm program dependency graph k-means
  • 相关文献

参考文献6

二级参考文献62

  • 1张猛,王大玲,于戈.一种基于自动阈值发现的文本聚类方法[J].计算机研究与发展,2004,41(10):1748-1753. 被引量:16
  • 2李诺,金茂忠,刘超.Java程序度量工具的实现及案例分析[J].北京航空航天大学学报,2005,31(2):128-133. 被引量:1
  • 3刘远超,王晓龙,徐志明,关毅.文档聚类综述[J].中文信息学报,2006,20(3):55-62. 被引量:65
  • 4Kapser C, Godfrey W M. Toward a Taxonomy of Clones in Source Code:A Case Study[C]//Proc of the 1st Int'l Workshop on Evolution of Large Scale Industrial Software Applications, 2003. 被引量:1
  • 5SIMIAN[CP/OL]. [2009-03-12]. http://www.redhillconsulting.com. au/products/simian/. 被引量:1
  • 6Baxter I D, Yahin A, Moura L, et al. Clone Detection Using Abstract Syntax Trees[C]//Proc of Int'l Conf on Software Maintenance, 1998 : 368-378. 被引量:1
  • 7Duala-Ekoko E, Robillard P M. Clonetracker: Tool Support for Code Clone Management[C]//Proc of the 30th Int'l Conf on Software Engineering, 2008 : 843-846. 被引量:1
  • 8Kamiya T, Kusumoto S, Inoue K. CCFinder: A Multilinguistic Token Based Code Clone Detection System for Large Scale Source Code[J]. Trans on Software Engineering, 2002, 28 (7):654- 670. 被引量:1
  • 9Baxter I,Yahin A,Moura L,et al. Clone Detection Using Abstract Syntax Trees[C]//Proc of the 14th Int'l Conf on Software Maintenance , 1998 : 368-377. 被引量:1
  • 10Komondoor R, Horwitz S. Using Slicing to Identify Duplication in Source Code[C]//Proc of the 8th Int'l Conf on Static Analysis, 2001 : 40-56. 被引量:1

共引文献43

同被引文献14

引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部