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

A Clustering Approach for Classifying Code Based on Program Dependency Graph

在线阅读下载全文

作  者:翟晔 刘志国[1] 王春晖 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)

机构地区:[1]内蒙古师范大学计算机科学技术学院,内蒙古呼和浩特010022 [2]内蒙古师范大学应用数学中心,内蒙古呼和浩特010022

出  处:《内蒙古师范大学学报(自然科学版)》2021年第6期513-517,525,共6页Journal of Inner Mongolia Normal University(Natural Science Edition)

基  金:内蒙古自治区自然科学基金资助项目(2021MS06024);内蒙古师范大学师范专业认证专项重点课题资助项目(2020jxyj045)。

摘  要:在“人工智能+教育”的教学背景下,针对学生程序设计类作业的反馈工作,提出了一种基于程序依赖图(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.

关 键 词:代码分类 聚类算法 程序依赖图 K-MEANS算法 

分 类 号:TP391[自动化与计算机技术—计算机应用技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象