CMSC 129
Principles of Compiler Design
Created by TJ Monserrat
Course Description
Fundamental concepts in the design and implementation of compilers: lexical analysis, syntax analysis, intermediate code generation, code generation and optimization
At the end of this course...
Apply the principles in the theory of computation to the various stages in the design of compilers;
Explain the stages involved in the translation process;
Analyze problems related to the stages in the translation process;
Design a compiler for a simple programming language; and
Implement a compiler based on its design.
Schedule - January
January 18 - Meetup
January 25 - No Classes (Faculty Workshop)
Schedule - February
February 1 - Lecture 1
February 8 - No Classes. (Chinese New Year)
February 15 - Lecture 2
February 22 - Lecture 3
February 29 - Lecture 4
Schedule - March
March 7 - Lecture 5
March 14 - Lecture 6
March 21 - No Classes. (Holy Week)
March 28 - Lecture 7
Schedule - April
April 4 - Lecture 8
April 11 - Lecture 9
April 18 - Lecture 10
April 25 - Lecture 11 (Last day of classes for CMSC 129, post initial updated grades
Schedule - May
May 2 - No Classes (Labor Day)
May 9 - No Meetup (Possible trip)
May 16 - No Classes (Last day of submission of project and checking of grades)
Topics
Brief introduction of Designing Compilers - Structure of Compiler
- Language Processors
- Lexical Analysis
- Syntax Analysis
- Semantic Analysis
- Intermediate Code Generation
- Symbol table Management
Topics
Creation of Grammars - Syntax Definition
- Definition of Grammars - CFG
- Notation Conventions
- Ambiguity
- Verifying Language created by Grammars
- Regular expressions
Topics
Lexical Analysis
- Role of Lexical Analyzer
- Input Buffering
- Finite Automata
- Creation of lexemes
Topics
Syntax Analysis
- Role of the Syntax Parser
- Error reporting and recovery
- Top-down parsing
Topics
Syntax Directed Translation
- Syntax directed Definition
- Syntax tree
- Post-fix translation schemes
Topics
Symbol Tables and Intermediate Code generation
- Three-Address Code
- Translation of Expressions
- Control Flow
Project
Specifications to follow...
Grading System - Getting a Line of 1
- 1.0 - All exercises done and working, project working with documentation
- 1.25 - All exercises done and working, project has minor errors with documentation
- 1.50 - All exercises done and working, project has minor errors
- 1.75 - All exercises done and working, project has major errors with documentation
Grading System - Getting a Line of 2
- 2.0 - All exercises done and working, project has major errors
- 2.25 - All exercises done and working, project was incomplete (at least 50% complete or up to creation of syntax tree)
- 2.5 - All exercises done and working
- 2.75 - All exercises done but 25% are not working or has some errors
Grading System - Just getting by...
- 3.0
- All exercises done but 50% are not working or has some errors… or
- 75% submitted exercises done and working
Grading System - Why would you even try to not complete the course?
- INC - Did not meet the requirements above
Grading System - Notes to live by...
- If all exercises were submitted but 25% are not working but did the project, -0.25
- If 75% of exercises were submitted but all are working and did the project, -0.5
- If 75% of exercises were submitted but some are not working but still did the project, -0.75
- If no exercises were submitted or submitted all but all are not working and still has project, -1.0
- If after the grade subtraction, grade is < 3.0 then grade is INC
How to get the slides or Class Specs
Google Docs: https://goo.gl/SLMzVB
Slides: https://github.com/tjmonsi/cmsc129-slide1
CMSC 129
Principles of Compiler Design
Created by TJ Monserrat