Dakshina Ranjan Kisku Associate Professor Department of Computer Science and Engineering National Institute of Technology Durgapur
Dakshina Ranjan Kisku Associate Professor Department of Computer Science and Engineering National Institute of Technology Durgapur
Dakshina Ranjan Kisku Associate Professor Department of Computer Science and Engineering National Institute of Technology Durgapur
Associate Professor
Department of Computer Science and Engineering
National Institute of Technology Durgapur
[email protected]
1) Majority of texts, diagrams and tables in the slide is based
on the text book Compilers: Principles, Techniques, and
Tools by Aho, Sethi, Ullman and Lam.
2) Some texts and diagrams are based on MIT Slides on
Compilers Course 6.035.
3) Some texts and diagrams are taken from IITK slides of Prof.
S. K. Aggarwala.
• Compilers: Principles, Techniques, and Tools by Aho, Sethi, Ullman
and Lam, Addison-Wesley, 2006.
• Modern Compiler Implementation in Java (Tiger book) A.W. Appel
Cambridge University Press, 1998.
• Engineering a Compiler (Ark book) Keith D. Cooper, Linda Torczon
Morgan Kaufman Publishers, 2003.
• Advanced Compiler Design and Implementation (Whale book) Steven
Muchnick, Morgan Kaufman Publishers, 1997.
• Introduction to Compilers and Language Design, Douglas Thain, Lulu,
First Edition, 2019.
• Introduction to compilers, history of compilers, motivation, objectives, language
processing system, background issues and programming language principles.
• Syntax definition, Syntax directed translator, parsing, translator for simple expressions,
etc.
• Lexical analysis, regular expressions, finite-state machines, and scanner-generator tools.
• Parsing methods, top-down (recursive-descent, LL) and bottom-up (LR and its variants).
• Introduces the principal ideas in syntax-directed definitions and syntax-directed
translations.
• Generate intermediate code for a typical programming language.
• Run-time environments, especially management of the run-time stack and garbage
collection.
• Object-code generation. It covers construction of basic blocks, generation of code from
expressions and basic blocks, and register-allocation techniques.
• Code optimization, including ow graphs, data- ow frameworks, and iterative algorithms for
solving these frameworks.
• 1940: Programs were written in assembly language.
• 1951: The first practical compiler was written by Corrado Böhm for his PhD
thesis.
• 1951-2: Grace Hopper developed A-0 for the UNIVAC I (First implemented
compiler).
• 1952: The first Autocode and compiler in the modern sense were developed
by Alick Glennie at the University of Manchester for the Mark 1 computer.
• 1957: FORTRAN compiler developed by team led by John Backus at IBM.
(Turing award)
• 1958: The first ALGOL 58 compiler was completed by Friedrich L. Bauer et. al.,
for the Z22 computer.
• 1960s: Development of the first bootstrapping compiler for LISP.
• Theory of Computation –
• Finite State Automata, Grammars and Parsing, data-flow
• Algorithms –
• Graph manipulation, dynamic programming
• Data structures –
• Symbol tables, abstract syntax trees
• Systems –
• Allocation and naming, multi-pass systems,
• Computer Architecture –
• Memory hierarchy, instruction selection, interlocks and latencies, parallelism
• Security –
• Detection of and Protection against vulnerabilities
• Software Engineering –
• Software development environments, debugging
• Artificial Intelligence –
• Heuristic based search for best optimizations
• How about natural languages?
• English??
• “Open the directory where a couple of pdf files are kept.”
• “I am sorry Ravi, am afraid cannot do that”
• We are not there yet!!
• Natural Languages:
• Powerful, but…
• Ambiguous
• Same expression describes many possible actions
• Properties
• need to be precise
• need to be concise
• need to be expressive
• need to be at a high-level (lot of abstractions)
PROJECT MANAGERS
“I want UVT project get done by next week.”
PROJECT LEADERS
“Get fixed-deposit and rollback modules done within next couple of days.”
SOFTWARE ENGINEER/PROGRAMMER
“Just follow the instructions”
• Write a program using a programming language
• High-level Abstract Description
• Microprocessors talk in assembly language
• Low-level Implementation Details