Summary
We offer a program specification format adapted to statements with multiple exits, and use it to present proof rules to replace the somewhat unsatisfactory treatment of jumps in [3]. We justify the “bridled” use of gotos in return exits, failure exits, and loops with jumps in the middle. To exemplify our methodology, we prove the function Lookup.
Similar content being viewed by others
References
Alagić, S., Arbib, M.A.: The design of well-structured and correct programs. Berlin-Heidelberg-New York: Springer 1978
Aschroft, E.A., Clint, M., Hoare, C.A.R.: Remarks on “Program proving: Jumps and functions by M. Clint and C.A.R. Hoare”. Acta Informat. 6, 317–318 (1976)
Clint, M., Hoare, C.A.R.: Program proving: Jumps and functions. Acta Informat. 1, 214–224 (1972)
Dijkstra, E.W.: Go to statement considered harmful. Comm. ACM 11, 147–148, 538, 541 (1968)
Hoare, C.A.R.: An axiomatic basis for computer programming. Comm. ACM 12, 576–580, 583 (1969)
Hoare, C.A.R., Wirth, N.: An axiomatic definition of the programming language Pascal. Acta Informat. 2, 335–355 (1973)
Hoare, C.A.R.: Proof of a program: Find. Comm. ACM 14, 39–45 (1971)
Knuth, D.E.: Structured programming with go to statements. Comput. Surveys 6, 261–301 (1974)
Kowaltowski, T.: Axiomatic approach to side effects and general jumps. Acta Informat. 7, 357–360 (1977)
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Arbib, M.A., Alagić, S. Proof rules for gotos. Acta Informatica 11, 139–148 (1979). https://doi.org/10.1007/BF00264021
Received:
Issue Date:
DOI: https://doi.org/10.1007/BF00264021