Flowchart techniques for structured programming (original) (raw)

1973, ACM SIGPLAN Notices

With the advent of structured programming and GOTO-less programming, a method is needed to model computation in simply ordered structures, each representing a complete thought possibly defined in terms of other thoughts as yet undefined. A model is needed which prevents unrestricted transfers of control and has a control structure closer to languages amenable to structured programming. We present an attempt at such a model. Typically, computer programs go through various phases of formulation and definition. During one of these phases a flowchart may be drawn to describe the program at a level of abstraction somewhere between the problem statement and the code of the completed program. The programmer designs the flowchart in such a way that it can be coded easily into a convenient programming language, yet keeps the underlying algorithm sufficiently transparent to think about in modular terms. Unfortunately the conventional flowchart language has aspects that make it both too powerful and yet too simple a language to model current programming techniques. These techniques tend toward a more restrictive control structure which the flowchart cannot describe nicely. Certain control structures in programming languages, such as iteration, have no direct translation to flowchart language and must be built from simpler control structures, thereby losing the forest in the trees. On the other hand, the power the unrestricted GOTO affords presents problems in logical analysis of programs and program verification, optimization, and debugging. The translation from flowchart to computer program is a one to many relationship whose output ranges over programs only some of which are legible, concise, and efficient. Top-down programming as defined by Mills (1) (or the top-down modularization of Wulf et al (2)) is the technique of analyzing an idea to form simpler ideas, and recursively applying the technique. These ideas may take the form of programs, subroutines, macros, lines of code, or other modular forms. Dijkstra's structured programming (3) organizes program components into levels which he calls pearls, and strings them together into a necklace (read "programs"). In addition, Dijkstra proposes abolishing the use of unrestricted GOTOs to help prevent unwieldy programs which are difficult to analyze (4). The theoretical basis for our representation of structured programs was given by Bohm and Jacopini (5). They described a flowchart language whose alphabet consisted of