基于线性路径匹配的C程序评分方法  被引量:2

C program scoring method based on linear path matching

在线阅读下载全文

作  者:舒新峰 何孝敏 贾敬霞 付稳稳 王振宇 SHU Xinfeng;HE Xiaomin;JIA Jingxia;FU Wenwen;WANG Zhenyu(School of Computer Science,Xi'an University of Posts and Telecommunications,Xi'an 710121,China)

机构地区:[1]西安邮电大学计算机学院,陕西西安710121

出  处:《西安邮电大学学报》2020年第3期88-91,共4页Journal of Xi’an University of Posts and Telecommunications

基  金:陕西省重点研发计划项目(2020GY-210);西安邮电大学创新基金项目(CXJJLI201018)。

摘  要:针对现有C程序评测方法评分结果过于粗糙的问题,提出一种基于线性路径匹配的C程序评分方法。将待判定程序转化为语义等价的标准形式,引入程序语句依赖图(program statement dependency graph,PSDG)准确表达语句在控制和数据上的依赖关系,根据变量类型及赋值表达式匹配消除变量名的多样性,依据语句依赖关系将PSDG划分为线性路径集合,通过计算待判定程序和答案程序线性路径相似度给出成绩。实验结果表明,该方法能够在准确描述程序语句依赖关系的基础上提高评分准确率。To solve the problem that the existing evaluation methods for C program are too rough to get a precise score,a static scoring method for C program based on linear paths matching is proposed.In this method,the program to be judged is semantic-equivalently transformed into a standard form,and a program statement dependency graph(PSDG)is introduced to accurately express the control and data dependence of the program statements.Then,the diversity of variable names is eliminated by matching the variables’types and the expressions assigned.Finally,the set of linear paths in the PSDG is computed according to the statements dependency,and the scored is evaluated by comparing the similarity of the linear paths between the program to be judged and the answer program.Experiment results indicate that the method can precisely describe the syntax and semantic dependency of the program statements and improve the accuracy of scoring.

关 键 词:线性路径 程序评分 语义等价 程序语句依赖图 依赖关系 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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