Homework and the Project

Reading Assignments

    There is one traditional textbook, which you are expected to read cover to cover and other suggested reading that is optional.

Abbreviation What Details
L Textbook Kenneth C. Louden
Compiler Construction: Principles and Practice
PWS Publishing Co., 1997.
ISBN 0534939724
LMB Suggested reading John R. Levine, Tony Mason, and Doug Brown
Lex & Yacc
O'Reilly & Associates, 1992.
ISBN 1565920007
D Online notes C. C. Douglas, class notes

A good idea is to first sit down for a set period of time (e.g., 60 minutes) and read the textbook like a comic book.  Do not really read anything, but look at every single page (in order):  skim a little, look a little.  Your mind will subconsciously remember things later when you have to read the books in detail.

    The table below lists what you are required to read by what date:

Read by Book What Comments
8/30/2005 L All Spend no more than 60 minutes on this.  Just skim it and see what is in the book (and where).
9/1/2005 L Chapter 1 Skim sections 1.6 - 1.8.  I may assign some exercises from the end of the chapter.
9/8/2005 L Chapter 2  
9/15/2005 L Chapter 6.3 Symbol table philosophy
9/29/2005 D p. 50 We are so far ahead...
10/6/2005 L Chapter 3 Context free grammars
10/11/2005 LMB Chapters 3 and 7 yacc (this is not required, but might be helpful)
10/13/2005 L Chapter 4 Top down parsing
10/20/2005 L Chapter 5 Bottom up parsing
10/27/2005 L Chapter 6 Semantic analysis
11/15/2005 L Chapter 7 Memory organization at runtime
11/22/2005 L Chapter 8 Code generation

Homework Assignments

    Homework will typically be done individually when textbook assignments are given and by your group when I give a programming exercise.

Due Date How Link/Description Solution
9/6/2005 Individual L, Ch. 1, probs. 1.2, 1.3, and 1.10  
9/8/2005* CSLab, Group Simple lexer My simple lexer
9/15/2005* CSLab, Group Simple symbol table addition  
9/22/2005* CSLab, Group Floating point numbers, key words, and operators  
9/29/2005* CSLab, Group Optimizing your lexer  
10/6/2005** CSLab, Group Arithmetic expressions  
10/20/2005* CSLab, Group+Individual Grammar definition of f05 language  
10/27/2005* CSLab, Group yacc implementation of grammar  
11/15-17/2005* CSLab, Group First working code generation  
12/1/2005* CSLab, Group Working compiler  

* Automatic extension through the weekend.  However, I will monitor your progress on the due date.
** Automatic extension through the following weekend.  However, I will monitor your progress weekly.

Resources of Interest

    Lex, flex, yacc, byacc, and bison can easily be found on Linux, FreeBSD, and Mac OS X systems.  Some of these tools can work with C++, not just C.  Tools like jlex and jyacc work with Java.  Searching on the web will find them for various operating systems (e.g., Cygwin for Windows.

Class Project

    During this semester, students will be paired off into groups.  Each group will will write a complete compiler for the class language in C or C++ (see the Language link at the top of any class web page).  If you do not know either of these languages, learn one right away or drop the class immediately.  This is going to be a heavy programming course.  Swapping codes with other groups is expressly forbidden unless authorized by me in advance.  If in doubt, contact me first.  Otherwise you might find yourself in deep, deep trouble legally.

    Due dates will be on this page in this section as the semester progresses.  You are under no obligation to turn your project in at the last minute.  If you can finish it in October, you might discover that you are done with the course.  WarningThe due dates are currently approximate.  Watch this page for the exact dates.

Due Date Percentage Link What is Due
10/4/2005* 25 9/29 Lexer
11/3/2005* 35 10/27 Parser
12/6/2005* 40 12/1 Code Generator

* Firm date, ** Tentative date

    Warnings:

  1. The code generator takes a good bit of time to do.  It is much trickier than you think it is.  You had better get right on it once your parser is done or you will never finish it by the due date.  If you wait until December to start, you are really sunk.
  2. I do not plan on giving any Incompletes.

Groups

    The programming/project groups are as follows:

Group Name Members
441g1 Fitzpatrick, Sargent
441g2 Can, Ter-Isahakyan
441g3 Mattei, Turgay
441g4 Carey, Jones
441g5 Duncan
441g6 Bahramahi, Vogel
441g7 Hishmeh, Payne
441g8 Barker, Baumann
441g9 Burklow, Logsdon
441g10 Mbaki, Van Horn

See or contact me immediately if there is a problem with your group.