Automation of programming-error detection is an important part of the domain expertise for intelligent programming language tutoring systems. But it is not easy because of the tremendous variability in student solutions for nontrivial tasks. In this thesis, a new approach for programming error detection is proposed to handle such problems by integration of plan matching and program execution.
Plan matching methodology shows good performance for understanding and diagnosing the novice programs. After recognizing the programming plans, the methodology utilizes temporal information between the related plans to predict the possible combination of them and to know the program structure. This temporal information is very useful for understanding the well-structured programs, but it also restricts the possible combining types of the plans.
Program execution result is used to resolve the restriction of temporal information. By checking the values of shared variable between the related plans, we can detect whether the condition given by temporal information is maintained or not. And the cause-effect relationship between the related plans can be defined. With these new relationships and the test data, we can explains the program's unexpected behaviors according to the bug's cause and effects with test data.
An automatic programming error diagnosing system with this program execution ability, called ExBug, is evaluated with 397 programs of 14 problems including the Rainfall problem and various exercises of the text book of introductory C language course in KAIST. The rate of recognizing errors in the programs are 81-85%, not quite high recognition rate, but the occurrence of false alarm is quite reduced to below 2% compared to the well-known PROUST. ExBug shows that it can deal various types of structures and give the effective and informative explanations to the students.