基于正则表达式度量算法的智能评分设计
2017-04-18许文俊朱盼雨张学生石虎
许文俊+朱盼雨+张学生+石虎


摘要:针对程序的智能评分问题进行研究,采用编译技术中词法与语法分析技术分析被测程序的语法与和语义和使用正则表达式度量算法抽取程序的逻辑序列,程序经过语法及词法分析和数据验证后,在与程序样例的逻辑序列循环扫描对比、匹配的过程中,记录得分点主要信息,从而实现对程序的智能评分,评分结果更加准确、合理。
关键词:正则表达式度量;过滤;语法分析;语义分析
中图分类号:TP311 文献标识码:A 文章编号:1009-3044(2016)35-0214-03
Design of Intelligent Scoring Based on Regular Expression Measurement
XU Wen-jun, ZHU Pan-yu, ZHANG Xue-sheng, SHI Hu
(Department of Computer Science and Technology, Hefei University, Hefei 230601,China)
Abstract: Aiming at the problem of intelligent scoring of program, the grammar and semantics of the program under test and the logic sequence of the program are extracted by using the regular expression measurement algorithm. The syntax and lexical analysis and data After verifying, the main information of scoring points is recorded and compared with the logical sequence of the program sample in the process of matching and matching, so that the intelligent score of the program can be achieved, and the result is more accurate and reasonable.
Key words: regular expression measure; filter; syntax analysis; semantic analysis
随着计算机技术的高速发展,使用程序设计语言设计出高效、可靠、实用的软件则是计算机发展的必经之路,所以,对于程序设计语言的学习与教学则显得尤为重要。在传统的程序设计语言教学中,对于编程题的考核十分复杂繁琐,不能真实地反应编程人员的真实编程能力,单纯依靠传统的纸质试卷,不仅效率低,而且浪费了大量的时间。由于程序代码的复杂性,人工阅卷的评分的效率非常低,。因此,开发出用于教学所使用的智能评分系统能有效简化传统的评分过程,消除人工评分的主观性给公正评分带来的片面的影响。随着越来越多智能的算法的发展,智能系统得到蓬勃的发展。尤其是在智能评分领域,建立在数据库基础上的代码相似度判断算法缺乏普遍的适应性,难以适应复杂的java程序,尤其是對于嵌套层次较深的程序,分析起来十分复杂,算法难以适用。对于实际程序设计语言教学中复杂的程序,基于正则式度量的算法能够满足系统对效率的高要求以及高效性。……
