CSE 40243/60243 - Compilers and Language Design - Fall 2019

MWF 11:30-12:20AM, Nieuwland Hall 127
Prof. Douglas Thain
Email: dthain@nd.edu
Office: 384C Fitzpatrick Hall
Office Hours: Tue/Thu 1-3PM
TA: Tim Shaffer
Email: tshaffe1@nd.edu
Office: South End of Duncan Hall
Office Hours: Mon/Wed 3-5PM


Compilers is a challenging and fun course in which students will design and implement a complete compiler for a C-like language from top to bottom. The course brings together many different elements of computer science, ranging from the theoretical (formal grammar classes) to the very practical (x86 assembly language) with a pinch of software engineering in the middle. After completing the course, you will be able to write programs that manipulate computer languages in different ways, ranging from simple interactive calculators to programs that translate one language to another.

Students completing the course may also experience some side effects:

  • You will learn how to use pointers really well.
  • You will gain experience in engineering a complex piece of software, including source code control, testing, and evolution.
  • You will truly understand the C language inside and out, which will make you a better programmer all around.
  • Textbook and Online Materials

  • Course Syllabus
  • Introduction to Compilers and Language Design (Online Textbook)
  • Overview of B-Minor 2019
  • Example Code Repository
  • General Instructions for Turning In
  • Piazza Discussion Page
  • Typo Points

    To encourage you to read the textbook closely (and help me find bugs) I'll award "typo points" for each typo reported to me by email. Each typo point is worth 1/5 of an extra credit point toward your final grade, up to a maximum of 25 typo points, or 5 extra credit points.


    This schedule is approximate and will be updated as the class proceeds.

    Week Lecture Topic Reading Reference Assignment Links
    Aug 26 Introduction / Syllabus Ch 1 Ch 2 B-Minor LISP COBOL ALGOL
    Sep 2 Scanning: Regex / Automata Ch 3 Flex Manual Lexers, Unicode (Funny)
    Sep 9 Parsing: Top Down and LL(1) Ch 4.1-4.3 HW1 Due Friday
    Sep 16 * Parsing: Bottom Up and LR(1) Ch 4.4-4.6 SLR Handout Scanner Due Friday
    Sep 23 * Parsing with Bison Ch 5 Bison Manual HW2 Due Friday
    Sep 30 Abstract Syntax Tree Ch 6 AST HandoutHW3 Due Friday
    Oct 7 Typechecking Ch 7
    Oct 14 Catch Up Parser Due Monday, Midterm Friday
    Oct 21 Fall Break
    Oct 28 Typechecking Cont. Ch 7 Pretty-Printer Due Friday
    Nov 4 IR / Memory Management Ch 8 / Ch 9 Grads: Paper Due Friday
    Nov 11 Assembly Language Ch 10 Intel Manuals Type Checker Due Friday
    Nov 18 Code Generation Ch 11 On Trusting Trust
    Nov 25 Code Gen Cont. (Thanksgiving)
    Dec 2 Optimization Ch 12 Proebsting's Law
    Dec 9 Mon:Off Wed:Review Code Generator Due Thu
    Dec 16 Final Exam 4:15-6:15PM