BIT Numerical Mathematics

, Volume 15, Issue 4, pp 431–451 | Cite as

Boolean-valued loops

  • David S. Wise
  • Daniel P. Friedman
  • Stuart C. Shapiro
  • Mitchell Wand


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.

CR Categories

4.22 5.24 4.43 4.12 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 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. 2.
    G. V. Bochmann,Multiple exits from a loop without the GOTO, Comm. ACM 16, 7 (July, 1973), 443–444.Google Scholar
  3. 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. 4.
    D. C. Cooper,Böhm and Jacopini's reduction of flowcharts, Comm. ACM 10, 8 (August, 1967), 463, 473.Google Scholar
  5. 5.
    E. W. Dijkstra,Notes on structured programming, Structured Programming, Academic Press, London (1972), 1–82.Google Scholar
  6. 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. 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. 8.
    M. S. Hecht and J. D. Ullman,Flow graph reducibility, SIAM J. Comput. 1, 2 (June, 1972), 188–202.Google Scholar
  9. 9.
    C. A. R. Hoare,An axiomatic basis for computer programming, Comm. ACM 12, 10 (October, 1969), 576–580, 583.Google Scholar
  10. 10.
    D. E. Knuth,Sorting and Searching, Addison-Wesley, Reading, Mass. (1973), 146–148.Google Scholar
  11. 11.
    D. E. Knuth,Structured programming with GO TO statements, Computing Surveys 6, 4 (December, 1974), 261–301.Google Scholar
  12. 12.
    S. R. Kosaraju,Analysis of structured programs, J. Comput. System Sci. 9, 3 (December, 1974), 232–255.Google Scholar
  13. 13.
    Z. Manna,Mathematical Theory of Computation, McGraw-Hill, New York (1974), Chapter 3.Google Scholar
  14. 14.
    J. McCarthy et al.,LISP 1.5 Programmers Manual, MIT Press, Cambridge, Mass. (1962).Google Scholar
  15. 15.
    I. Nassi and B. Shneiderman,Flowchart techniques for structured programming, SIGPLAN Notices 8, 8 (August, 1973), 12–26.Google Scholar
  16. 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. 17.
    D. M. Symes,New control structures to aid gotolessness, Proc. 2nd ACM Symp. on Principles of Programming Languages (1975), 194–203.Google Scholar
  18. 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. 19.
    N. Wirth,On the composition of well-structured programs, Computing Surveys 6, 4 (December, 1974), 247–259.Google Scholar
  20. 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. 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

Copyright information

© BIT Foundations 1975

Authors and Affiliations

  • David S. Wise
    • 1
  • Daniel P. Friedman
    • 1
  • Stuart C. Shapiro
    • 1
  • Mitchell Wand
    • 1
  1. 1.Computer Science DepartmentIndiana UniversityBloomingtonUSA

Personalised recommendations