Font Size: a A A

Research And Application Of Automatic Scoring Scheme For C Programming Problems Based On Abstract Syntax Tree

Posted on:2020-07-14Degree:MasterType:Thesis
Country:ChinaCandidate:X X JiaoFull Text:PDF
GTID:2428330596479687Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the rapid development of computer technology,Internet+education has profoundly affected the way of education and teaching and the way of course examination.The automatic scoring of programming questions is a major requirement in the online exams for programming courses.The online actual testing of programming questions is the most effective form of programming language course exams.Because the subjective factors of programming problems are strong,the solutions are many,and the scoring standards are not perfect,therefore,how to achieve efficient and reasonable automatic scoring of programming questions has always been a difficult and hot issue in the field of online courses in programming courses.Based on the research on the character^istics of programming problems,this paper designs and improved dynamic and static combination scoring model based on the idea of manual scoring.The dynamic scoring of the model depends in part on the POJ(Peking Online Judge)kernel implementation,and the static scoring is based in part on the abstract syntax tree.The improved dynamic and static combination scoring model is based on whether the student program is compiled or not,and different scoring rules are applied to the student program respectively,and adds the knowledge evaluation test whether the program meets the requirements.The compiled student program is simultaneously dynamically scored and statically scored based on the abstract syntax tree.For a student program that fails to be compiled,the grammar score is first deducted according to a pre-set scoring rule,and then only a static score based on the abstract grammar tree is performed.Research and implementation of static analysis method for C programming problems based on abstract syntax tree.Firstly,the abstract syntax tree(AST)is generated by means of GCC compiler commands,and analyzes and normalizes the generated abstract syntax tree according to the abstract syntax tree preprocessing principle and algorithm given in this paper.Then,the tree edit distance(Tree Levenshtein)algorithm is used to calculate the minimum edit distance between the abstract syntax tree of the student program and the abstract syntax tree of the template program,and the similarity between the two is obtained according to the similarity calculation formula.The maximum similarity between the abstract syntax tree of the student program and the abstract syntax tree of the template program in the template library is taken as the similarity between the student program and the template library program.Finally,the static score of the student program is calculated according to a preset scoring rule.According to the dynamic and static combination scoring model designed in this paper,the C language test data of the first year of 2018-2019 is used as the data source,and 42 representative student programs are selected for experimental analysis.The experimental results show that the scoring scheme of this paper is better than the existing system of the school.The scoring scheme is closer to manual scoring,and the accuracy rate can reach 80%on average with high availability.This paper takes the static analysis method based on abstract syntax tree as the core,and designs and implements the C language online examination system with the improved dynamic and static combination scoring model.The system reduces the burden on the teacher's review papers and ensures that the student program is judged fairly and reasonably.
Keywords/Search Tags:abstract syntax tree, scoring model, knowledge point keyword dictionary, similarity, tree editing distance algorithm
PDF Full Text Request
Related items