COMP 520: Compilers

Location:Sitterson Hall- Rm FB009
Time:Tuesday/Thursday, 3:30PM - 4:45PM
Dates:FDOC: 1/11/24, LDOC: 4/30/24
Instructor:Syed Ali swali (at) cs.unc.edu
TAs:Eric Schneider eric (at) cs.unc.edu, Amin Zamani abz (at) email.unc.edu
Syllabus:Here
Piazza:Piazza
Gradescope:PWBK78


Office Hours

Note: Office hours are subject to change, always check Piazza first

Syed AliTueThu 5:00pm - 6:30pmSN314
Eric SchneiderMonWedFri 11:00am - 2:00pmSN314
Amin ZamaniTueFri 5:30pm - 6:45pmSN314



Programming Assignments

  1. PA1- Syntactic Analysis (Due 2024-02-02 11:59pm)
  2. PA2- Abstract Syntax Trees (Due 2024-02-21 11:59pm)
  3. PA3- Contextual Analysis (Due 2024-03-23 11:59pm)
  4. PA4- Code Generation (Due 2024-04-24 11:59pm)
  5. PA5- Final Compiler Submission (Due 2024-04-30 11:59pm)

Written Assignments

  1. WA1- Grammar rules, Parsing (Due 2024-02-09 11:59pm)
  2. WA2- Shift/Reduce, ASTs, Stratified Grammars (Due 2024-02-19 11:59pm)
  3. WA3- x64 Basics (Due 2024-04-02 11:59pm)
  4. WA4- PA4 Intricacies (Due 2024-04-24 11:59pm)
  5. WA5- Minimizing Registers (Due 2024-04-30 11:59pm)

Lecture Material

DateTitlePDFPowerpoint
2024-01-11Lec01- Course IntroductionPDFPPTX
2024-01-16Lec02- PA1 IntroPDFPPTX
2024-01-18Lec03- Parsing TheoryPDFPPTX
2024-01-23Lec04- Lexer and Grammar TheoryPDFPPTX
2024-01-25Lec05- Prediction and EBNFPDFPPTX
2024-01-30Lec06- PA2 and ASTsPDFPPTX
2024-02-01Lec07- Precedence and the Visitor ModelPDFPPTX
2024-02-06No Class
2024-02-08Lec08- Identification & Type checkingPDFPPTX
Shift-Reduce Parser Example: ShiftReduce.cpp
2024-02-13Well-Being Day
2024-02-15Lec09- PA3 IntroPDFPPTX
2024-02-20Lec10- Midterm Review
2024-02-22Midterm 1Cheat Sheet
2024-02-27No Class
2024-02-29Lec11- PA3 RefreshPDFPPTX
2024-03-05Lec12- x86 & HardwarePDFPPTX
2024-03-07No Class
2024-03-19Lec13- Branch ConstructionPDFPPTX
2024-03-21Lec14- PA4 Intro Part 1PDFPPTX
2024-03-26Lec15- PA4 Part 2PDFPPTX
2024-03-28No Class
2024-04-02Lec16- Code/Data Path AnalysisPDFPPTX
2024-04-04Lec17- Selective Code Path Generation and ICC Case StudyPDFPPTX
2024-04-09Lec18- THE TERRIFYING SECRETS OF ASTs, and Midterm ReviewPDFPPTX
2024-04-11Midterm 2Cheat Sheet
2024-04-16In-class Office Hours
2024-04-18Lec19- Minimizing Registers (RISC), Dynamic LibrariesPDFPPTX
2024-04-23In-class Office Hours
2024-04-25Lec20- Virtual Methods, Polymorphism, C# case studyPDFPPTX
2024-04-30Lec21- LLVM, Retargeting, JIT and EmulationPDFPPTX
2024-05-09Final Exam- 4pm (180 minutes) Cheat Sheet


Changelog

DateChange
2024-02-16Updated Lec07, Slides 26, 28-29
2024-02-14Updated Lec09, PA3
2024-02-12Uploaded Lec09
2024-02-11Uploaded PA3 Material
2024-02-07Uploaded Lec08
2024-01-28Uploaded Lec06, Lec07
2024-01-26Uploaded pa2 instructions
2024-01-25Uploaded Lec05
2024-01-23Uploaded Lec04
2024-01-19Updated pa1 instructions with an addendum on the last page
2024-01-18Uploaded Lec03
2024-01-16Updated syllabus- added final exam date
2024-01-16Added autograder test files