CS 780 Compiler Design and Construction I

  • Quarter : Fall, 2011
  • Class Hrs : MW,  6:05pm-7:20pm, 193 JC
  • Office Hrs : MW, 3-4pm (395 Joshi) (or by appointment 395 Joshi)

  • Table of Contents

    1. Course Description
    2. Prerequisites
    3. Texts and References
    4. Relevant Websites
    5. Course Load and Grading
    6. Class Schedule, Syllabus, and Lectures
    7. Assignments and Exams
    8. Late Submission Policy
    9. Collaboration vs Academic Misconduct
    10. Research Journals and Conferences 

    Course Description

    This course deals with the theory and practice of compiler design. Topics emphasized are scanning and parsing. If time permits, semantic analysis will also be covered.


    Required Texts

    1. Compiler Construction: Principles and Practice, Kenneth C. Louden, PWS Publishing Company, 1997.


    1. lex & yacc,2nd edition, John R. Levine, Tony Mason & Doug Brown, O'Reilly & Associates, Inc, 1992.
    2. Modern Compiler Implementation in Java (2nd Ed.), Andrew Appel, Cambridge University Press, 2002.
    3. Compilers: Principles, Techniques, and Tools (2nd Ed.), Aho, Lam, Sethi and Ullman, Addison Wesley, 2007.
    4. The C++ Programming Language, Third Edition, Bjarne Stroustrup, Addison Wesley, 1997.

    Relevant Websites

    Course Load

    The course load includes three programming assignments based on the  COOL compiler project worth 35 points, a midterm worth 30 points and a final worth 35 points. Normally, exams are open book and open lecture notes.


    The letter grades will be assigned using the following scale: A[90-100], B[80-90), C[70-80), D[60-70), and F[0-60). However, I reserve the right to adjust the scale somewhat to utilize the gaps in the distribution. Academic dishonesty will be "rewarded" with a grade of "F". "Sharing/reuse" of solutions to assignment problems is strictly prohibited.

    Class Schedule, Syllabus and Lectures  

    Topic Readings
    Class 1 Introduction to Compilers Chapter 1
    Class 2 Introduction to COOL CoolAid
    Class 3 Lexical Analysis Chapter 2
    Class 4 Implementing Lexer
    Class 5 FLEX Chapters 1-2, 6   lex & yacc
    Class 6 Context-free Grammars Chapter 3
    Class 7 Ambiguity; Abstract Syntax Trees Attribute Grammars
    Class 8


    Class 9 Midterm Exam (Oct 12)
    Class 10 Top-down Parsing Chapter 4
    Class 11


    Class 12 Bottom-up Parsing Chapter 5
    Class 13  Bottom-up Parsing : Basics (ppt)
    Class 14 Bottom-up Parsing : Algorithms
    Class 15 (continue)
    Class 16 LR Parsing
    Class 17 (continue) (ppt)
    Class 18 Overview of Semantic Analysis Chapter 6
    Class 19 Type Checking and Inference
    Class 20 (WRAP-UP)

    Final Exam (Nov 16) (8pm-10pm)

    ASSIGNMENTS (Fall 2011) 


    EXAMINATIONS (Fall 2010)

    Late Submission Policy

    You will lose 5% for each day an assignment is submitted late; assignments will be accepted up to 4 days past the submission time. Late penalty is accrued on weekends just as during the week. For every 24 hour period (or fraction thereof) that the assignment is late, 5% is deducted from your score. Partial credit will be given to students who turn in partially completed assignments. Electronic submission will be used for all assignments.

    Special considerations will be given for students who have a medical excuse for late submission (written notification from a doctor is required). These considerations may extend to medical emergencies involving children or other family members. Such consideration is at the discretion of the instructor. Special consideration may also be given for employment conflicts (e.g. military duty, travel) if brought to the attention of the instructor prior to the due date for an assignment.

    Course requirements for other courses are NOT a valid reason for special consideration.

    Collaboration vs Academic Misconduct

    You are encouraged to exchange ideas regarding your programming assignments with your classmates. However, you must turn in your own work for each assignment (unless I explicitly assign a group project). As such, you should discuss programming assignments at the conceptual level only and should not share your code with your classmates. You should also never recycle printouts in public computer labs, never leave your workstation unattended without first locking the screen, always wait until your printouts have printed or delete them from the print queue when using public printers, always remove any files that you have downloaded to the PC in public PC labs, etc.

    Submitting a program as your own, when some or all was written by someone else is an act of  plagiarism and constitutes academic misconduct. The minimum penalty for such a misconduct is a score of 0 on the assignment. See your student handbook for more information on academic misconduct and its consequences. Misconduct will be handled in accordance with university policy.

    T. K. Prasad 
    (08/31/11 )