Fall 2023 - CMPT 379 D100
Principles of Compiler Design (3)
Class Number: 6153
Delivery Method: In Person
Course Times + Location:
Sep 6 – Oct 6, 2023: Tue, 12:30–2:20 p.m.
Oct 11 – Dec 5, 2023: Tue, 12:30–2:20 p.m.
Sep 6 – Dec 5, 2023: Fri, 12:30–1:20 p.m.
Exam Times + Location:
Dec 17, 2023
Sun, 3:30–6:30 p.m.
Prerequisites:(MACM 201 or CMPT 210), (CMPT 295 or ENSC 215) and CMPT 225, all with a minimum grade of C-.
This course covers the key components of a compiler for a high level programming language. Topics include lexical analysis, parsing, type checking, code generation and optimization. Students will work in teams to design and implement an actual compiler making use of tools such as lex and yacc.
This course covers the theoretical foundations as well as practical techniques for the construction of a compiler for a high-level programming language. Topics include lexical analysis, parsing, type checking, code generation, and optimization. Students will implement an actual compiler for a high-level programming language.
- Formal-language theory: alphabets, words, languages, regular expressions, finite automata
- Compiler design and implementation principles
- Lexical Analysis: scanners, symbol tables
- Parsing: context-free grammars, parse trees, ambiguity, top-down and bottom-up parsing
- LL(1) parsing: efficient top-down parsing, left-factoring
- Shift-reduce and table-driven parsers: bottom-up parsing
- Type checking: typing rules, types as inferencing rules, Context checking for programs
- Context and code generation: from high-level to machine code
- Introduction to optimization: local, global, and interprocedural.
The grade distribution will be handed out at the start of classes.
Students must attain an overall passing grade on the weighted average of exams in the course in order to obtain a clear pass (C- or better).
MATERIALS + SUPPLIES:
- Compilers: Principles, Techniques and Tools, A.V. Aho, M.S. Lam, R. Sethi, J.D. Ullman, Addison-Wesley, 2007, 9780321486813, 2nd edition (the purple dragon book).
- Programming Language Pragmatics, M.L. Scott, Morgan-Kaufmann, 2006, 9780126339512, 2nd Edition
- Engineering a Compiler
- Cooper Torczon, Morgan Kaufmann
- 3rd Edition
REQUIRED READING NOTES:
Your personalized Course Material list, including digital and physical textbooks, are available through the SFU Bookstore website by simply entering your Computing ID at: shop.sfu.ca/course-materials/my-personalized-course-materials.
ACADEMIC INTEGRITY: YOUR WORK, YOUR SUCCESS
SFU’s Academic Integrity website http://www.sfu.ca/students/academicintegrity.html is filled with information on what is meant by academic dishonesty, where you can find resources to help with your studies and the consequences of cheating. Check out the site for more information and videos that help explain the issues in plain English.
Each student is responsible for his or her conduct as it affects the university community. Academic dishonesty, in whatever form, is ultimately destructive of the values of the university. Furthermore, it is unfair and discouraging to the majority of students who pursue their studies honestly. Scholarly integrity is required of all members of the university. http://www.sfu.ca/policies/gazette/student/s10-01.html
Students with a faith background who may need accommodations during the semester are encouraged to assess their needs as soon as possible and review the Multifaith religious accommodations website. The page outlines ways they begin working toward an accommodation and ensure solutions can be reached in a timely fashion.