Tuesday, February 26, 2008

First compiler

What is a compiler?

A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses

How was the first compiler compiled?

The A-0 system, written by Grace Murray Hopper in 1952 for the UNIVAC I, was the first compiler ever developed for an electronic computer. Hopper as an employee of the Eckert-Mauchly Computer Corporation had joined the team developing the UNIVAC I (universal automatic computer). It was during this time that she developed this first compiler- A-0. The A-0 series of compilers translated symbolic mathematical codes (which were written using mnemonics instead of binary codes for instructions) into machine code and assigned call numbers to each routine and stored them on a magnetic tape. By combining a sequence of call numbers, the routines could be brought from the tape, placed in main memory at appropriate addresses and executed. The A-0 functioned more as a loader or linker than the modern notion of a compiler.


The A-0 system was followed by the A-1, A-2, A-3 (released as ARITH-MATIC), AT-3 (released as MATH-MATIC) and B-0 (released as FLOW-MATIC). The A-2 became the first extensively used compiler, laying the foundations for programming languages.


The FORTRAN team led by John Backus at IBM is generally credited as having introduced the first complete compiler, in 1957. In late 1953, John W. Backus submitted a proposal to his superiors at IBM to develop a more efficient alternative to assembly language for programming their IBM 704 mainframe computer. The first manual for FORTRAN appeared in October 1956, with the first FORTRAN compiler delivered in April 1957. This was an optimizing compiler, because customers were reluctant to use a high-level programming language unless its compiler could generate code whose performance was comparable to that of hand-coded assembly language.