FORTRAN was the brainchild of John Backus, programmer at IBM, and launched in 1959. It is regarded as the first high-level programming language. (A high-level programming language is closer to human language than assembly language.) It allowed scientists to write code closer to their own scientific language and compile it into efficient machine code quickly.
After dropping out of the University of Virginia, the military, and medical school, John Backus finally graduated from Columbia with a Master's degree in mathematics in 1950. He then went to work at IBM, where he invented FORTRAN. He also invented the Backus-Naur Form (BNS), a way of describing the syntax of high level languages.
Backus was motivated to develop the language for several reasons. The economics of programming in 1954 suggested the need for a way to make programmer hours more effective. According to Backus, "the cost of programmers associated with a computer center was usually at least as great as the cost of the computer itself" (26, Wexelblat). In fact, the economic motivations were so strong that Cuthbert Hurd, Backus' boss in 1954, did not once question budget or resource requests made for FORTRAN development. Another motivation was the need to increase program speed. Previous to the IBM System 704, floating point operations were done in a software layer that communicated directly with the computer's hardware processor. With the advent of the 704, floating operations were all moved into the hardware, removing a major bottleneck on the computer's number crunching power. Previously, much inefficiency in code was masked by the much greater inefficiencies of floating point operations. The removal of that bottleneck, however, revealed new inefficiencies of compiled code. FOTRAN strove to reduce these. Backus' third motivation in developing FOTRAN was to provide a language that allowed scientists to write programs that more closely resembled their thought processes. FORTRAN allowed for scientists to code more directly in mathematical notation.
Language Design Priorities
FORTRAN was designed with the generation of efficient object code as a top priority. According to Backus, "If FORTRANů.were to translate any reasonable 'scientific' source program into an object program only half as fast as its hand coded counterpart, then acceptance of our system would be in serious danger."
FORTRAN was also intended for scientific applications. Thus, the language initially did not include strings, decimal arithmetic, or powerful input/output. However, it did have facilities for good array handling and loops.
Line 10 specifies a loop that executes line 11 once for every value of the variable I between 1 and 10, inclusive. Line 11 takes the product of I * N and assigns it to the Ith element of an array.
In fact, design of the language syntax was regarded as easy, or even trivial. Often, language features were adopted on the fly as a need for them was discovered in testing. Backus regarded language syntax as a simple, almost trivial task. The program team developed an initial set of features. When some test programming task could not be completed given the language at the time, they simply tacked on the missing feature.
The FORTRAN compiler was written in 6 modules. The development team was split into 6 autonomous teams of one to three people, and each team took charge of one module, so that the group could specialize in one phase of the compiling process. Each group specified their inputs and outputs so that other groups knew how to interface with the module's functionality.
Section 1 - The first section to read the whole program, compile what it could, and generate tables of information about the rest of the source programs. Also in this phase, developer Peter Sheridan was able to transform certain FORTRAN code into different, but equivalent FORTRAN code that would compile in an optimized fashion.
Section 2 - Analysis of program structure and optimization of calculations and instructions took place in the second section. In this section, code was moved out of loops where possible, and rowwise and columnwise scans were optimized. Because register-use optimization was determined to be too difficult in this step, the task was left for a later phase. Infinite registers were assumed in this phase. Also, nested loop array traversals were optimized. See how.
Section 3 - In this section, the outputs of section 1 and 2 were converted into the form required for sections 4, 5, and 6.
|Section 4 - Developer Lois Haibt wrote a compiler module in this section to analyze program flow from the outputs of sections 1, 2, and 3. She divided the program into basic blocks and analyzed how frequently each block would be hit.|
Section 5 - The fifth section took the generated code that assumed infinite registers and transformed it according to developer Sheldon Best's register allocation algorithm.
Section 6 - The final section linked in libraries with the optimized code and produced a relocatable, binary executable.
As the development team reached the final stages of integrating the modules, there "were often astonished at the surprising transformations in the indexing operations and in the arrangement of the computations which the compiler made, changes which made the object program efficient, but which we would not have thought to make as programmers ourselves."
Not a single one of them could explain the final code that was generated, since they had specialized in a specific phase. However, each of their individual optimizations, when applied methodically and thoroughly, resulted in extremely efficient code.
Release and Reception
Whenever Backus had been asked for the release date of FORTRAN, he always answered "six months." After two years, FORTRAN was released to a then-cynical audience in April of 1957. The computer community at the time had heard many different parties promising speed and innovation that had gone nowhere. Finally, FORTRAN matched its promises and the computer users shed their doubts. (Many were guided by Grace Mitchell's Programmer's Primer, one of the first non-reference instruction manuals.)
A survey taken in April 1958, about a year after FORTRAN's release, found that of 26 System 704 installations, half used FORTRAN for more than half their problems. Many used it for 80% of their work, and almost all used it for some of their work.
A second survey of 66 704 installations in the autumn of 1958 found that more than half the machine code run on those machines was produced by FORTRAN.
George Ryckman, of General Motors, summarized his rationale explaining FORTRAN's success. He felt that programming in FORTRAN was faster than other options available and resulted in fewer errors. He also found FORTRAN easier to learn, thus making it easier to train programmers to fill industry need. Altogether, FORTRAN reduced the cost of compiling, recompiling, debugging, and hiring programmers.
Backus, John (1981). The History of FORTRAN I, II, and III. In Richard L. Wexelblat (Ed.), History of Programming Languages (25-74). Academic Press: New York.
John Backus Bio. http://www.ruku.com/backus.html. Date of Access: 6/26/01