Compiler Construction 編譯器製作
Spring 2009

 Instructor: 劉 興 民                 Head Teaching Assistant 首席助教
Lectures: Tue, Thr 13:15-14:30            劉記顯 lch96m@cs.ccu.edu.tw
          工學院A館101教室                工學院A館410室
Office:   工學院A館403室                  分機23139
e-Mail:   damon@computer.org
Phone:    分機33118

This course covers all aspects of modern compiler construction, including lexical scanning, theory of parsing, grammars and attribute grammars, type checking, code generation and optimization.

As part of this course, there is a fairly significant programming component. Each student (or in groups of two students) will build a working compiler from scratch using contemporary techniques. The compiler project is broken into several parts that are due at various points throughout the semester. The language of implementation is Java or C/C++.


Readings
  • Modern Compiler Implementation in Java, Andrew Appel, 2nd Edition, Cambridge University Press, ISBN: 0-521-82060-X. [Essential]
  • Modern Compiler Implementation in C, Andrew Appel, Cambridge University Press, ISBN: 0-521-58390-X. [Supplementary]
  • Compilers: Principles, Techniques, and Tools, Alfred Aho, Monica Lam, Ravi Sethi, and Jeffrey Ullman, 2nd Edition, Addison-Wesley, ISBN: 0-321-48681-1. [Supplementary]
  • Java Virtual Machine, Jon Meyer and Troy Downing, O'Reilly, ISBN: 1-56592-194-1. [Supplementary]
  • The Java Virtual Machine Specification, Tim Lindholm and Frank Yellin, 2nd Edition, Addison-Wesley, ISBN: 0-201-43294-3. [Supplementary]
  • Indicative Topics
    1. Structure of a compiler
    2. Scanner construction
    3. Parsing overview
    4. Top-down parsers
    5. Bottom-up parsers
    1. Abstract syntax
    2. Context sensitive analysis
    3. Java virtual machine
    4. Run-time environments
    5. Intermediate representations
    1. Code generation
    2. Code optimization
    3. Liveness analysis
    4. Register allocation
    5. Garbage collection

    Evaluation
    Programming projects [40%]; Midterm [30%]; Final [25%]; Class participation [5%].
    Cutoff for passing grades at the end of the semester will be the raw score 60 or close to the scale of 45%, depending on which one is lower. Exceptions are sometimes made for classes perceived to be significantly stronger or weaker than the norm. Moreover, please use the discussion board to post general questions about the course. The staff will attempt to answer these questions in a timely manner, but do not hesitate to answer someone else's question if you know the answer. This will count toward "class participation" and your efforts will not be unnoticed.

    Academic Honesty Policy
    All graded materials (examinations and programming assignments) must be strictly individual efforts. Students are encouraged to study together, and to discuss general problem-solving techniques that are useful on assignments. But when working on an assignment, students should not share detailed notes, pseudocode or code, and all work submitted must be done individually. Students are expected to maintain the highest standards of academic conduct. Honest students are frustrated by the unfairness of cheating that goes undetected and therefore unpunished. Students who cheat skew the grading curve in a class, resulting in lower grades for students who worked hard and did their own work. Therefore, if you witness any cheating (in examinations or program assignments) by classmates, please report it to the instructor as soon as possible.

    Course Repository 課業倉儲

    Discussion Board 課程討論區