taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Volume C1 · Basic concepts · TAOCP Section 1.4.5

History and bibliography

Draft. This chapter is written and checked by the tools of the project, and a person has not reviewed it yet. Read it with care.

Read it next to Section 1.4.5 of the book.

Contents
  1. History and bibliography

History and bibliography

Overview

The techniques of Section 1.4 were found by many people at about the same time, mostly while they were building the first stored-program computers. For this reason a history of them is a list of independent steps, and the exact first step of each is often not known. The section of the book collects the best documented steps and the papers in which they are described. This chapter gives a short guide to them, one technique at a time, and tells the reader what a given source is good for.

The section has no numbered item, and so this chapter has no Node line. A reader who wants the papers should go to the list of the section of the book. The chapter names only the sources whose title, place and year were checked for this text.

Notes and history

Subroutines. The wish for a library of ready routines is older than the computer. Babbage planned his Analytical Engine to run from punched cards in the manner of the Jacquard loom, and a set of cards for a standard operation is the first form of the idea. These early forms are open: the code of the routine is placed in the program wherever it is needed. The closed subroutine, which is entered by a jump and which returns to the caller, needs a stored program, since the return address must be a number that the machine can hold. The report on the planning and coding of problems by Goldstine and von Neumann (1946 and 1947) treats this case, and the people at Cambridge made it a working practice. The first textbook of programming, by Wilkes, Wheeler and Gill (1951), describes the library of subroutines of the EDSAC and the rules for using it. A reader of Section 1.4.1 meets the same linkage in a short form: the caller stores the return address by the jump, and the routine stores it in its own exit instruction.

Coroutines. The word was made by Melvin Conway, who had the idea in 1958 while he worked on an assembler. His paper on a compiler built as a set of separate coroutines, in Communications of the ACM, volume 6 (1963), pages 396 to 408, is the first full account in print. The idea is older in the folklore of programming. The notation for coroutines in a high-level language came with SIMULA, by Dahl and Nygaard, in Communications of the ACM, volume 9 (1966), pages 671 to 678. The book of Dahl, Dijkstra and Hoare on structured programming (1972) has a chapter with examples. The reader who wants the origin of the linkage of Section 1.4.2 in one place should read the paper of Conway.

Interpretive routines. The universal Turing machine is the first interpreter in the logical sense: a machine that takes the description of another machine as data and acts as it. The practical interpreters of the early 1950s were made for a different reason. Many of the machines had no floating-point hardware, and a program that interpreted a simple language of floating-point operations made the machine easy to use at a cost in speed. The list processing systems IPL, which Newell, Shaw and Simon began to design in 1956, are interpretive systems for another kind of work. A later chapter of the book returns to them. The costs that Section 1.4.3 measures, a fixed overhead for each step of the simulated program, are the reason why such systems were slow and why the later systems compile.

Trace routines. The first routines of this kind were written for the EDSAC. Stanley Gill described them in a paper in the Proceedings of the Royal Society of London, series A, volume 206 (1951), pages 538 to 554, under the title of the diagnosis of mistakes in programs. The paper reports that single-step running of a program is a last resort for a programmer, because it uses much machine time. It gives the method that Section 1.4.3.2 uses, the run of the program under the control of another program, and the method of the post-mortem record. The book by Wilkes, Wheeler and Gill (1951) has more such routines. Printed accounts are rare, since a trace routine depends on the machine it is written for. Modern tools do the same work with symbols and with measurements of time.

Buffers. The oldest forms of buffering were in the hardware: the machine kept the next block in a store that the program could not see, and the program saw only a fast read. The software forms, which Section 1.4.4 describes, came when the machines gave programs direct control of the units. The interrupt is the later step. Edsger Dijkstra designed the interrupt system of the Electrologica X1 in 1957 and 1958, and the hardware was built by Loopstra and Scholten. The thesis of Dijkstra of 1959, Communication with an Automatic Computer, describes this system and the programs for it. The semaphore, which came from the same line of work, is a later paper and not part of the thesis. Ferguson wrote about buffer circles for Fortran in the Journal of the ACM, volume 7 (1960), pages 1 to 9, and the paper treats the use of many units at once.

How to use this chapter. The history is of use in two ways. It tells the reader which of the techniques were invented for a reason that no longer holds, such as the lack of floating-point hardware, and which have lasted, such as the subroutine and the coroutine. It also gives the reader the papers by which to check a claim. The claims of this chapter that name a paper were checked against the record of the paper. The claims about the first time of an idea are given only where a reliable source states them, and they are weakened to "described in" where the first use is not documented.

Section 1.4.5 closes Section 1.4 with an account of where its techniques come from: the subroutine, the coroutine, the interpretive routine, the trace routine and the buffer. This chapter is a survey. It has no proofs and no programs. It follows the order of the techniques, gives the people and the places of the first uses that are well documented, and says which claims are about the idea and which are about a printed paper.

The source of this page. Something is wrong? Report it.