Understanding and debugging novice programs

W.Lewis Johnson
1990 Artificial Intelligence  
Accurate identification and explication of program bugs requires an understanding of the programmer's intentions. This paper describes a system called PROUST which performs intention-based diagnosis of errors in novice PASCAL programs. The technique used involves generating possible goal decompositions for the program, matching them against the program, and then proposing bugs and misconceptions to explain the mismatches. Empirical studies of PROUST's performance show that it achieves high
more » ... rmance in finding bugs in nontrivial student programs. Artificial Intelligence 42 (1990) 51-97 0004-3702/90/$3.50 © 1990, Elsevier Science Publishers B.V. (North-Holland) Output(Average(?DailyRain)) specifies that the average of the rainfall inputs should be computed and output, where the rainfall input is referred to as the ?DailyRain isa Scalar Measurement. Achieve the following goals: Sentinel-Controlled Input Sequence(?DailyRain, 99999); Input Validation(?DailyRain, ?DailyRain <0); Output( A verage( ?DailyRain) ) ; Output( Count( ?DailyRain) ) ; Output(Guarded Count(?DailyRain, ?DailyRain >0)); Output( Maximum( ?DailyRain)) ; Fig. 3. The Rainfall Problem in PROUST's problem description notation. The syntax of the description has been altered to make it more readable.
doi:10.1016/0004-3702(90)90094-g fatcat:uxhasl33qrffnnzms6csxlo4xq