Browse Prior Art Database

Interactive Compiler

IP.com Disclosure Number: IPCOM000079146D
Original Publication Date: 1973-May-01
Included in the Prior Art Database: 2005-Feb-26
Document File: 6 page(s) / 103K

Publishing Venue

IBM

Related People

Green, JH: AUTHOR

Abstract

Program debugging is inherently an interactive process between the programmer and the computer. The programmer submits and resubmits jobs with more intermediate output to help him locate the error. He then locates and fixes the error and submits the corrected program with the original data. He then goes on to the next error.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 24% of the total text.

Page 1 of 6

Interactive Compiler

Program debugging is inherently an interactive process between the programmer and the computer. The programmer submits and resubmits jobs with more intermediate output to help him locate the error. He then locates and fixes the error and submits the corrected program with the original data. He then goes on to the next error.

Time-sharing systems using "batch" compilers have proven to be effective debugging tools. They allow the user to correct simple errors in a matter of minutes rather than hours. However, with the programmer sitting at an interactive terminal, the computer system should be able to get information from an execution run which he did not anticipate he would need when execution began; he should be able to interact with his program at execution time.

The user may utilize the following interactive compiler on a program, when he is more interested in the program itself than in the uses of the program. He wishes to interact with and understand the actual code, not just communicate with the program via the coded input/output statements. It is expected that if the debugged program is to be run many times, it will be recompiled under the compiler's production mode.

For the purpose of this publication, the interactive compiler is described in terms of the FORTRAN language. However, it should be recognized that the principles contained herein are equally applicable to other program language compilers.

INTERACTIVE COMPILER CONTROL FLOW: The following description explains how the interactive control phase of the compiler uses the various components of the compiler to create object code. First described, are the differences between the outputs of the batch mode and the interactive mode of the compiler. Then, the description follows the flow of control through the phases of the compiler.

Last, is a description of what happens when the user changes source code in a program that has already executed.

Object Modules. The different object modules are shown in Fig. 1.

The object module produced by the batch mode (Fig. 2A) of the compiler consists of a block of storage called the code section which contains the program object code, and a block of storage called the data section which contains the program variables, constants, etc.

During program execution, a specified general register in the central-processing unit (CPU), for example an, IBM System/360 or IBM System/370, is used to provide "address-ability" to the data. This general register is called the data section register or DSR. Within the compiled object code, data addresses appear as offsets from the DSR. The only code addresses which appear in the object program are branches; thus, except for the branches, the object code, but not the data, can be moved around in memory again and again without affecting execution.

1

Page 2 of 6

The interactive mode of the compiler (Fig. 2B) compiles directly into memory. A data section is generated just as in the batch mo...