SlideShare a Scribd company logo
1 of 40
Download to read offline
Introduction to System
Software
Systemsoftwareis thebackboneof a computer,responsibleformanaging
hardwareresourcesandprovidinga platformforrunningapplications.In this
presentation,we'llexplorethefunctions,types,andimportanceof system
softwarein moderncomputing.
SP by SwapnaliPawar
Language Processor
SWAPNALI R PAWAR
SWAPNALI R.PAWAR~(RIT) 2
Agenda
▪ About Language processor
▪ Language processor Definition
▪ Complier and Interpreter
▪ Comparison between Compiler and Interpreter
SWAPNALI R.PAWAR~(RIT) 3
Language processor
• The manner in which a software designer describes the ideas concerning the behaviour
of the software.
• The designer expresses these ideas in the application domain.
• These ideas are actually implemented in the execution domain
• The gap between the application domain and execution domain is called semantic gap.
Execution domain
Application domain
Fig 1 Semantic gap
Semantic gap
SWAPNALI R.PAWAR~(RIT) 4
Language processor
• The semantic gap has many difficulties, some of the important ones
being large development time and efforts, and poor quality of
software.
• These issues are tackled through the use of (PL) Software
implementation using PL introduces new domain as PL domain.
• The semantic gap is bridged by the software engineering steps, that
are specification. design and coding.
• Bridges gap between application domain and PL domain known as
specification gap.
• Bridges the gap between PL domain and execution domain as
execution gap.
SWAPNALI R.PAWAR~(RIT) 5
Language processor
• The specification gap is bridge by the software development team.
• Execution gap is bridged by the designer of the programming language processor. Like
compiler or interpreter.
• Specification gap is semantic gap between two specification of the sametask.
• Execution gap is gap between semantics of programs (same task but different PL).
Fig.Specification and Execution gap
Application domain PL. Domain Execution domain
Execution gap
Specification Gap
SWAPNALI R.PAWAR~(RIT) 6
SWAPNALI R.PAWAR~(RIT) 7
Language processor Definition
It is software which bridges a specification or execution gap.
Activity performed by language processor called as Language Processing activities.
▪ Source program
▪ Target program
Arrange of LP is defined to meet practical requirements-
▪ ✓ Language translator - bridges an execution gap to the machine languagelike
assembler and compiler
▪ ✓ Detranslator - bridges the same as the language translator, but in thereverse
manner.
▪ ✓ Preprocessor - is a language processor which bridges an execution gap but
not translator.
▪ ✓ Language migrator - bridges specification gap between two PLs.
SWAPNALI R.PAWAR~(RIT) 8
Think & Write
1.The designer expresses the ideas in terms related to the........ of the software.
A. Application Domain
B. Execution Domain
C. PL Domain
D. Program Generator Domain
SWAPNALI R.PAWAR~(RIT) 9
Think and Write Ans:
A. Application Domain
SWAPNALI R.PAWAR~(RIT) 10
Complier and Interpreter Complier
Compiler:
It is a translator which takes input i.e. High-Level Language and produces an output of low-
level language i.e. machine or assembly language.
A compiler is more intelligent than an assembler it checks all kinds of limits, ranges, errors,
etc
Interpreter:
An interpreter is a program that translates a programming language into a comprehensible
language.
It translates only one statement of the program at a time.
SWAPNALI R.PAWAR~(RIT) 11
Advantages of Interpreter
•Programs written in an Interpreted language are easier to debug.
•Interpreters allow the management of memory automatically, which
reduces memory error risks.
•Interpreted Language is more flexible than a Compiled language.
Disadvantages of Interpreter
•The interpreter can run only the corresponding Interpreted program.
•Interpreted code runs slower in comparison to Compiled code.
Interpreter
SWAPNALI R.PAWAR~(RIT) 12
Advantages of Compiler
•Compiled code runs faster in comparison to Interpreted code.
•Compilers help in improving the security of Applications.
•As Compilers give Debugging tools, which help in fixing errors easily.
Disadvantages of Compiler
•The compiler can catch only syntax errors and some semantic errors.
•Compilation can take more time in the case of bulky code.
Compiler
SWAPNALI R.PAWAR~(RIT) 13
Comparison between Compiler & Interpreter
Interpreter Compiler
Translates program one statement at a
time.
Scans the entire program and translates it
as a whole into machine code.
Interpreters usually take less amount of
time to analyze the source code. However,
the overall execution time is comparatively
slower than compilers.
Compilers usually take a large amount of
time to analyze the source code. However,
the overall execution time is comparatively
faster than interpreters.
No Object Code is generated, hence are
memory efficient.
Generates Object Code which further
requires linking, hence requires more
memory.
Programming languages like JavaScript,
Python, Ruby use interpreters.
Programming languages like C, C++, Java
use compilers.
SWAPNALI R.PAWAR~(RIT) 14
SWAPNALI R.PAWAR~(RIT) 15
Language Processing Activities
A.Program generation activities
B.Program execution activities
1.Program Translation
2.Program Interpretation
SWAPNALI R.PAWAR~(RIT) 16
Language processing activity
The language processing activities divided into two parts, that
bridges the specification gap and execution gap.
1.Program generation activities
2.Program execution activities
Program generation activities:
Aims to generation of a program. Source is the application domain
and target is the PL domain. It bridges specification gap.
Program execution activities:
Aims to execute a program written in PL source is PL. domain and
target is execution domain.It bridges execution gap.
SWAPNALI R.PAWAR~(RIT) 17
Program generation Activity
• The program generator is a software system which accepts the specification
of a program to be generated and generates program in a the target
PL.Domain.
• This activity is done by program generator domain.
Errors
Program
Specification
Program
Generator
Program in Target
PL.
Fig-Program generation Activity
SWAPNALI R.PAWAR~(RIT) 18
SWAPNALI R.PAWAR~(RIT) 19
Program Execution activities
Two popular models for program execution are:
1.Program Translation
2.Program Interpretation
The program translation model bridges the execution gap by translating a program written in a
PL called source program(SP), into an equivalent program in the machine language called
target program(TP). Errors
Program
Specification
Translator
M/C
Language
Program
Target
Program
Fig .Program Translation
SWAPNALI R.PAWAR~(RIT) 20
Program Translation activities
Characteristics of the program translation model are:
1. A program must be translated before it can be executed.
2. The translated program may be saved in file. The saved program
may be executed repeatedly.
3. A program must be retranslated following modifications.
4. It reads the source program and stores it in its memory.
SWAPNALI R.PAWAR~(RIT) 21
Program Translation:
During interpretation it takes a source statement, determines its
meaning, and performs actions like computation and I/O which
implement it.
SWAPNALI R.PAWAR~(RIT) 22
Program Interpretation activities
In the program interpretation the CPU use a program counter(PC) to note
the address of the next instruction to be executed.
This instruction is subjected to the instruction execution cycle consisting
following step:
1. Fetch the instruction
2. Decode the instruction to determine the operation to be performed.
3. Execute the instruction.
SWAPNALI R.PAWAR~(RIT) 23
Program Interpretation activities
• At the end of the cycle. The PC is updated and the cycle is repeated for
next instruction.
• Thus, the PC can indicate which statement of the source program is to
interpreted next.
SWAPNALI R.PAWAR~(RIT) 24
Think and Write
1.______________is a software system which generates a program in the target PL.
A. Program Generator
B. Program Specification
C. Program Execution
D. program Interpretation
2.The CPU use_____________ to note the address of the next instruction to be executed.
A. program counter(PC)
B. Pretty printer
C. static checker
D. None of these
SWAPNALI R.PAWAR~(RIT) 25
Think and Write
1.Program Generator
1.Program counter(PC)
SWAPNALI R.PAWAR~(RIT) 26
Advantage and disadvantage of interpreter
Advantage of interpreter:
is that it is executed line by line which helps users to find errors easily
Disadvantage of interpreter
is that it takes more time to execute successfully than compiler.
SWAPNALI R.PAWAR~(RIT) 27
Fundamentals of Language
Processing
SWAPNALI R.PAWAR~(RIT) 28
Language processing Language processing
Analysis of source program + Synthesis of target program
• The collection of language processor components engaged in the analysis of source
program constitutes analysis phase of a language processor.
• Components engaged in synthesizing a target program constitutes synthesis phase of a
language processor.
• The specification of source language forms the basis of source program analysis
• The specification consists of three components.
• Lexical rules:
• Syntax rules:
• Semantic rules:
SWAPNALI R.PAWAR~(RIT) 29
Language processing
The specification consists of three components-
Lexical rules: These govern the formation of valid lexical units in
the source program.
Syntax rules: These govern the formation of valid statements in
source language,
A Semantic rules: These associate meaning with valid statements
of thelanguage.
SWAPNALI R.PAWAR~(RIT) 30
Language processing
• The specification consists of three components.
• The analysis phase uses each component of source language specification to
determine the relevant information concerning the statement in the source
program.
• Thus the analysis of source program consists of lexical, syntax and semantic
analysis.
• The synthesis phase is concerned with the construction of target language
statements which have same meaning as source statements.
• This consists of two main activities:
1. Creation of data structures in the target program.
2. Generation of target code
SWAPNALI R.PAWAR~(RIT) 31
SWAPNALI R.PAWAR~(RIT) 32
SWAPNALI R.PAWAR~(RIT) 33
SWAPNALI R.PAWAR~(RIT) 34
SWAPNALI R.PAWAR~(RIT) 35
SWAPNALI R.PAWAR~(RIT) 36
Think and Write
What is language processing pass? Illustrate.
SWAPNALI R.PAWAR~(RIT) 37
Think and Write
Language processing pass is the processing of every statement in a
source program, or its equivalent representation, to perform a set of
language processing function.
✔ For example, for a two pass translator, following activities are carried
out in two passes:
✓ Pass 1:
It performs analysis of source program and note relevant information.
✓ Pass 2:
Performs Synthesis of Target Program
SWAPNALI R.PAWAR~(RIT) 38
SP
Thank You !
SWAPNALI R.PAWAR~(RIT) 40

