Font Size: a A A

Automatic Repair Of Java Program Error Based On Example Evolution

Posted on:2019-02-23Degree:MasterType:Thesis
Country:ChinaCandidate:J H XuFull Text:PDF
GTID:2428330566498091Subject:Computer Science and Technology
Abstract/Summary:PDF Full Text Request
The thesis designs an automatic correction system for student program which aims for programming practice on programming course in the university.It provides automatic program correction for defective program submitted by student.In here,as example for student program features with small program size as template program may contains multiple defect.It takes a lot of time and effort for teacher to manually check which more difficult for large number of student program.Currently,existing automatic correction program are mostly aimed at industrial program and has limitation for doing automatic error correction depends on the design of the mutation operator.Most existing correction method also can only correct single error in program which multiple defective code still cannot be solved.The accuracy of program correction generally depends on error location which make the time correction is less efficient and requires more memory.This thesis systematically designs the characteristics of the student program and complete Java student program by automatic correction system based on the example of correction.The student will do programming practices for solving programming problem in the system.The system will automatically repair the student program and used as reference program which will reduce teacher workload.In response to the above issues,this thesis completes the following work:Firstly,using the adaptive evolutionary structure in the genetic programming algorithm as the overall framework of the system,the traditional genetic programming methods are improved from the aspects of program mutation methods,storage of variants,generation of populations,and calculation of fitness.Eliminating unsuitable variants and choosing corrective procedures.The subroutine the same to the syntax tree of the student program is mined from the sample program's syntax tree and replaced with the subtree of the program to perform program variation for automatic program correction.For improving the accuracy of the automatic correction of the program,a method of mining and matching the subtrees of the grammar tree are used.The teacher template program with the grammatical structure of the student program is selected as the standard sample program and the grammar tree is obtained from standard sample program with the highest degree of similarity.For improving the time efficiency of automatic correction,this thesis uses syntax tree structure similarity algorithm to match the grammatical structure similarity between the syntax tree of student program and sample program also statically locates similar structures under the same structure of two grammar trees.In case of nodes that are not exactly same,it will increase the probability for the node selected by the genetic algorithm and avoid blindly choosing the wrong position.Finally,this thesis uses the title of the real job-seeking programming website and the program submitted by the student as a test set.Through experimental analysis,it is verified that the program automatic correction system can accurately repair a student program with multiple defects and give a correction plan.
Keywords/Search Tags:automatic correction, example evolution, genetic programming, error location, variable mapping, syntax tree
PDF Full Text Request
Related items