Next: 1.3 Compiler Architecture
Up: 1 Introduction
Previous: 1.1 What is a
Contents
Many variations:
- many programming languages (eg, Java, C++, Scala)
- many programming paradigms (eg, object-oriented, functional, logic)
- many computer architectures (eg, x86, MIPS, ARM, alpha, PowerPC)
- many operating systems (eg, Linux, OS X, Microsoft Windows, Android, iOS)
Qualities of a compiler (in order of importance):
- the compiler itself must be bug-free
- it must generate correct machine code
- the generated machine code must run fast
- the compiler itself must run fast (compilation time must be proportional to program size)
- the compiler must be portable (ie, modular, supporting separate compilation)
- it must print good diagnostics and error messages
- the generated code must work well with existing debuggers
- 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
2015-01-20