More Related Content

Similar to 4.LanguageProcessors and language Processing Activities.pdf

Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to CompilersAkhil Kaushik
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)Maliha Jahan
 
system software and application software, compiler, interpreter & assembler
system software  and application software, compiler, interpreter & assemblersystem software  and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assemblerchetan birla
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilersAftab Ahmad
 
Language processors
Language processorsLanguage processors
Language processorsYash Bansal
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Shivang Bajaniya
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1Manoj Patil
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresNisarg Amin
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxAsst.prof M.Gokilavani
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptxAshenafiGirma5
 
Cd ch1 - introduction
Cd   ch1 - introductionCd   ch1 - introduction
Cd ch1 - introductionmengistu23
 
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.pptxZiyadMohammed17
 
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.pdfDrIsikoIsaac
 

Similar to 4.LanguageProcessors and language Processing Activities.pdf (20)

Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Introduction of C Programming
Introduction of C ProgrammingIntroduction of C Programming
Introduction of C Programming
 
High Level Language (HLL)
High Level Language (HLL)High Level Language (HLL)
High Level Language (HLL)
 
system software and application software, compiler, interpreter & assembler
system software  and application software, compiler, interpreter & assemblersystem software  and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Lecture1 compilers
Lecture1 compilersLecture1 compilers
Lecture1 compilers
 
