SlideShare une entreprise Scribd logo
1  sur  18
System Software (5KS03)
Unit 1 : Introduction to Compiling
Lecture : 1 Introduction to Compiling:
Phases of a compiler,
A S Kapse,
Assistant Professor,
Department Of Computer Sci. & Engineering
Anuradha Engineering College, Chikhli
Contents…
 Introduction to Compilers
Objectives…
 Upon completion of this lecture, you will be able
 To understand the basics Compiler
 To understand analysis and synthesis.
 To understand use and purpose of compiler
Review…./ Concepts
 What do you mean by Software?
 What do you mean by Operating System?
 What do you mean by system?
 What do you mean by compiler?
Introduction to Compilers
 As a Discipline, Involves Multiple CS&E Areas
 Programming Languages and Algorithms
 Theory of Computing & Software Engineering
 Computer Architecture & Operating Systems
 Has Deceivingly Simplistic Intent:
Compiler
Source
program
Target
Program
Error messages
Diverse & Varied
Classifications of Compilers
 Compilers Viewed from Many Perspectives
 However, All utilize same basic tasks to accomplish
their actions
Single Pass
Multiple Pass
Load & Go
Construction
Debugging
Optimizing
Functional
The Model
 The TWO Fundamental Parts:
 We Will Discuss Both in This Class, and
FOCUS on analysis.
Analysis:
Synthesis:
Decompose Source into an
intermediate representation
Target program generation
from representation
Important Notes
 Today: There are many Software Tools for helping with
the Analysis Part. This Wasn’t the Case in Early Days.
(some) analysis is also important in:
 Structure / Syntax directed editors: Force
“syntactically” correct code to be entered
 Pretty Printers: Standardized version for program
structure (i.e., blank space, indenting, etc.)
 Static Checkers: A “quick” compilation to detect
rudimentary errors
 Interpreters: “real” time execution of code a “line-at-a-
time”
Important Notes
 Compilation Is Not Limited to Programming Language
Applications
 Text Formatters
 LATEX & TROFF Are Languages Whose Commands
Format Text
 Silicon Compilers
 Textual / Graphical: Take Input and Generate Circuit Design
 Database Query Processors
 Database Query Languages Are Also a Programming Language
 Input is compiled Into a Set of Operations for Accessing the
Database
Overview and History (1)
 Cause
 Software for early computers was written in assembly language
 The benefits of reusing software on different CPUs started to
become significantly greater than the cost of writing a compiler
 The first real compiler
 FORTRAN compilers of the late 1950s
 18 person-years to build
10
Overview and History (2)
11
 Compiler technology
 is more broadly applicable and has been employed in
rather unexpected areas.
 Text-formatting languages,
like nroff and troff; preprocessor packages like eqn, tbl, pic
 Silicon compiler for the creation of VLSI circuits
 Command languages of OS
 Query languages of Database systems
What Do Compilers Do (1)
12
 A compiler acts as a translator,
transforming human-oriented programming languages
into computer-oriented machine languages.
 Ignore machine-dependent details for programmer
Programming
Language
(Source)
Compiler
Machine
Language
(Target)
What Do Compilers Do (2)
 Compilers may generate three types of code:
 Pure Machine Code
 Machine instruction set without assuming the existence of any
operating system or library.
 Mostly being OS or embedded applications.
 Augmented Machine Code
 Code with OS routines and runtime support routines.
 More often
 Virtual Machine Code
 Virtual instructions, can be run on any architecture with a virtual
machine interpreter or a just-in-time compiler
 Ex. Java
13
What Do Compilers Do (3)
 Another way that compilers
differ from one another is in the format of the target
machine code they generate:
 Assembly or other source format
 Relocatable binary
 Relative address
 A linkage step is required
 Absolute binary
 Absolute address
 Can be executed directly
14
15
 Any compiler must perform two major tasks
 Analysis of the source program
 Synthesis of a machine-language program
The Structure of a Compiler (1)
Compiler
Analysis Synthesis
Video
1. Introduction to Compiler.
Questions..
1. Define Compiler?
Homework..
1. What is Analysis and synthesis?

Contenu connexe

Tendances

La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
Cma Mohd
 
Compiler.design.in.c.docs
Compiler.design.in.c.docsCompiler.design.in.c.docs
Compiler.design.in.c.docs
Abid Syed
 

Tendances (19)

compiler and their types
compiler and their typescompiler and their types
compiler and their types
 
Compiler Design Quiz
Compiler Design QuizCompiler Design Quiz
Compiler Design Quiz
 
How a Compiler Works ?
How a Compiler Works ?How a Compiler Works ?
How a Compiler Works ?
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Language translator
Language translatorLanguage translator
Language translator
 
