|
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.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
ASMCROFT, E, AND MANNA, Z Translating program schemas to while-schemas SlAM J. Comptg 4, 2 (1975), 125-146
|
| |
3
|
BAKER, B.S Struct, a program which structures Fortran Internal memo, Bell Labs, Murray Hdl, N J., 1975.
|
| |
4
|
BAKER, B S. Automatic structurmg of programs In preparation
|
| |
5
|
DE BALBINE, G Better Man Power UUhzation Using Automatic Restructuring Came, Farber & Gordon, Inc., 1974
|
| |
6
|
DE BALBINE, G Using the Fortran structuring engme In Proc of Comp Sci and Stat 8th Ann Syrup on the Interface, Los Angeles, 1975, pp 297-305
|
 |
7
|
|
 |
8
|
|
 |
9
|
|
| |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
KERNIGHAN, B W Ratfor -- a preprocessor for a rational Fortran Software Pracnce and Experience 5, 4 (1975), 395-406
|
 |
14
|
|
| |
15
|
KNUTH, D E, AND FLOYD, R W Notes on avoiding "go to" statements Infor Proc Letters 1 (1971), 23-31
|
 |
16
|
|
| |
17
|
KOSARAJU, S.R. Analysis of structured programs. J. Comptr. Sys. Scl. 9, 3 (1974), 232-254
|
| |
18
|
LESK, M E, KERNIGHAN, B W, AND RITCmE, D M The C programming manual Comptg Sct Tech. Rep #31, Bell Labs, Murray Hill, N J
|
 |
19
|
|
 |
20
|
|
CITED BY 32
|
|
|
|
|
|
|
|
|
|
|
Jerome Miecznikowski , Etienne Gagnon, Decompile Java class files with soot! (poster session), Addendum to the 2000 proceedings of the conference on Object-oriented programming, systems, languages, and applications (Addendum), p.111-112, January 2000, Minneapolis, Minnesota, United States
|
|
|
|
|
|
B. Alpern , M. N. Wegman , F. K. Zadeck, Detecting equality of variables in programs, Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.1-11, January 10-13, 1988, San Diego, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thomas Reps , Susan Horwitz , Mooly Sagiv, Precise interprocedural dataflow analysis via graph reachability, Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.49-61, January 23-25, 1995, San Francisco, California, United States
|
|
|
|
|
|
D. J. Kuck , R. H. Kuhn , D. A. Padua , B. Leasure , M. Wolfe, Dependence graphs and compiler optimizations, Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.207-218, January 26-28, 1981, Williamsburg, Virginia
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|