检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
出 处:《软件工程与应用》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[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.28