Compiler
Compiler Compiler
Compiler
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
2 c++ programming languages
2 c++   programming languages2 c++   programming languages
2 c++ programming languages
 
Compilation v. interpretation
Compilation v. interpretationCompilation v. interpretation
Compilation v. interpretation
 
Compiler type
Compiler typeCompiler type
Compiler type
 
basics of compiler design
basics of compiler designbasics of compiler design
basics of compiler design
 
COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis: COMPILER DESIGN- Introduction & Lexical Analysis:
COMPILER DESIGN- Introduction & Lexical Analysis:
 
Assembler
AssemblerAssembler
Assembler
 
Compiler design
Compiler designCompiler design
Compiler design
 
df
dfdf
df
 
Compilers
CompilersCompilers
Compilers
 
Compiler design
Compiler designCompiler design
Compiler design
 
Compiler.design.in.c.docs
Compiler.design.in.c.docsCompiler.design.in.c.docs
Compiler.design.in.c.docs
 
Language Translator ( Compiler)
Language Translator ( Compiler)Language Translator ( Compiler)
Language Translator ( Compiler)
 

En vedette

Compiler Design
Compiler DesignCompiler Design
Compiler Design
Mir Majid
 

En vedette (17)

Lecture 1 introduction to language processors
Lecture 1  introduction to language processorsLecture 1  introduction to language processors
Lecture 1 introduction to language processors
 
Compiler Design - Introduction to Compiler
Compiler Design - Introduction to CompilerCompiler Design - Introduction to Compiler
Compiler Design - Introduction to Compiler
 
Lecture 10 semantic analysis 01
Lecture 10 semantic analysis 01Lecture 10 semantic analysis 01
Lecture 10 semantic analysis 01
 
Compiler Construction
Compiler ConstructionCompiler Construction
Compiler Construction
 
About Tokens and Lexemes
About Tokens and LexemesAbout Tokens and Lexemes
About Tokens and Lexemes
 
Lecture 02 lexical analysis
Lecture 02 lexical analysisLecture 02 lexical analysis
Lecture 02 lexical analysis
 
Compiler Design Tutorial
Compiler Design Tutorial Compiler Design Tutorial
Compiler Design Tutorial
 
Compiler Design Lecture Notes
Compiler Design Lecture NotesCompiler Design Lecture Notes
Compiler Design Lecture Notes
 
Introduction to Compiler Construction
Introduction to Compiler Construction Introduction to Compiler Construction
Introduction to Compiler Construction
 
Compiler Design Material
Compiler Design MaterialCompiler Design Material
Compiler Design Material
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Compiler Components and their Generators - Traditional Parsing Algorithms
Compiler Components and their Generators - Traditional Parsing AlgorithmsCompiler Components and their Generators - Traditional Parsing Algorithms
Compiler Components and their Generators - Traditional Parsing Algorithms
 
Compiler Design Lab File
Compiler Design Lab FileCompiler Design Lab File
Compiler Design Lab File
 
LL Parsing
LL ParsingLL Parsing
LL Parsing
 
Dataflow Analysis
Dataflow AnalysisDataflow Analysis
Dataflow Analysis
 

Similaire à Ss ui lecture 1

Chapter One
Chapter OneChapter One
Chapter One
bolovv
 

Similaire à Ss ui lecture 1 (20)

Cd unit i
Cd unit iCd unit i
Cd unit i
 
Lec 01 basic concepts
Lec 01 basic conceptsLec 01 basic concepts
Lec 01 basic concepts
 
Ch 1.pptx
Ch 1.pptxCh 1.pptx
Ch 1.pptx
 
Chapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdfChapter1pdf__2021_11_23_10_53_20.pdf
Chapter1pdf__2021_11_23_10_53_20.pdf
 
Compiler Construction introduction
Compiler Construction introductionCompiler Construction introduction
Compiler Construction introduction
 
Chapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptxChapter 2 Program language translation.pptx
Chapter 2 Program language translation.pptx
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
WEBSITE DEVELOPMENT
WEBSITE DEVELOPMENTWEBSITE DEVELOPMENT
WEBSITE DEVELOPMENT
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introduction
 
CD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptxCD - CH1 - Introduction to compiler design.pptx
CD - CH1 - Introduction to compiler design.pptx
 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilers
 
Chap01-Intro.ppt
Chap01-Intro.pptChap01-Intro.ppt
Chap01-Intro.ppt
 
Chapter#01 cc
Chapter#01 ccChapter#01 cc
Chapter#01 cc
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
unit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdfunit1pdf__2021_12_14_12_37_34.pdf
unit1pdf__2021_12_14_12_37_34.pdf
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 
Chapter One
Chapter OneChapter One
Chapter One
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 

