Research and Advances

The design and implementation of a table driven, interactive diagnostic programming system

CAPS is a highly interactive diagnostic compiler/interpreter that allows beginning programmers to prepare, debug, and execute fairly simple programs at a graphics display terminal. Complete syntax checking and most semantic analysis is performed as the program is entered and as it is subsequently edited. Analysis is performed character by character. The most remarkable feature of CAPS is its ability to automatically diagnose errors both at compile time and at run time. Errors are not automatically corrected. Instead, CAPS interacts with the student to help him find the cause of his error. Most components of CAPS are table driven, both to reduce the space needed for implementation and to increase the flexibility of the multilingual system. Over 500 students have used CAPS to learn Fortran, PL/I, or Cobol in conjunction with a computer assisted course on introductory computer science.

Advertisement

Author Archives

Research and Advances

Design and implementation of a diagnostic compiler for PL/I

PL/C is a compiler for a dialect for PL/I. The design objective was to provide a maximum degree of diagnostic assistance in a batch processing environment. For the most part this assistance is implicit and is provided automatically by the compiler. The most remarkable characteristic of PL/C is its perseverance—it completes translation of every program submitted and continues execution until a user-established error limit is reached. This requires that the compiler repair errors encountered during both translation and execution, and the design of PL/C is dominated by this consideration. PL/C also introduces several explicit user-controlled facilities for program testing. To accommodate these extensions to PL/I without abandoning compatibility with the IBM compiler, PL/C permits “pseudo comments”—constructions whose contents can optionally be considered either source text or comment. In spite of the diagnostic effort PL/C is a fast and efficient processor. It effectively demonstrates that compilers can provide better diagnostic assistance than is customarily offered, even when a sophisticated source language is employed, and that this assistance need not be prohibitively costly.

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved