This year the course will involve two problem sets, followed by the main project. The main project this year will be to build an AspectJ compiler that accepts Java source code, and does weaving (a key operation in the implementation of AspectJ) after compilation. We will also do our work in Java 1.5 (aka Java 5), which will give us the challenge of working through the generic types in 1.5. This will be an exciting and challenging project. In exchange for your hard work, you will learn a lot about languages, compilers, software development and how to use programming language expertise to make a large project work better. This project will also give you an opportunity to work with aspect-oriented programming, which is a hot new area in programming languages.
You are expected to have a good knowledge of programming languages (CPSC 311 is the prerequisite), and you should also be able to write programs in Java.
So that we can get to know each of you better, please fill out the Student Information Sheet and bring a hardcopy to lecture. You can take this HTML page, and edit it to have the information and your picture, and then print that. Or you can just print it, write in the information by hand and staple a photo to it. Either way is fine.
The course text provides background reading for our work this semester.
Programming Language Processors in Java, Compilers and Interpreters, David A. Watt and Deryck F. Brown. (ISBN 0 130 35786 9)Several copies are available in the reading room. The bookstore also has some. Not everyone needs to buy a copy, but everyone should plan to read through the book, as shown on the schedule below.
You may also find it helpful to consult the notes from last year's class, or the year before. In addition, there are numerous other courses around the world from which we have drawn ideas, one such set of notes was prepared by Laurie Hendren and Michael Schwartzbach, and is used in the McGill 520A compiler course.
The following additional documentation will be useful to you as you complete the course. Check this section often for additions to this material.
The instructor and TAs have regularly scheduled hours when they
are available to discuss questions and course material. The schedule is:
The newsgroup is also a very effective means of communication if used correctly. Questions about the assignments and project should be posted to the newsgroup rather than being emailed to the instructor or a TA, as everyone will see both the question and its answer. All students are encouraged to post answers to questions posed on the newsgroup as well.
Problem Sets and Project | 50% |
Quizzes | 25% |
Final Exam | 25% |
I am aware that this policy means that some students could try to hand in homework they did little of the work on. You should be aware that it will not be possible to pass the quizzes and the final unless you fully understand the problem sets and project you hand in. Be sure that you understand the complete design and code for everything you and your group hand in.
So that everyone has equals access to prior quizzes in the course, here are the quizzes from last year:
Spring 05 Quiz 1
Spring 05 Quiz 2
The lecture in this course will be conducted in an interactive style. You are encouraged to ask and answer questions during lecture. This style is designed to help you bridge between the lecture and the technical discussions that you homework and project groups will be having.
The problem sets will occur early in the semester. They will involve a combination of coding and write-up. The project itself will have intermediate hand-ins, designed to help you pace your work, and see how you are doing as you go along.
Important downloads to do the assignments and the project will be made available here as we go along.
Eclipse Project for Problem Set 1
NOTE:
Because we are trying a new approach to this material, you should consider the following schedule to be somewhat fluid. Some topics may move as we go through the semester. You should check this schedule regularly for changes. In addition to being announced in lecture changes, assignments, quizzes and the like will be posted here.
In broad terms, the course has two parts:
Week 1 - Introduction and Overview
January 2005 S M Tu W Th F S 1 2 3 4 5 6 7 L L
Topics: What is a compiler? What is the value of understanding compilers? How
can a chief architect use knowledge of compilers to guide a large
project? Bootstrapping a compiler.
NOTE: these slides are not complete lecture notes. Reading: Read Chapter 1 for Friday. Homework: Legend:
|
Week 2 - Abstract Syntax Trees, AOP
IntroductionJanuary 2005 S M Tu W Th F S 8 9 10 11 12 13 14 L L L Topics: Representing programs. Issues in AST design. Parse trees vs. ASTs. Size of core language. De-sugaring. Code walking, code walking with visitors, generating visitor infrastructure. AOP, AspectJ, crosscutting structure, how AOP affects software design.
Reading: Read Chapter 2 for Monday, and Chapter 3 for Wednesday. (The reading will slow down after this.) Homework:
|
Week 3 - Intro to AOP, Name Binding January 2005 S M Tu W Th F S 15 16 17 18 19 20 21 L L L Topics: AOP continued. Binding names to declarations, scopes, symbol tables. Reading:
Chapter 4 of textbook.
Homework: |
Week 4 - Name BindingJanuary/February 2005 S M Tu W Th F S 22 23 24 25 26 27 28 L, PS1 L L Topics: Reading: Chapter
4 of textbook. Homework: |
Week 5 - Type CheckingFebruary 2005 S M Tu W Th F S 29 30 31 1 2 3 4 L - -Topics: Types, type expressions, computing types, checking types, higher-order types. Reading: Chapter 5 of textbook Homework:
|
Week 6 - Type Checking, Project, Quiz 1February 2005 S M Tu W Th F S 5 6 7 8 9 10 11 L L QTopics: Type checking First description of this year's project. Reading: Chapter 5 of textbook. Homework: |
Week 7 - MIDTERM BREAK February 2005 S M Tu W Th F S 12 13 14 15 16 17 18 ----------------------
|
Week 8 - Virtual Machines and Code Generation February/March 2005 S M Tu W Th F S 19 20 21 22 23 24 25 L L L Topics: Runtime organization, stack machines, register machines, instruction sets, target models...schemes for generating code. Reading: Chapter 6 of textbook. Runtime Lecture Notes
|
Week 9 - AOP, AspectJ, AOP Target ModelMarch 2005 S M Tu W Th F S 26 27 28 1 2 3 4 L L L Topics: Detailed semantics of key AspectJ language mechanisms, with an eye towards implementing them in your compiler. Target model for advice, join point shadows and pointcuts.
Reading: Homework:
|
Week 10 - March 2005 S M Tu W Th F S 5 6 7 8 9 10 11 L L L Topics: Project Issues, Parsing Reading: Homework:
|
Week 11 - TBDMarch 2005 S M Tu W Th F S 12 13 14 15 16 17 18 L CR - Topics: Finish Parsing, Code Reviews Reading: Homework:
|
Week 12 - AOSD Conference Week (No Lecture)March 2005 S M Tu W Th F S 19 20 21 22 23 24 25 - - -Topics: Reading: Homework: |
Week 13 - March/April 2005 S M Tu W Th F S 26 27 28 29 30 31 1 -- L Q2Topics: ABC Compiler, Quiz 2 Reading: abc:An Extensible AspectJ Compiler, abc Technical Report abc-2004-4 Homework: |
Week 14 -
April 2005 Topics: Reading: Homework:
|