Plus de Avinash Kapse (9)

Presentation1
Presentation1Presentation1
Presentation1
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Presentation1
Presentation1Presentation1
Presentation1
 
SS UII Lecture 1
SS UII Lecture 1SS UII Lecture 1
SS UII Lecture 1
 
SS UI Lecture 5
SS UI Lecture 5SS UI Lecture 5
SS UI Lecture 5
 
SS UI Lecture 6
SS UI Lecture 6SS UI Lecture 6
SS UI Lecture 6
 
SS UI Lecture 4
SS UI Lecture 4SS UI Lecture 4
SS UI Lecture 4
 
SS UI Lecture 1
SS UI Lecture 1SS UI Lecture 1
SS UI Lecture 1
 
Ss ui lecture 2
Ss ui lecture 2Ss ui lecture 2
Ss ui lecture 2
 

Dernier

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 

Dernier (20)

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 

Ss ui lecture 1

  • 1. System Software (5KS03) Unit 1 : Introduction to Compiling Lecture : 1 Introduction to Compiling: Phases of a compiler, A S Kapse, Assistant Professor, Department Of Computer Sci. & Engineering Anuradha Engineering College, Chikhli
  • 3. Objectives…  Upon completion of this lecture, you will be able  To understand the basics Compiler  To understand analysis and synthesis.  To understand use and purpose of compiler
  • 4. Review…./ Concepts  What do you mean by Software?  What do you mean by Operating System?  What do you mean by system?  What do you mean by compiler?
  • 5. Introduction to Compilers  As a Discipline, Involves Multiple CS&E Areas  Programming Languages and Algorithms  Theory of Computing & Software Engineering  Computer Architecture & Operating Systems  Has Deceivingly Simplistic Intent: Compiler Source program Target Program Error messages Diverse & Varied
  • 6. Classifications of Compilers  Compilers Viewed from Many Perspectives  However, All utilize same basic tasks to accomplish their actions Single Pass Multiple Pass Load & Go Construction Debugging Optimizing Functional
  • 7. The Model  The TWO Fundamental Parts:  We Will Discuss Both in This Class, and FOCUS on analysis. Analysis: Synthesis: Decompose Source into an intermediate representation Target program generation from representation
  • 8. Important Notes  Today: There are many Software Tools for helping with the Analysis Part. This Wasn’t the Case in Early Days. (some) analysis is also important in:  Structure / Syntax directed editors: Force “syntactically” correct code to be entered  Pretty Printers: Standardized version for program structure (i.e., blank space, indenting, etc.)  Static Checkers: A “quick” compilation to detect rudimentary errors  Interpreters: “real” time execution of code a “line-at-a- time”
  • 9. Important Notes  Compilation Is Not Limited to Programming Language Applications  Text Formatters  LATEX & TROFF Are Languages Whose Commands Format Text  Silicon Compilers  Textual / Graphical: Take Input and Generate Circuit Design  Database Query Processors  Database Query Languages Are Also a Programming Language  Input is compiled Into a Set of Operations for Accessing the Database
  • 10. Overview and History (1)  Cause  Software for early computers was written in assembly language  The benefits of reusing software on different CPUs started to become significantly greater than the cost of writing a compiler  The first real compiler  FORTRAN compilers of the late 1950s  18 person-years to build 10
  • 11. Overview and History (2) 11  Compiler technology  is more broadly applicable and has been employed in rather unexpected areas.  Text-formatting languages, like nroff and troff; preprocessor packages like eqn, tbl, pic  Silicon compiler for the creation of VLSI circuits  Command languages of OS  Query languages of Database systems
  • 12. What Do Compilers Do (1) 12  A compiler acts as a translator, transforming human-oriented programming languages into computer-oriented machine languages.  Ignore machine-dependent details for programmer Programming Language (Source) Compiler Machine Language (Target)
  • 13. What Do Compilers Do (2)  Compilers may generate three types of code:  Pure Machine Code  Machine instruction set without assuming the existence of any operating system or library.  Mostly being OS or embedded applications.  Augmented Machine Code  Code with OS routines and runtime support routines.  More often  Virtual Machine Code  Virtual instructions, can be run on any architecture with a virtual machine interpreter or a just-in-time compiler  Ex. Java 13
  • 14. What Do Compilers Do (3)  Another way that compilers differ from one another is in the format of the target machine code they generate:  Assembly or other source format  Relocatable binary  Relative address  A linkage step is required  Absolute binary  Absolute address  Can be executed directly 14
  • 15. 15  Any compiler must perform two major tasks  Analysis of the source program  Synthesis of a machine-language program The Structure of a Compiler (1) Compiler Analysis Synthesis
  • 18. Homework.. 1. What is Analysis and synthesis?