Eliminating go to's while preserving program structure

作者: Lyle Ramshaw

DOI: 10.1145/48014.48021

关键词:

摘要: Suppose we want to eliminate the local go statements of a Pascal program by replacing them with multilevel loop exit statements. The standard ground rules for eliminating to's require that preserve flow graph program, but they allow us completely rewrite control structures glue together program's atomic tests and actions. can be eliminated from under those if only has graph-theoretic property named reducibility.This paper considers stricter set rules, introduced Peterson, Kasami, Tokura, which demand original structures, as well its graph, while to's. In particular, are allowed delete labels jump insert various labeled repeat-endloop pairs out of. But forbidden change rest text in any way. critical issue determines whether these turns static order actions text. This encoded augmenting it extra edges. It then shown reducibility augmented edges all, is necessary sufficient condition eliminability rules.

参考文章(20)
Henry Ledgard, Reference Manual for the ADA Programming Language Springer-Verlag New York, Inc.. ,(1983)
Donald Ervin Knuth, Tex: The Program ,(1985)
J F Miner, A B Mickel, K Jensen, N Wirth, Pascal user manual and report; 3rd ed. Springer-Verlag New York, Inc.. ,(1985)
Edsger W. Dijkstra, Letters to the editor: go to statement considered harmful Communications of The ACM. ,vol. 11, pp. 147- 148 ,(1968) , 10.1145/362929.362947
Matthew S. Hecht, Jeffrey D. Ullman, Flow Graph Reducibility SIAM Journal on Computing. ,vol. 1, pp. 188- 202 ,(1972) , 10.1137/0201014
Brenda S. Baker, S. Rao Kosaraju, A Comparison of Multilevel break and next Statements Journal of the ACM. ,vol. 26, pp. 555- 566 ,(1979) , 10.1145/322139.322151
D.E. Knuth, R.W. Floyd, Notes on avoiding “go to” statements Information Processing Letters. ,vol. 1, pp. 23- 31 ,(1971) , 10.1016/0020-0190(71)90018-4
M. S. Hecht, J. D. Ullman, Characterizations of Reducible Flow Graphs Journal of the ACM. ,vol. 21, pp. 367- 375 ,(1974) , 10.1145/321832.321835
Henry F. Ledgard, Michael Marcotty, A genealogy of control structures Communications of the ACM. ,vol. 18, pp. 629- 639 ,(1975) , 10.1145/361219.361222
John Keohane, John C. Cherniavsky, Peter B. Henderson, On Transforming Control Structures SIAM Journal on Computing. ,vol. 11, pp. 268- 286 ,(1982) , 10.1137/0211021