建立抽象语法树模型评测C++代码  被引量:6

Grade C + + code judge with constructing abstract syntax tree model

在线阅读下载全文

作  者:崔舒宁[1] 吴宁[1] 叶丹[1] 

机构地区:[1]西安交通大学电子与信息技术学院,西安710049

出  处:《计算机应用》2015年第A01期183-185,191,共4页journal of Computer Applications

摘  要:目前绝大多数的C++程序评测是通过对程序运行结果和标准测试用例的比对,给出非对即错的2值评判。而在虚拟实验室和慕课中,需要结合程序源码给出更全面客观的评价。针对此问题,通过建立C++源代码的抽象语法树,改进了结果相似度和程序代码相似度的计算方法,使其能够反映程序语义之间的相似度,并在此基础上建立了C++代码综合评价模型。通过实际检验,和人工批改相比较平均批改准确率达到了92.11%,并以百分制的方式给出评价结果。结合程序语义的评价,不仅对学生而言给出了更公正的评分,也为后续的虚拟实验室智能在线指导提供了基础。Most C++ judge systems give a wrong or right binary grade, by comparing the results of programs and the standard testing cases. However, a more objective judge with considering the source code is needed in virtual labs and moocs. The method of computing the code similarity and the consequence similarity was enhanced to reflect the syntax similarity between the programming codes, by constructing an abstract syntax tree of the C++ code. Then a synthetical judge model about the C++ code was constructed. The average accuracy of this system reached 92. 11% compared with manual grading. A percent grade system replaced binary grade system that commonly adopted. A fairer mark was given because the systems not only considered the program's consequence but also considered the construction and syntax of the code. The system also provides the foundation of online intelligent guidance in virtual lab.

关 键 词:在线评测 抽象语法树 代码相似度 慕课 程序设计 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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