Next: 1.3 Compiler Architecture
Up: 1. Introduction
Previous: 1.1 What is a
  Contents
Many variations:
- many programming languages (eg, FORTRAN, C++, java)
- many programming paradigms (eg, object-oriented, functional, logic)
- many computer architectures (eg, MIPS, SPARC, Intel, alpha)
- many operating systems (eg, Linux, Solaris, Windows)
Qualities of a compiler (in order of importance):
- 1.
- the compiler itself must be bug-free
- 2.
- it must generate correct machine code
- 3.
- the generated machine code must run fast
- 4.
- the compiler itself must run fast (compilation time must be proportional to program size)
- 5.
- the compiler must be portable (ie, modular, supporting separate compilation)
- 6.
- it must print good diagnostics and error messages
- 7.
- the generated code must work well with existing debuggers
- 8.
- must have consistent and predictable optimization.
Building a compiler requires knowledge of
- programming languages (parameter passing, variable scoping, memory allocation, etc)
- theory (automata, context-free languages, etc)
- algorithms and data structures (hash tables, graph algorithms, dynamic programming, etc)
- computer architecture (assembly programming)
- software engineering.
The course project (building a non-trivial compiler for a Pascal-like
language) will give you a hands-on experience on system implementation
that combines all this knowledge.
Next: 1.3 Compiler Architecture
Up: 1. Introduction
Previous: 1.1 What is a
  Contents
Leonidas Fegaras
2000-12-27