An Algorithm for Structuring Flowgraphs
- 1 January 1977
- journal article
- Published by Association for Computing Machinery (ACM) in Journal of the ACM
- Vol. 24 (1) , 98-120
- https://doi.org/10.1145/321992.321999
Abstract
This paper describes an algorithm which transforms a flowgraph into a program containing control constructs such as if then else statements, repeat (do forever) statements, multilevel break statements (causing jumps out of enclosing repeats), and multilevel next statements (causing jumps to iterations of enclosing repeats). The algorithm can be extended to create other types of control constructs, such as while or until. The program appears natural because the constructs are used according to common programming practices. The algorithm does not copy code, create subroutines, or add new variables. Instead, goto statements are generated when no other available control construct describes the flow of control. The algorithm has been implemented in a program called STRUCT which rewrites Fortran programs using constructs such as while, repeat, and if then else statements. The resulting programs are substantially more readable than their Fortran counterparts.Keywords
This publication has 10 references indexed in Scilit:
- A system for typesetting mathematicsCommunications of the ACM, 1975
- Structured Programming with go to StatementsACM Computing Surveys, 1974
- The UNIX time-sharing systemCommunications of the ACM, 1974
- Characterizations of Reducible Flow GraphsJournal of the ACM, 1974
- On the capabilities of while, repeat, and exit statementsCommunications of the ACM, 1973
- The Expression of Algorithms by ChartsJournal of the ACM, 1972
- Notes on avoiding “go to” statementsInformation Processing Letters, 1971
- Letters to the editor: go to statement considered harmfulCommunications of the ACM, 1968
- Böhm and Jacopini's reduction of flow chartsCommunications of the ACM, 1967
- Flow diagrams, turing machines and languages with only two formation rulesCommunications of the ACM, 1966