Language processors
Language processorsLanguage processors
Language processors
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
 
C programming
C programmingC programming
C programming
 
System Programing Unit 1
System Programing Unit 1System Programing Unit 1
System Programing Unit 1
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptx
 
Computer
ComputerComputer
Computer
 
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
 
C.pdf
C.pdfC.pdf
C.pdf
 
Lect-01.ppt
Lect-01.pptLect-01.ppt
Lect-01.ppt
 
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
 

More from SwapnaliPawar27

10.Design Of Two Pass Assembler in system software.pdf
10.Design Of Two Pass Assembler in system software.pdf10.Design Of Two Pass Assembler in system software.pdf
10.Design Of Two Pass Assembler in system software.pdfSwapnaliPawar27
 
9.SimpleAssemblyScheme in system software.pdf
9.SimpleAssemblyScheme in system software.pdf9.SimpleAssemblyScheme in system software.pdf
9.SimpleAssemblyScheme in system software.pdfSwapnaliPawar27
 
8.PassStructureofAssembler in System Software.pdf
8.PassStructureofAssembler in System Software.pdf8.PassStructureofAssembler in System Software.pdf
8.PassStructureofAssembler in System Software.pdfSwapnaliPawar27
 
7.IntermediateCode in System Software.pdf
7.IntermediateCode in System Software.pdf7.IntermediateCode in System Software.pdf
7.IntermediateCode in System Software.pdfSwapnaliPawar27
 
