John Backus IBM Research Laboratory San Jose, California I
Total Page:16
File Type:pdf, Size:1020Kb
THE HISTORY OF FORTRAN I, II, AND III John Backus IBM Research Laboratory San Jose, California I. Early background and environment. After May 1954 the A-2 compiler acquired a "pseudocode" which was similar to the or- 1.1 Attitudes about automatic programming der codes for many floating point interpret- in the 1950's. ive systems that were already in operation in 1953: e.g., the Los Alamos systems, DUAL Before 1954 almost all programming was and SHACO [Bouricius 1953; Schlesinger 1953], done in machine language or assembly lan- the MIT "Summer Session Computer" [Adams and guage. Programmers rightly regarded their Laning 1954], a system for the ILLIAC de- work as a complex, creative art that re- signed by D. J. Wheeler [Muller 1954], and quired human inventiveness to produce an the SPEEDCODING system for the IBM 701 efficient program. Much of their effort [Backus 1954]. was devoted to overcoming the difficulties created by the computers of that era: the The Laning and zierler system was quite lack of index registers, the lack of built- a different story: it was the world's first in floating point operations, restricted operating algebraic compiler, a rather ele- instruction sets (which might have AND but gant but simple one. Knuth and Pardo [1977] not OR, for example), and primitive input- assign this honor to Alick Glennie's AUTO- output arrangements. Given the nature of CODE, but I, for one, am unable to recognize computers, the services which "automatic the sample AUTOCODE program they give as programming" performed for the programmer "algebraic", especially when it is compared were concerned with overcoming the machine's to the corresponding Laning and Zierler shortcomings. Thus the primary concern of program. some "automatic programming" systems was to allow the use of symbolic addresses and All of the early "automatic programming" decimal numbers (e.g., the MIDAC Input systems were costly to use, since they slow- Translation Program [Brown and Carr 1954]). ed the machine down by a factor of five or ten. The most common reason for the slow- But most of the larger "automatic. pro- down was that these systems were spending gramming" systems (with the exception of most of their time in floating point sub- Laning and Zierler's algebraic system [Lan- routines. Simulated indexing and other ing and Zierler 1954] and the A-2 compiler "housekeeping" operations could be done with [Remington Rand 1953; Moser 1954]) simply simple inefficient techniques, since, slow provided a synthetic "computer" with an or- as they were, they took far less time than der code different from that of the real the floating point work. machine. This synthetic computer usually had floating point instructions and index Experience with slow "automatic program- registers and had improved input-output com- ming" systems, plus their own experience mands; it was therefore much easier to pro- with the problems of organizing loops gram than its real counterpart. and address modification, had convinced programmers that efficient programming was The A-2 compiler also came to be a syn- something that could not be automated. An- thetic computer sometime after early 1954. other reason that "automatic programming" But in early 1954 its input had a much was not taken seriously by the computing cruder form; instead of "pseudo-instruc- community came from the energetic public tions" its input was then a complex sequence relations efforts of some visionaries to of "compiling instructions" that could take spread the word that their "automatic pro- a variety of forms ranging from machine code gramming" systems had almost human abilities itself to lengthy groups of words consti- to understand the language and needs of the tuting rather clumsy calling sequences for user; whereas closer inspection of these the desired floating point subroutine, to same systems would often reveal a complex, "abbreviated form" instructions that were exception-ridden performer of clerical tasks converted by a "Translator" into ordinary which was both difficult to use and ineffi- "compiling instructions" [Moser 1954]. cient. Whatever the reasons, it is diffi- cult to convey to a reader in the late sev- © 1978 Association for Computing Machinery, Inc. 1 6 5 ACM SlGPLAN Notices, VoI. 13, No. 8, August 1978 enties the strength of the skepticism about standpoint of its input "programs" it pro- "automatic programming" in general and about vided fewer conveniences than most of the its ability to produce efficient programs then current interpretive systems mention- in particular, as it existed in 1954. ed earlier; it later adopted a "pseudo- code" as input which was similar to the (In the above discussion of attitudes input codes of these interpretive systems. about "automatic programming" in 1954 I have mentioned only those actual systems of which The Laning and Zierler system accepted my colleagues and I were aware at the time. as input an elegant but rather simple alge- For a comprehensive treatment of early pro- braic language. It permitted single-letter graining systems and languages I recommend variables (identifiers) which could have a the article by Knuth and Pardo [1977] and single constant or variable subscript. The Sammet [1969].) repertoire of functions one could use were denoted by "F" with an integer superscript 1.2 The economics of programming. to indicate the "catalog number" of the de- sired function. Algebraic expressions were Another factor which influenced the de- compiled into closed subroutines and placed velopment of FORTRAN was the economics of on a magnetic drum for subsequent use. The programming in 1954. The cost of program- system was originally designed for the mers associated with a computer center was Whirlwind computer when it had 1,024 stor- usually at least as great as the cost of the age cells, with the result that it caused computer itself. (This fact follows from a slowdown in execution speed by a factor the average salary-plus-overhead and number of about ten [Adams and Laning 1954]. of programmers at each center and from the computer rental figures.) In addition, from The effect of the Laning and Zierler one quarter to one half of the computer's system on the development of FORTRAN is a time was spent in debugging. Thus p~ogram- question which has been muddled by many ming and debugging accounted for as much as misstatements on my part. For many years three quarters of the cost of operating a I believed that we had gotten the idea for computer; and obviously, as computers got using algebraic notation in FORTRAN from cheaper, this situation would get worse. seeing a demonstration of the Laning and Zierler system at MIT. In preparing a pa- This economic factor was one of the prime per [Backus 1976] for the International motivations which led me to propose the FOR- Research Conference on the History of Com- TRAN project in a letter to my boss, Cuth- puting at Los Alamos (June 10-15, 1976), bert Hurd, in late 1953 (the exact date is I reviewed the matter with Irving Ziller not known but other facts suggest December and obtained a copy of a 1954 letter [Backus 1953 as a likely date). I believe that the 1954a] (which Dr. Laning kindly sent to me). economic need for a system like FORTRAN was As a result the facts of the matter have one reason why IBM and my successive bosses, become clear. The letter in question is Hurd, Charles DeCarlo, and John McPherson, one I sent to Dr. Laning asking for a provided for our constantly expanding needs demonstration of his system. It makes clear over the next five years without ever ask- that we had learned of his work at the ing us to project or justify those needs in Office of Naval Research Symposium on Auto- a formal budget. matic Programming for Digital Computers, May 13-14, 1954, and that the demonstration 1.3 Programming systems in 1954. took place on June 2, 1954. The letter also makes clear that the FORTRAN project It is difficult for a programmer of to- was well under way when the letter was sent day to comprehend what "automatic program- (May 21, 1954) and included Harlan Herrick, ming" meant to programmers in 1954. To Robert A. Nelson, and Irving Ziller as well many it then meant simply providing mnemon- as myself. Furthermore, an article in the ic operation codes and symbolic addresses, proceedings of that same ONR Symposium by to others it meant the simple'process of Herrick and myself [Backus and Herrick 1954] obtaining subroutines from a library and shows clearly that we were already consid- inserting the addresses of operands into ering input expressions like "Zaij •b jk " each subroutine. Most "automatic program- and "X÷Y". We went on to raise the ques- ming" systems were either assembly programs, tion "...can a machine translate a suffi- or subroutine-fixing programs, or, most ciently rich mathematical language into a popularly, interpretive systems to provide sufficiently economical program at a suf- floating point and indexing operations. ficiently low cost to make the whole affair My friends and I were aware of a number of feasible?" assembly programs and interpretive systems, some of which have been mentioned above; These and other remarks in our paper besides these there were primarily two presented at the Symposium in May 1954 make other systems of significance: the A-2 it clear that we were already considering compiler [Remington Rand 1953; Moser 1954] algebraic input considerably more sophis- and the Laning and Zierler [1954] algebraic ticated than that of Laning and Zierler's compiler at MIT. As noted above, the A-2 system when we first heard of their pioneer- compiler was at that time largely a sub- ing work.