COMP 520
Compiler Design
Winter 2015


Professor Laurie Hendren

Tuesday, Thursday, Friday 10:35-11:35
McConnell 103


2015 Contest Winners

OncoTime Compiler
(Michael Noseworthy, Pascale Gourdeau and Joel Cheverie)
GoLite Compiler
(Alexander Krolik, Lei Lopez and Valerie Saunders Duncan)
Peephole Optimizations
(Zoe Guan)


Announcements and Schedule

Announcements

Schedule (may change as the term progresses)

-->
Week 1 (Jan 5-9)
Lecture Topics:
Introduction to the course
Introduction to compilers
Scanning
Readings:
Chapters 1, 2 and 3, Crafting a Compiler
Introduction slides (with course outline)
Introduction - part 2 slides
Scanner slides
Learn github
For those students who have not taken COMP 330, you need to learn the basics of regular expressions/languages and context-free languages. A good online resource may be found here
Milestones:
Start to form groups (3 people per group recommended)
Week 2 (Jan 12-16)
Lecture Topics:
More on Scanners
Parsers
Readings:
Parser slides - Part 1
Parser slides - Part 2
Chapter 4: 4.1-4.4 recommended; 4.5 optional, Crafting a Compiler
Chapter 5: 5.1-5.2 recommended; 5.3-5.9 optional, Crafting a Compiler
Chapter 6: 6.1, 6.2 and 6.4 recommended; 6.3 and 6.5 optional, Crafting a Compiler
Milestones:
Form groups by the end of the week
Week 3 (Jan 19-23)
Lecture Topics:
OncoTime - Domain Specific Language
Abstract Syntax Trees
SableCC
Readings:
OncoTime Slides
AST (Part 1) Slides
AST (Part 2) Slides
Chapter 7: Crafting a Compiler
alternative: Chapter 4: Modern Compiler Design in Java
Milestones:
Individual warmup assignment
Add/drop deadline, January 20
Group formation formalization
Week 4 (Jan 26-30)
Lecture Topics:
Introduction to Go
Type Checking
Readings:
Chapter 8.8, Crafting a Compiler
Week 5 (Feb 2-6)
Lecture Topics:
More Symbol Tables
Symbols and Types for the Projects
Readings:
Chapter 8.1-8.7, Crafting a Compiler
Milestones:
Individual Warmup Assignment, Part 2
No Lecture, Feb 3
Week 6 (Feb 9-13)
Lecture Topics:
Virtual Machines
Readings:
Milestones:
Group Scanner, Parser and Weeding, Monday, Feb 16
Week 7 (Feb 16-20)
Lecture Topics:
Virtual Machines and Code Generation
Readings:
Milestones:
Group Scanner, Parser and Weeding, Monday, Feb 16
Week 8 (Feb 23-27)
Lecture Topics:
Code Generation
Optimizations
Readings:
Milestones:
Group Type Checking, Friday, March 6

Study Break

Week 9 (March 9-13)
Lecture Topics:
Review (Tuesday) and Midterm (Friday)
No class on Thursday
Milestones:
Midterm, Friday 13th
Week 10 (Mar 16-20)
Lecture Topics:
Garbage Collection and Optimization
Readings:
Week 11 (Mar 23-27)
Lecture Topics:
Native Code Generation
Week 12 (Mar 30 - Apr 3)
Lecture Topics:
Static Analysis
Readings:
Milestones:
Wednesday, April 1, Milestone #3
Thursday April 2, no lecture
Friday April 3, Good Friday, no lecture
Week 13 (April 6-10)
Lecture Topics:
More Static Analysis and Couse recap
Readings:
Milestones:
Monday, April 6, Easter Monday
Milestone #4, Friday April 10
Post Weeks (April 13-17 and 20-24)
Milestones:
Final Report, Tuesday, April 14
Peephole Competition, Tuesday, April 14
Group Presentations to instructor/TA
No classes (no class on April 14)
Final Exams begin April 16
COMP 520 Final Exam: April 21, 2pm

Resource Materials

Version Control Systems

Tiny Language Example (flex/bison, SableCC2 and SableCC3)

Online documentation

Under The Hood articles:

JOOS Example

Go and GoLite

OncoTime

Previous Years' Home Pages