Fatal error in pass zero: How not to confuse novices
All novice programmers find that their initial programs are rejected by the compiler in a flurry of incomprehensible error messages. Some messages are even hostile (e.g. fatal error in pass zero) and leave the novice sadder and certainly no wiser. The quality of error messages is usually the loser when the compiler writer attempts to balance conflicting design constraints such as size, speed, quality of target code and utility of use by competent programmers.
We believe that novices' programs should be passed through a series of Checkers which are designed to trap and comment on the particular kinds of errors made by them. Such systems may have to make several passes through the program, even to provide an apposite comment on a syntactic error. For logic checking such systems will need access to a description (in some form) of what the novice's program is supposed to do. Only when a novice's program passes through all the Checkers successfully should it be submitted to the standard compiler.
This paper surveys existing attempts to build “intelligent” compilers which are considerate of novices' difficulties. It then describes our own progress towards the construction of program Checkers for use by undergraduates learning Pascal.
KeywordsError Message Object Code Cognitive Science Society Program Text Novice Programmer
Unable to display preview. Download preview PDF.
- Barr, A., Beard, M., Atkinson, R.C. (1976), The computer as tutorial laboratory: the Stanford BIP project, International Journal Man-Machine Studies, 8, 567–595.Google Scholar
- Clocksin, W., & Mellish, C. (1981), Programming in Prolog. Springer-Verlag, Berlin.Google Scholar
- du Boulay, J.B.H., O'Shea, T., Monk, J. (1981), The black box inside the glass box, International Journal Man-Machine Studies, 14, 237–249.Google Scholar
- Eisenstadt, M. (1982), Design features of a friendly software environment for novice programmers, Human Cognition Research Laboratory Technical Report No. 3, Open University.Google Scholar
- Gentner, D.R. (1979), Towards an intelligent computer tutor, Procedures for Instructional Systems Development, Academic Press, New York.Google Scholar
- Goldstein, I.P. (1975), Summary of Mycroft: a system for understanding simple picture programs, Artificial Intelligence, 6, 249–288.Google Scholar
- Welsh, J., Sneeringer, W.J. & Hoare, C.A.R. (1977), Ambiguities and insecurities in Pascal, Software-Practice and Experience, 7, 685–696.Google Scholar
- Kahney, H., Eisenstadt, M. (1982), Programmers' mental models of their programming tasks, Proceedings of the conference of the Cognitive Science Society.Google Scholar
- Koffman, E.B. & Blount, S.E. (1975), Artificial intelligence and automatic programming in CAI, Artificial Intelligence, 6, 215–234.Google Scholar
- Lukey F.J. (1980), Understanding and debugging programs, International Journal Man-Machine Studies, 12, 189–202.Google Scholar
- Miller, M.L. (1978), A structured planning and debugging environment for elementary programming, International Journal Man-Machine Studies, 11, 79–95.Google Scholar
- Ripley, G.D. & Druseikis, F.C. (1978), A statistical analysis of syntax errors, Computer Languages, 3, 227–240.Google Scholar
- Soloway, E., Ehrlich, K. (1982), Tacit programming knowledge, Proceedings of the conference of the Cognitive Science Society.Google Scholar
- Soloway, E., Rubin, E., Woolf, B., Bonar, J., Johnson, W. L. (1982), MENO-II: An AI-Based programming Tutor, Research Report No. 258, Department of Computer Science, Yale University.Google Scholar
- Teitelbaum, T., & Reps, T. (1981), The Cornell program synthesiser: a syntax-directed programming environment, Communications of the ACM, 24, 9, 563–573.Google Scholar