计算机应用
計算機應用
계산궤응용
COMPUTER APPLICATION
2015年
z1期
183-185,191
,共4页
崔舒宁%吴宁%叶丹
崔舒寧%吳寧%葉丹
최서저%오저%협단
在线评测%抽象语法树%代码相似度%慕课%程序设计
在線評測%抽象語法樹%代碼相似度%慕課%程序設計
재선평측%추상어법수%대마상사도%모과%정서설계
online judge%abstract syntax tree%code similarity%Massive Open Online Course(MOOC)%programming
目前绝大多数的C++程序评测是通过对程序运行结果和标准测试用例的比对,给出非对即错的2值评判。而在虚拟实验室和慕课中,需要结合程序源码给出更全面客观的评价。针对此问题,通过建立C++源代码的抽象语法树,改进了结果相似度和程序代码相似度的计算方法,使其能够反映程序语义之间的相似度,并在此基础上建立了C++代码综合评价模型。通过实际检验,和人工批改相比较平均批改准确率达到了92.11%,并以百分制的方式给出评价结果。结合程序语义的评价,不仅对学生而言给出了更公正的评分,也为后续的虚拟实验室智能在线指导提供了基础。
目前絕大多數的C++程序評測是通過對程序運行結果和標準測試用例的比對,給齣非對即錯的2值評判。而在虛擬實驗室和慕課中,需要結閤程序源碼給齣更全麵客觀的評價。針對此問題,通過建立C++源代碼的抽象語法樹,改進瞭結果相似度和程序代碼相似度的計算方法,使其能夠反映程序語義之間的相似度,併在此基礎上建立瞭C++代碼綜閤評價模型。通過實際檢驗,和人工批改相比較平均批改準確率達到瞭92.11%,併以百分製的方式給齣評價結果。結閤程序語義的評價,不僅對學生而言給齣瞭更公正的評分,也為後續的虛擬實驗室智能在線指導提供瞭基礎。
목전절대다수적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.