Report Number: CS-TR-71-188
Institution: Stanford University, Department of Computer Science
Title: The translation of 'go to' programs to 'while' programs
Author: Ashcroft, Edward A.
Author: Manna, Z ohar
Date: January 1971
Abstract: In this paper we show that every flowchart program can be written without $underline{go to}$ statements by using $underline{while}$ statements. The main idea is to introduce new variables to preserve the values of certain variables at particular points in the program; or alternatively, to introduce special boolean variables to keep information about the course of the computation. The 'while' programs produced yield the same final results as the original flowchart program but need not perform computations in exactly the same way. However, the new programs do preserve the 'topology' of the original flowchart program, and are of the same order of efficiency. We also show that this cannot be done in general without adding variables.
http://i.stanford.edu/pub/cstr/reports/cs/tr/71/188/CS-TR-71-188.pdf