Browse Prior Art Database

Automated Annotation of PL/I Source Listings

IP.com Disclosure Number: IPCOM000082553D
Original Publication Date: 1974-Dec-01
Included in the Prior Art Database: 2005-Feb-28
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Spillman, TC: AUTHOR [+2]

Abstract

A PL/I source listing of a program can be automatically annotated with information collected from a global analysis of the program, its callers and callees. Described is the kind of information that can be imbedded in a source listing. It should be noted that the information collected is usually not available to the program writer. Such an automatic system provides commentary which accurately reflects the current use of the program.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Automated Annotation of PL/I Source Listings

A PL/I source listing of a program can be automatically annotated with information collected from a global analysis of the program, its callers and callees. Described is the kind of information that can be imbedded in a source listing. It should be noted that the information collected is usually not available to the program writer. Such an automatic system provides commentary which accurately reflects the current use of the program.

Using a subset of the data gathered by the Analysis and Documentation System (ADS), it becomes comparatively simple to imbed additional commentary within a PL/I compilation source listing, at the points of the listing, where such commentary would be most useful. For example: 1. At the point (statement) in the source listing where a procedure is declared, commentary may be imbedded to document: a) All invocations, including those caused by the invocation of an entry variable. b) All variables, including parameters, which are used and/or modified if the procedure is invoked. c) A complete list of abnormal entry and exit points, if any d) Etc. 2. At the point where a procedure is invoked, additional commentary may be imbedded to document: a) Argument/parameter list comparisons and errata. b) If an argument is used and/or redefined. c) Returned values, if any, and errata. d) Etc. 3. At the point where an entry variable is invoked: a) Above would apply for every known value of the entry entry variable.
4. At the point where a branch is taken to a label variable commentary may be added to detail: a) Every possible target of the branch, including procedure names on abnormal exits, as well as statement numbers of the target label constants if known. b) Possibly illegal branch information. c) Etc. 5. At each labeled statement commentary may be appended to inform the user if: a) This may be the target of a branch to a label variable and where such branches occur, if any. b) This label is referenced by normal branching and where such branches occur, if any.

The list above is not complete, since other areas of documentation may be included as user requirements become known. Actual formats of the annotations will vary depending on the nature thereof, so the following example should not be construed as final.

Let EV be an entry variable taking on the values ALPHA, BETA, and GAMMA which are procedure names or secondary entry points. The arguments A and B are normal floating-point variables. The statement: STMT LV NT 723 1 4 CALL EV(A,B); would be annotated in somewhat the following manner: STMT LV NT 723 1 4 CALL EV(A,B); CALL ALPHA(A,B); ARGUMENT 1: A, MO...