CU website

Theory Application


Examinable material




ECE 556
Compiler Construction

This course follows the strategy of applying theory to practice:
  • Focus
    • applying theory to practical problems
  • Outcomes
    • theoretical model strengths and weaknesses
    • ability to appropriately select and apply theory to real problems
  • Concepts
    • formal languages
    • attribute grammars
    • tree automata
  • Assignments
    • hand simulation of analysis algorithms
    • use tools to generate analysis modules
    • apply generated modules to real problems
  • Tools
    • scanner and parser generators
    • attribute grammar analyzer
    • tree parser generator
Ad-hoc implementations of compiler tasks often contain subtle errors. The erroneous behavior is usually triggered by unforeseen combinations of linguistic elements. This problem was recognized early on, and a large body of theory has been developed for (or adapted to) design of correct compilation algorithms.

Theory derives its power from its ability to construct a consistent model of a domain, and to make guarantees about the correctness of operations in that domain. Unfortunately, languages used by humans are often not particularly consistent. We usually introduce inconsistencies for brevity, to avoid having to specify ``obvious'' things, in order to make problem statements easier for us to understand.

The combination of a need for theory and a need to escape from it makes compiler construction an excellent medium to explore the uses and limitations of theory in Computer Science. In a curriculum that emphasizes theory, it provides a way to both validate the material in other courses and show how adjustments must be made in practice.


Waite, W. M. and Gerhard Goos. Compiler Construction Springer-Verlag, New York, 1984. ISBN 0-387-90821-8

Revision 1.1 (2000/08/27 22:28:42)