Browse Prior Art Database

Technique to Permit Programmed Modification, Analysis and Execution of Higher Level Language Program

IP.com Disclosure Number: IPCOM000076180D
Original Publication Date: 1972-Jan-01
Included in the Prior Art Database: 2005-Feb-24
Document File: 4 page(s) / 40K

Publishing Venue

IBM

Related People

Bequaert, FC: AUTHOR

Abstract

General Description. The system described here provides the facility for two higher level language programs to exist simultaneously in computer memory and to interact as follows:

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 41% of the total text.

Page 1 of 4

Technique to Permit Programmed Modification, Analysis and Execution of Higher Level Language Program

General Description.

The system described here provides the facility for two higher level language programs to exist simultaneously in computer memory and to interact as follows:

The first of these programs, the "base" program, is a problem program written in a higher level language. The second of these programs, the "operator" program can operate upon the base program in the following ways: 1) It can set a base statement pointer to any executable statement in the base program, as specified by statement number or label or to the first executable statement in the program. 2) It can advance the base statement pointer to the next statement in the base program or the next executable statement. 3) It can obtain (in character string form) the higher level language text for any statement in the base program, including the statement currently pointed to by the base statement pointer. 4) It can obtain specific information concerning any statement in the base program including statement number, label (if present), and statement type. 5) It can modify or delete any statement in the base program. It can add new statements to the base program at any point in the program. Such changes will not necessitate (in most cases) the restarting of execution of the base program. 6) It can selectively execute any statement or group of statements in the base program. Such execution can automatically move the base statement pointer to the statement that would have been executed next in normal execution of the base program. 7) The operator program can, if required, perform any of the actions specified above upon itself rather than the base program. Applications.

The system described above has a wide variety of applications particularly in the area of program testing and debugging. It will permit the programmer to write higher level language programs to perform functions which otherwise would have to be designed into the higher level language or a special test system. Among the programs that could be written are: 1) A trace program to incrementally execute a base program and print out such information as the new values of variables when they are changed, branches that occur in program execution, etc.
2) A program to analyze the flow through a program to determine the number of times each statement is executed. Such a program could be used to determine, for program optimization purposes, which statements are frequently used. It could also be used to verify that sufficient test cases have been run to cause execution of all program code. Implementation.

The system described above could be implemented either as a batch-system or as an interactive terminal system. The description of a method of implementation given below is meant only to demonstrate feasibility.

The IBM Conversational Programming System (CPS) already contains most of the features required to provid...