Lecture 1 16092024 120225pm
Lecture 1 16092024 120225pm
Lecture 1: Introduction
• MS(Computer Science)
– Université de Lorraine,
Nancy France (2007-2008)
About me
• Ph.d (Formal Verification)
– Researched at INRIA Nancy
– Université de Lorraine, Nancy, France (2008-2012)
Contact details
• Email: [email protected]
• Office hours:
Some Rules
Total 100
Quizzes 10
Assignments 8
Projects 12
Mid-Term Examination 20
Final Examination 50
Assignments and Projects
• 2 Assignments
• 2 Projects
– Phase 1: Write language specification and
generate scanner and parser for the language.
– Phase 2: Write intermediate code generator and
target code generator in java for the output of
Phase 1.
– Documentation is mandatory along with the
projects.
15
What is a compiler, what does it do?
What is this course about?
• How are programs written in a high-level
language transformed into machine code?
• How can we ensure a program is somewhat
meaningful?
• How is the program’s memory managed?
• How can we analyze programs to discover
invariant properties and improve their runtime
performance?
Compiler
• Meta-language:
– a language to talk about another language
Advantages of compilers
Front IR IR IR Back
End code Optimization code End
Target
Code
Front End
Input string
IR Code
Lexical analysis
Le t t e r s Words
Lexical
Characters analyzer
tokens
Lexical analysis
Stream of characters
Stream of characters
IR Code
Optimization generation
Target code
Optimization
optimized to
Code Generation
generates
Class Activity
if x == y then z = 1;