6.Assembly Language Statments in system Software.pdf
6.Assembly Language Statments in system Software.pdf6.Assembly Language Statments in system Software.pdf
6.Assembly Language Statments in system Software.pdfSwapnaliPawar27
 
5.Elements of Assembly Language in System Software.pdf
5.Elements of Assembly Language in System Software.pdf5.Elements of Assembly Language in System Software.pdf
5.Elements of Assembly Language in System Software.pdfSwapnaliPawar27
 
3.SystemPrograms and System Programming.pdf
3.SystemPrograms and System Programming.pdf3.SystemPrograms and System Programming.pdf
3.SystemPrograms and System Programming.pdfSwapnaliPawar27
 
2.Exploring-the-Goals-and-Programs-of-System-Software.pdf
2.Exploring-the-Goals-and-Programs-of-System-Software.pdf2.Exploring-the-Goals-and-Programs-of-System-Software.pdf
2.Exploring-the-Goals-and-Programs-of-System-Software.pdfSwapnaliPawar27
 
Inroduction System Software -features Types
Inroduction System Software -features TypesInroduction System Software -features Types
Inroduction System Software -features TypesSwapnaliPawar27
 

More from SwapnaliPawar27 (13)

10.Design Of Two Pass Assembler in system software.pdf
10.Design Of Two Pass Assembler in system software.pdf10.Design Of Two Pass Assembler in system software.pdf
10.Design Of Two Pass Assembler in system software.pdf
 
9.SimpleAssemblyScheme in system software.pdf
9.SimpleAssemblyScheme in system software.pdf9.SimpleAssemblyScheme in system software.pdf
9.SimpleAssemblyScheme in system software.pdf
 
8.PassStructureofAssembler in System Software.pdf
8.PassStructureofAssembler in System Software.pdf8.PassStructureofAssembler in System Software.pdf
8.PassStructureofAssembler in System Software.pdf
 
7.IntermediateCode in System Software.pdf
7.IntermediateCode in System Software.pdf7.IntermediateCode in System Software.pdf
7.IntermediateCode in System Software.pdf
 
6.Assembly Language Statments in system Software.pdf
6.Assembly Language Statments in system Software.pdf6.Assembly Language Statments in system Software.pdf
6.Assembly Language Statments in system Software.pdf
 
5.Elements of Assembly Language in System Software.pdf
5.Elements of Assembly Language in System Software.pdf5.Elements of Assembly Language in System Software.pdf
5.Elements of Assembly Language in System Software.pdf
 
3.SystemPrograms and System Programming.pdf
3.SystemPrograms and System Programming.pdf3.SystemPrograms and System Programming.pdf
3.SystemPrograms and System Programming.pdf
 
2.Exploring-the-Goals-and-Programs-of-System-Software.pdf
2.Exploring-the-Goals-and-Programs-of-System-Software.pdf2.Exploring-the-Goals-and-Programs-of-System-Software.pdf
2.Exploring-the-Goals-and-Programs-of-System-Software.pdf
 
Inroduction System Software -features Types
Inroduction System Software -features TypesInroduction System Software -features Types
Inroduction System Software -features Types
 
2.dfa.pdf
2.dfa.pdf2.dfa.pdf
2.dfa.pdf
 
1.AutomataU1.pdf
1.AutomataU1.pdf1.AutomataU1.pdf
1.AutomataU1.pdf
 
Pointer.pptx
Pointer.pptxPointer.pptx
Pointer.pptx
 
Array.pptx
Array.pptxArray.pptx
Array.pptx
 

Recently uploaded

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

Recently uploaded (20)

Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

