Issue No.02 - Feb. (1986 vol.12)
Harlan D. Mills , IBM Corporation, Bethesda, MD 20817; Department of Computer Science, University of Maryland, College Park, MD 20742
Richard C. Linger , IBM Corporation, Bethesda, MD 20817
Structured programming introduced a new discipline for accessing the instructions of a program. In suitable programming languages, this discipline can be described in terms of program design without gotos. It can be shown, for example, that any functional result achievable in a programming language with gotos, can be achieved in that same language without gotos if sequence, selection, and iteration control constructs are present. The gotos permit random access to the instructions while sequence, selection, and iteration provide much more limited and disciplined access. We now introduce a new discipline for accessing the data of a program. In suitable programming languages, this discipline can be described in terms of program design without arrays and pointers. Any functional result achievable in a programming language with arrays and pointers can be achieved in that same language without arrays and pointers if set, stack, and queue data types are present. The arrays and pointers permit random access to the data while sets, stacks, and queues provide much more limited and disciplined access. The decisive factor in structured programming was not in the theoretical possibilities, although that was certainly necessary. It was in the engineering design realities that made intellectual control of programs more effective. Structured programming literally permits functional programming in procedural languages. Proofs of correctness are simpler, but even more importantly, proofs and programs can be designed together in an algebra of functions to achieve correctness by construction in a stepwise refinement process. We expect the decisive factor in program design with sets, stacks, and queues to be in the engineering design realities, as well. With structured programming, the intellectual leverage is achieved by reducing procedural issues to functional issues, but even more leverage is possible by limiting the ways data can be named and reached. As a result, programs without arrays and pointers are shorter, simpler, and easier to prove. As with programs without gotos, they take more design planning and thinking, in this case about the interaction between data and control, but the results are worth the extra effort.
Arrays, Programming, Cognition, Memory, Explosions, Algorithm design and analysis, structured programming, Correctness proofs, data structures, program correctness, program design, software engineering
Harlan D. Mills, Richard C. Linger, "Data structured programming: Program design without arrays and pointers", IEEE Transactions on Software Engineering, vol.12, no. 2, pp. 192-197, Feb. 1986, doi:10.1109/TSE.1986.6312935