Skip to main content
Log in

Boolean-valued loops

  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

Abstract

A new control structure construct, thewhile-until, is introduced as a syntactic combination of thewhile statement and therepeat-until statement. Examples show that the use of thewhile-until can lead to structured programs that are conceptually more manageable than those attainable without it. Thewhile-until statement is then extended to a value-returning expression which is shown to be more powerful than the classical looping structures. It is shown to be equivalent in power to those structures withexit when a value-returningif-then-else is allowed. As a consequence, there are flowcharts whose implementations require control structures stronger than thewhile-until. Implementation details are discussed and Hoare-like axioms are presented. A closing discussion on oesthetics discourages some natural generalizations, but it concludes that the basicwhile-until is convenient for all parties on a programming team: coder, reader, compiler, and validator.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. E. Ashcroft and Z. Manna,The translation of “go to” programs to “while” programs, Information Processing 71, North-Holland (1972), 250–255.

    Google Scholar 

  2. G. V. Bochmann,Multiple exits from a loop without the GOTO, Comm. ACM 16, 7 (July, 1973), 443–444.

    Google Scholar 

  3. C. Böhm and G. Jacopini,Flow diagrams, Turing machines and languages with only two formulation rules, Comm. ACM 9, 5 (May, 1966), 366–371.

    Google Scholar 

  4. D. C. Cooper,Böhm and Jacopini's reduction of flowcharts, Comm. ACM 10, 8 (August, 1967), 463, 473.

    Google Scholar 

  5. E. W. Dijkstra,Notes on structured programming, Structured Programming, Academic Press, London (1972), 1–82.

    Google Scholar 

  6. R. V. Evans,Multiple exits from a loop using neither GO TO nor labels, Comm. ACM 17, 11 (November, 1974), 650.

    Google Scholar 

  7. D. P. Friedman and S. C. Shapiro,A case for the while-until, SIGPLAN Notices 9, 77 (July, 1974), 7–14.

    Google Scholar 

  8. M. S. Hecht and J. D. Ullman,Flow graph reducibility, SIAM J. Comput. 1, 2 (June, 1972), 188–202.

    Google Scholar 

  9. C. A. R. Hoare,An axiomatic basis for computer programming, Comm. ACM 12, 10 (October, 1969), 576–580, 583.

    Google Scholar 

  10. D. E. Knuth,Sorting and Searching, Addison-Wesley, Reading, Mass. (1973), 146–148.

    Google Scholar 

  11. D. E. Knuth,Structured programming with GO TO statements, Computing Surveys 6, 4 (December, 1974), 261–301.

    Google Scholar 

  12. S. R. Kosaraju,Analysis of structured programs, J. Comput. System Sci. 9, 3 (December, 1974), 232–255.

    Google Scholar 

  13. Z. Manna,Mathematical Theory of Computation, McGraw-Hill, New York (1974), Chapter 3.

    Google Scholar 

  14. J. McCarthy et al.,LISP 1.5 Programmers Manual, MIT Press, Cambridge, Mass. (1962).

    Google Scholar 

  15. I. Nassi and B. Shneiderman,Flowchart techniques for structured programming, SIGPLAN Notices 8, 8 (August, 1973), 12–26.

    Google Scholar 

  16. W. W. Peterson, T. Kasami, and N. Tokura,On the capabilities of while, repeat, and exist statements, Comm. ACM 16, 8 (August, 1973), 503–512.

    Google Scholar 

  17. D. M. Symes,New control structures to aid gotolessness, Proc. 2nd ACM Symp. on Principles of Programming Languages (1975), 194–203.

  18. A. van Wijngaarden, (Ed.), B. J. Mailloux, J. E. L. Peck and C. H. A. Koster,Report on the algorithmic language ALGOL 68, Numer. Math. 14 (1969), 79–218.

    Google Scholar 

  19. N. Wirth,On the composition of well-structured programs, Computing Surveys 6, 4 (December, 1974), 247–259.

    Google Scholar 

  20. W. A. Wulf, D. B. Russell and A. N. Haberman,BLISS: a language for systems programming, Comm. ACM 14, 12 (December, 1971), 780–790.

    Google Scholar 

  21. C. T. Zahn, Jr.,A control statement for natural top-down structured programming. In B. Robinet (ed.),Programming Symposium, Springer-Verlag, Berlin (1974), 170–180.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Wise, D.S., Friedman, D.P., Shapiro, S.C. et al. Boolean-valued loops. BIT 15, 431–451 (1975). https://doi.org/10.1007/BF01931683

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01931683

CR Categories

Navigation