4.LanguageProcessors and language Processing Activities.pdf

  • 1. Introduction to System Software Systemsoftwareis thebackboneof a computer,responsibleformanaging hardwareresourcesandprovidinga platformforrunningapplications.In this presentation,we'llexplorethefunctions,types,andimportanceof system softwarein moderncomputing. SP by SwapnaliPawar
  • 2. Language Processor SWAPNALI R PAWAR SWAPNALI R.PAWAR~(RIT) 2
  • 3. Agenda ▪ About Language processor ▪ Language processor Definition ▪ Complier and Interpreter ▪ Comparison between Compiler and Interpreter SWAPNALI R.PAWAR~(RIT) 3
  • 4. Language processor • The manner in which a software designer describes the ideas concerning the behaviour of the software. • The designer expresses these ideas in the application domain. • These ideas are actually implemented in the execution domain • The gap between the application domain and execution domain is called semantic gap. Execution domain Application domain Fig 1 Semantic gap Semantic gap SWAPNALI R.PAWAR~(RIT) 4
  • 5. Language processor • The semantic gap has many difficulties, some of the important ones being large development time and efforts, and poor quality of software. • These issues are tackled through the use of (PL) Software implementation using PL introduces new domain as PL domain. • The semantic gap is bridged by the software engineering steps, that are specification. design and coding. • Bridges gap between application domain and PL domain known as specification gap. • Bridges the gap between PL domain and execution domain as execution gap. SWAPNALI R.PAWAR~(RIT) 5
  • 6. Language processor • The specification gap is bridge by the software development team. • Execution gap is bridged by the designer of the programming language processor. Like compiler or interpreter. • Specification gap is semantic gap between two specification of the sametask. • Execution gap is gap between semantics of programs (same task but different PL). Fig.Specification and Execution gap Application domain PL. Domain Execution domain Execution gap Specification Gap SWAPNALI R.PAWAR~(RIT) 6
  • 8. Language processor Definition It is software which bridges a specification or execution gap. Activity performed by language processor called as Language Processing activities. ▪ Source program ▪ Target program Arrange of LP is defined to meet practical requirements- ▪ ✓ Language translator - bridges an execution gap to the machine languagelike assembler and compiler ▪ ✓ Detranslator - bridges the same as the language translator, but in thereverse manner. ▪ ✓ Preprocessor - is a language processor which bridges an execution gap but not translator. ▪ ✓ Language migrator - bridges specification gap between two PLs. SWAPNALI R.PAWAR~(RIT) 8
  • 9. Think & Write 1.The designer expresses the ideas in terms related to the........ of the software. A. Application Domain B. Execution Domain C. PL Domain D. Program Generator Domain SWAPNALI R.PAWAR~(RIT) 9
  • 10. Think and Write Ans: A. Application Domain SWAPNALI R.PAWAR~(RIT) 10
  • 11. Complier and Interpreter Complier Compiler: It is a translator which takes input i.e. High-Level Language and produces an output of low- level language i.e. machine or assembly language. A compiler is more intelligent than an assembler it checks all kinds of limits, ranges, errors, etc Interpreter: An interpreter is a program that translates a programming language into a comprehensible language. It translates only one statement of the program at a time. SWAPNALI R.PAWAR~(RIT) 11
  • 12. Advantages of Interpreter •Programs written in an Interpreted language are easier to debug. •Interpreters allow the management of memory automatically, which reduces memory error risks. •Interpreted Language is more flexible than a Compiled language. Disadvantages of Interpreter •The interpreter can run only the corresponding Interpreted program. •Interpreted code runs slower in comparison to Compiled code. Interpreter SWAPNALI R.PAWAR~(RIT) 12
  • 13. Advantages of Compiler •Compiled code runs faster in comparison to Interpreted code. •Compilers help in improving the security of Applications. •As Compilers give Debugging tools, which help in fixing errors easily. Disadvantages of Compiler •The compiler can catch only syntax errors and some semantic errors. •Compilation can take more time in the case of bulky code. Compiler SWAPNALI R.PAWAR~(RIT) 13
  • 14. Comparison between Compiler & Interpreter Interpreter Compiler Translates program one statement at a time. Scans the entire program and translates it as a whole into machine code. Interpreters usually take less amount of time to analyze the source code. However, the overall execution time is comparatively slower than compilers. Compilers usually take a large amount of time to analyze the source code. However, the overall execution time is comparatively faster than interpreters. No Object Code is generated, hence are memory efficient. Generates Object Code which further requires linking, hence requires more memory. Programming languages like JavaScript, Python, Ruby use interpreters. Programming languages like C, C++, Java use compilers. SWAPNALI R.PAWAR~(RIT) 14
  • 16. Language Processing Activities A.Program generation activities B.Program execution activities 1.Program Translation 2.Program Interpretation SWAPNALI R.PAWAR~(RIT) 16
  • 17. Language processing activity The language processing activities divided into two parts, that bridges the specification gap and execution gap. 1.Program generation activities 2.Program execution activities Program generation activities: Aims to generation of a program. Source is the application domain and target is the PL domain. It bridges specification gap. Program execution activities: Aims to execute a program written in PL source is PL. domain and target is execution domain.It bridges execution gap. SWAPNALI R.PAWAR~(RIT) 17
  • 18. Program generation Activity • The program generator is a software system which accepts the specification of a program to be generated and generates program in a the target PL.Domain. • This activity is done by program generator domain. Errors Program Specification Program Generator Program in Target PL. Fig-Program generation Activity SWAPNALI R.PAWAR~(RIT) 18
  • 20. Program Execution activities Two popular models for program execution are: 1.Program Translation 2.Program Interpretation The program translation model bridges the execution gap by translating a program written in a PL called source program(SP), into an equivalent program in the machine language called target program(TP). Errors Program Specification Translator M/C Language Program Target Program Fig .Program Translation SWAPNALI R.PAWAR~(RIT) 20
  • 21. Program Translation activities Characteristics of the program translation model are: 1. A program must be translated before it can be executed. 2. The translated program may be saved in file. The saved program may be executed repeatedly. 3. A program must be retranslated following modifications. 4. It reads the source program and stores it in its memory. SWAPNALI R.PAWAR~(RIT) 21
  • 22. Program Translation: During interpretation it takes a source statement, determines its meaning, and performs actions like computation and I/O which implement it. SWAPNALI R.PAWAR~(RIT) 22
  • 23. Program Interpretation activities In the program interpretation the CPU use a program counter(PC) to note the address of the next instruction to be executed. This instruction is subjected to the instruction execution cycle consisting following step: 1. Fetch the instruction 2. Decode the instruction to determine the operation to be performed. 3. Execute the instruction. SWAPNALI R.PAWAR~(RIT) 23
  • 24. Program Interpretation activities • At the end of the cycle. The PC is updated and the cycle is repeated for next instruction. • Thus, the PC can indicate which statement of the source program is to interpreted next. SWAPNALI R.PAWAR~(RIT) 24
  • 25. Think and Write 1.______________is a software system which generates a program in the target PL. A. Program Generator B. Program Specification C. Program Execution D. program Interpretation 2.The CPU use_____________ to note the address of the next instruction to be executed. A. program counter(PC) B. Pretty printer C. static checker D. None of these SWAPNALI R.PAWAR~(RIT) 25
  • 26. Think and Write 1.Program Generator 1.Program counter(PC) SWAPNALI R.PAWAR~(RIT) 26
  • 27. Advantage and disadvantage of interpreter Advantage of interpreter: is that it is executed line by line which helps users to find errors easily Disadvantage of interpreter is that it takes more time to execute successfully than compiler. SWAPNALI R.PAWAR~(RIT) 27
  • 29. Language processing Language processing Analysis of source program + Synthesis of target program • The collection of language processor components engaged in the analysis of source program constitutes analysis phase of a language processor. • Components engaged in synthesizing a target program constitutes synthesis phase of a language processor. • The specification of source language forms the basis of source program analysis • The specification consists of three components. • Lexical rules: • Syntax rules: • Semantic rules: SWAPNALI R.PAWAR~(RIT) 29
  • 30. Language processing The specification consists of three components- Lexical rules: These govern the formation of valid lexical units in the source program. Syntax rules: These govern the formation of valid statements in source language, A Semantic rules: These associate meaning with valid statements of thelanguage. SWAPNALI R.PAWAR~(RIT) 30
  • 31. Language processing • The specification consists of three components. • The analysis phase uses each component of source language specification to determine the relevant information concerning the statement in the source program. • Thus the analysis of source program consists of lexical, syntax and semantic analysis. • The synthesis phase is concerned with the construction of target language statements which have same meaning as source statements. • This consists of two main activities: 1. Creation of data structures in the target program. 2. Generation of target code SWAPNALI R.PAWAR~(RIT) 31
  • 37. Think and Write What is language processing pass? Illustrate. SWAPNALI R.PAWAR~(RIT) 37
  • 38. Think and Write Language processing pass is the processing of every statement in a source program, or its equivalent representation, to perform a set of language processing function. ✔ For example, for a two pass translator, following activities are carried out in two passes: ✓ Pass 1: It performs analysis of source program and note relevant information. ✓ Pass 2: Performs Synthesis of Target Program SWAPNALI R.PAWAR~(RIT) 38