学生程序分析与修复研究  

Student Program Analysis and Repair Research

在线阅读下载全文

作  者:胡建鹏[1] 魏龙 林渤 

机构地区:[1]上海工程技术大学电子电气工程学院,上海

出  处:《软件工程与应用》2022年第3期602-610,共9页Software Engineering and Applications

摘  要:针对高校C语言程序设计课程教师很难对课堂上每一个学生遇到的问题进行点评,同时课下的编程练习也缺乏对程序错误的指导等问题,设计了一种针对学生程序分析与程序修复的方法。在静态代码分析软件Cppcheck所能检测缺陷类型的基础上,添加了一些学生代码常见的缺陷类型。对于学生程序中出现的语法错误,本文在以往提交的学生代码数据库中,使用编辑距离算法获取修复提示,学生根据修复提示信息对代码进行改正。并基于此方法实现了相关模块应用到C语言在线实验系统,取得了不错的应用效果。Currently, in C language programming courses at colleges and universities, it is difficult for teachers to comment on the problems encountered by each student in the class, and the programming exercises after class also lack guidance on programming errors. To solve these problems, we present a method designed for student program analysis and program repair. Based on the types of errors that can be detected by the static code analysis software Cppcheck, some common types of errors in student code have been added into our work. This paper employs the editing distance algorithm to provide a repair prompt for syntax problems in students’ program, and students correct the code according to the repair prompt. Then, using this method, the relevant module is applied to the C language online experiment system, resulting in a positive application effect.

关 键 词:程序修复 静态代码分析 Cppcheck 编辑距离 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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