M4: Static Semantic Analysis & Intermediate Representation¶
We will begin an introduction into the next phase of the compiler, static semantic analysis. We will also continue our discussion into syntactical analysis by looking over common parsing algorithms. We will also begin discussing Intermediate representations.
Pre-recorded Lectures¶
Note: Professor Samuels will state on Ed when the prerecorded videos are ready to be viewed each week for a module.
The pre-recorded lectures are available here: M4 Videos. You can also find the videos under the “Panopto” tab on the MPCS 51300 canvas site.
The lectures are a series of approx 15-20 minute videos. Please come back here weekly as the videos will be updated if a module spans multiple weeks. This module includes the following videos:
Week 4¶
4.0: Syntax Error Handling
4.1: AST Construction using an ANTLR Parse Tree (Part 1)
4.2: AST Construction using an ANTLR Parse Tree (Part 2)
Week 5¶
4.3: Control-flow Graphs
4.4: Introduction to LLVM
4.5: LLVM Control-flow
4.6: IR Phase-Implementation
The slides presented in these videos are accessible in the upstream repository and canvas.
Resources/Readings¶
The slides and code presented in this module are accessible in the upstream repository and canvas.
- Engineering a Compiler* readings:
Chapter 4.1 - 4.4
Synchronous Sessions (In-person Lecture)¶
As a reminder here are the dates and times for the synchronous session for this module:
Week 4¶
- Dates/Times
Section 1: Wednesday January 29th @ 10:30am-12:20pm
- Discussion Outline
Intermediate Representations
Introduction to Semantic Analysis
Introduction to Symbol Tables
Week 5¶
- Dates/Times
Section 1: Wednesday February 5th @ 10:30am-12:20pm
- Discussion Outline
Memory Layout/Storage
Control-flow Graphs
Introduction to LLVM
Assignment¶
Assignments are always due on Friday evenings.
Milestone #3, due February 7th at 11:59pm CDT
Milestone #4, due February 21st at 11:59pm CDT