Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Department of Computer Science and Engineering

School of Technology

T. Y. B. Tech
Course - Compiler Design (CST305R1)
Unit No – 1 – Introduction To Compiler
[ U1 – L2]
Course Coordinator – Ms. Sujata A. Pardeshi,
Assistant Professor, CSE, SOT.
Points to be cover

■ Language Processor
■ Compiler
– Language Pre-processing Softwares / Cosines of the
Compiler
– Definition
– Execution of C program
– Understanding of the session - Quiz

6/22/2020 CSE, SOT, SGU 2


Introduction - Language Processors
6. Tacking of Issues
5. Semantic Gap / Issues 1. Software Engineering
1. Large Development Time Methodologies
2. Large Development Efforts 2. Effective use of
3. Poor Quality of Software Programming languages.

4. Semantic Gap – Difference 7. Formation of Groups


Application between two domains Execution A. Specification, design
Domain of Domain and coding steps
B. PL Implementation
Software 3. Rules of both the domain defined Steps
as Semantic of the domain

1. Expressing of the ideas by 2. The interpretation and PL


implementation of the ideas
the software designer Domain
6/22/2020 CSE, SOT, SGU 3
Introduction - Language Processors
6. Tacking of Issues
5. Semantic Gap / Issues 1. Software Engineering
1. Large Development Time Methodologies
2. Large Development Efforts 2. Effective use of
3. Poor Quality of Software Programming languages.

4. Semantic Gap – Difference 7. Formation of Groups


Application between two domains Execution A. Specification, design
Domain of Domain and coding steps
B. PL Implementation
Software 3. Rules of both the domain defined Steps
as Semantic of the domain

1. Expressing of the ideas by 2. The interpretation and PL


implementation of the ideas
the software designer Domain
6/22/2020 CSE, SOT, SGU 4
Definitions
■ Semantic Gap - Used to represent the difference between the
semantics of two domains.
■ Specification Gap – It is the semantic gap between two specifications
of the same task.
■ Execution Gap – It is the gap between the semantics of the two
programs performing the same task written in different programming
languages.

6/22/2020 CSE, SOT, SGU 5


Bridged by Software Bridged By Language
Development People Translator Softwares

1.1. Specification Gap 2. Execution Gap

Application 1. Semantic Gap


Domain of Execution
Software PL Domain
Domain
1. Specification Language 2. Specification Language 3. Specification Language
(SL) – Software (SL) – HLL Tools and (SL) – Machine Language
Requirement Analysis, DFD, Technologies
Flow Chart, design, etc.

6/22/2020 CSE, SOT, SGU 6


Language Processing Softwares

1. Language Processing 1. Language Translators


Softwares Softwares

Source Target 2. Execution Gap


Program Program
Execution
PL Domain
Domain

6/22/2020 CSE, SOT, SGU 7


Language Translator Softwares
Types Use

Preprocessor Bridges the execution gap but it is


not a language translator software

Compilers Bridges the executing gap by


generating the machine language
program
Interpreters Bridges the executing gap without
generating the machine language
program
Assembler Bridges the executing gap by
generating the intermediate code

6/22/2020 CSE, SOT, SGU 8


Execution of a C / C++ Program

6/22/2020 CSE, SOT, SGU 9


Conclusion
■ Step 1 – Program Generation
■ Step 2 – Program Execution
– 2.1 – Program Translation
– 2.2 – Program Interpretation

– Fundamentals of Language Processing – Basics of Compiler


– Language processing =
Analysis of source program + Synthesis of a target program

6/22/2020 CSE, SOT, SGU 10


Program Specification
Program
Target Program
Source Program Generator
(Software system accepts
source program)

Program Translation
Source Program Input

Compiler Target Program

Target Program Output

6/22/2020 CSE, SOT, SGU 11


Program Interpretation

Source Program Interpreter


1. Reads source program Output
Input 2. Stores in memory
3. Decode source statements
4. Perform required memory
operation

6/22/2020 CSE, SOT, SGU 12


Thank You

6/22/2020 CSE, SOT, SGU 13

You might also like