A FORMAL BASIS FOR REMOVING GOTO STATEMENTS

Authors
Citation
S. Pan et Rg. Dromey, A FORMAL BASIS FOR REMOVING GOTO STATEMENTS, Computer journal, 39(3), 1996, pp. 203-214
Citations number
20
Categorie Soggetti
Computer Sciences","Computer Science Hardware & Architecture
Journal title
ISSN journal
00104620
Volume
39
Issue
3
Year of publication
1996
Pages
203 - 214
Database
ISI
SICI code
0010-4620(1996)39:3<203:AFBFRG>2.0.ZU;2-W
Abstract
Goto statements detract from the quality of imperative programs. They tend to make control-structures difficult to understand and, at the sa me time, introduce the risk of non-termination and other correctness p roblems. A new, formal, generally applicable procedure for removing al l goto statements from program structures is presented. This method is based on formal semantics and congruent equivalence transformations. Not only does the method logically simplify program structures; it als o detects a range of defects including a class of non-termination prob lems, unreachable code and redundancy problems. The method can also be used to eliminate recursion.