You are on page 1of 9

CS327 - Compilers

Introduction

Abhishek Bichhawat 08/01/2024


● Reference Books:
Compilers: Principles, Techniques,
and Tools by Aho, Lam, Sethi, Ullman.
Course Details Modern Compiler Implementation in Java
by Andrew Appel

● Use Canvas for communication


Course Grading ● Assignments/Project - 50%

● Exams (Quizzes) - 50%


Tentative and subject to change
anytime before the final two
weeks of the semester
● Build compiler for any mini-language
● No two languages should be the same
● 8 tasks spread across the semester
● Teams of 3 (or lesser) students
Course Project ● Choose teams by end of this week
● No extensions
○ Start early
○ Points deducted at 2% per hour of lateness
● Viva with every assignment
○ Know Your Code
○ Points deducted for unsatisfactory responses
Checkpoint Deliverables
1 Syntax of new language
2 Print tokens from the lexer
3 Print tokens from the parser

Course Project 4 Enforce syntax


5 Design AST
6 Create AST from grammar
7 Semantic analysis
8 Code generation
● 2 Written Exams
● 0 (or more) quizzes
○ 30-45 min each
● Dates for quizzes will be
Quizzes/Exams announced one week
before the quiz
● No change in dates
● For exam score, we will
take 2 exams and n quiz
scores of your choice
History
● Until the early 1950s, programs written in low-level languages
○ Software costs much higher than hardware costs
● “Speedcoding”
○ Developed by John Backus - 1953
○ Kind of an “interpreter”
○ Faster to write programs but 20x slower than native code execution
○ Took up a lot of memory (300 bytes!)
● FORTRAN
○ Translate high-level source code to assembly
○ Development times were down to hours
○ Generated machine code almost as good as hand-written.
Programming Languages
Interpreters Compilers

Program Data Program

Interpreter Compiler

Executable Data
Output File

Output
Compiler Phases

Abstract
Source Lexical Parsing
Tokens Syntax
Program Analysis
Tree
Semantic
Analysis

Attributed
Target Code Optimized AST
Code Generation Code Optimization (Intermediate
Code)

You might also like