A method to expose the hidden structure of Fortran programs

  • Authors:
  • Loren P. Meissner

  • Affiliations:
  • -

  • Venue:
  • ACM '74 Proceedings of the 1974 annual conference - Volume 1
  • Year:
  • 1974

Quantified Score

Hi-index 0.00

Visualization

Abstract

Program structure is inherent in program design; therefore special keywords such as "if... then ... else” or "do ... while” are useful only to the extent that they reveal that structure. A simple listing of Fortran program statements is ineffective for revealing program structure. Proposals have been made for manually inserting keywords, comments, indentations, etc., either during a separate preprocessing stage or during the normal coding process. We show how the flow graph can provide independent structural information. Although the flow graph may be said to exist as soon as a program has been designed, it is most readily generated from the program statements. “Bad” structure can be detected objectively, and “good” programs can be reconstituted to reveal their block structure more clearly. Our implementation is based on an algorithm suggested by Peterson et al (CACM, August 1973). We have extended this algorithm to automatically detect block exits.