Java Reference
In-Depth Information
Programming
Machine
Language
Compiler
Language
Figure 1.1: A user's view of a compiler.
in Section 1.5, we discuss the tasks that a compiler must perform, primarily
analysis of the source program and synthesis of a target program. That section
also covers the parts of a compiler, discussing each in some detail: scanner,
parser, type checker, optimizer and code generator.
In Section 1.6, we discuss the mutual interaction of compiler design and
programming language design. Similarly, in Section 1.7, the influence of
computer architecture on compiler design is covered.
Section 1.8 introduces a number of important compiler variants, includ-
ing debugging and development compilers , optimizing compilers ,and retargetable
compilers . Finally, in Section 1.9, we consider program development environments
that integrate a compiler, editor, and debugger into a single tool.
1.1 History of Compilation
Compilers are fundamental to modern computing. They act as translators ,
transforming human-oriented programming languages into computer-orien-
ted machine languages. For most users, a compiler can be viewed as a utility
that performs the transformation illustrated in Figure 1.1. A compiler al-
lows virtually all computer users to ignore the machine-dependent details of
machine language. Therefore, compilers allow programs and programming
expertise to be portable across a wide variety of computers. This is a particu-
larly valuable capability in an agewhere the cost of software development is so
high and the need for software exists at so many levels, from small embedded
computers to extreme-scale supercomputers.
The term compiler was coined in the early 1950s byGraceMurrayHopper.
Translation was then viewed as the compilation of a sequence of machine-
language subprograms selected from a library. At that time, compilation was
called automaticprogramming and therewas almost universal skepticism that
it would ever be successful. Today, the automatic translation of programming
languages is an accomplished fact, but programming language translators are
still called compilers.
Among the first real compilers in the modern sense were the Fortran com-
pilers of the late 1950s. They presented the user with a problem-oriented,
largely machine-independent source language. They also performed some
 
 
Search WWH ::




Custom Search