SlideShare a Scribd company logo
1
Textbooks and Class Materials
 Compilers: Principles, Techniques and Tools,
Alfred v.Aho, Ravi Sethi , Jeffrey D.Ullman.
 Compiler Construction principles and Practice,
Kenneth G.Louden
 Compiler Design
O.G.Kakde
 Introduction to computer theory(second Edition)
Daniel I.A.Cohen
2
Answer These Questions
 What is compiler ?
 Why we need compiler?
 What are the high or low level languages?
 Difference b/w them.
3
Answer These Questions (cont’d)
 Difference b/w Assembly and Machine
language.
 What is the language of computer ?
 Why we feel easy in high level language ?
4
What is compiler ?
A compiler is a program that reads a program
written in one language (i.e source program)
And translates it into equivalent program in another
Language(i.e the target language).
Compiler
Source program Target Program
5
 The compiler reports to its user the presence of
errors in the source program.
Compiler
Source program Target Program
Error Messages
6
Different Terminology
 Compiler are sometimes classified as SINGLE
PASS,MULTI PASS ,DEBUGGING depending
on how they have been constructed or on what
function they are supposed to perform.Despite
the apparent complexity, the basic functions
that any compiler must perform are essentially
the same.
7
Decompiler
“A program that translates from low level to
higher level one is a decompiler ”
It can be used for the recovery of lost source
code,and is also useful in some cases for error
correction.In case if the vendor of a software
lose its source code ,they can use a
decompiler to recover the source code from the
executable.
8
Decompiler (cont’d)
If some error creeps in the executable of a
software ,it can be decompiled to make
corrections.Example of decompiler is:
JAD- the fast java decompiler –jad is a 100%
pure c++ program and claims to be several
times faster than decompilers written in
java.Jad is free for non-commercial use,but
since the version 1.5.6 it’s no longer free for
commercial use.
9
The Ethics of Decompilation
 Is decompilation legal, and is it allowed?
There are many situations when decompilation can be
used...
1) To recover lost source code. You may have written a
program for which you only have the executable now
(or you got the exe of a program you wrote long back,
from someone else!). If you want to have the source for
such a program, you can use decompilation to recover
it. In all rights, you are the owner of the program, so
nobody is going to question you.
10
The Ethics of Decompilation(cont’d)
2) Just as stated above, applications written long
back for a computer may not have the source
code now, and you may need to port it to a
new platform. Either you have to rewrite the
application from the scratch, or use
decompilation to understand the working of
the application and write it again.
11
The Ethics of Decompilation(cont’d)
3) Say you have code written in some language
for which you cant find a compiler today! If
you have the executable, just decompile it
and rewrite the logic in the language of your
choice today
12
The Ethics of Decompilation(cont’d)
4) To discover the internals of someone else's
program (like what algorithm they have
used...)
13
Language Translator
 A program that translates between high level
languages is usually called a language
translator ,source to source translator
,language converter,or language rewriter (this
last term is usually applied to translations that
do not involve a change of language)
14
Benefits
 The benefit of using a language converter is to
preserve investment in software across a
change in programming language.As an
example,if some organization wants to convert
its software made in some old language to a
newly arrived language in the software industry
,the organization will have to spend a lot of
money for this purpose.
15
Cross-Compiler
“A compiler that runs on one computer but
produces object code for a different type of
computer ”
Cross compilers are used to generate software
that can run on computers with a new
architecture or on special-purpose devices that
cannot host their own compilers.
16
Example
 A program developed to control the operations
of a microwave oven is an example of such an
embedded system.As the software
environment of a microwave oven is not that
much proficient that is can support its own
compiler,so a separate compiler is needed to
first separately compile the software code.
17
Example (cont’d)
 After compilation ,the software is embedded
into the machine.This separate compiler used
to compile the source code is called a cross
compiler.
18
The Analysis-Synthesis Model of
Compilation
 There are two parts of compilation analysis
and synthesis .
 The ANALYSIS part breaks up the source
program into pieces and creates and
intermediate representation of the source
program
19
The Analysis-Synthesis Model of
Compilation (cont’d)
 The SYNTHESIS part constructs the desired
target program from the intermediate
representation.
20
Example
Position= initial + rate * 60
21
Software Tools
 Many software tools that manipulate
source programs first perform some kind
of analysis.
 Some examples of such tools include.
22
Structure Editors
 A structure editor takes as input a sequence of
commands to build a source program .The
structure editor not only performs the text
creation and modification functions of an
ordinary text editor but it also analyses the
program text ,putting appropriate hierarchical
structure on the source program.Thus the
structure editor can perform additional tasks
that are useful in preparation of programs.
23
Pretty Printer
A pretty printer analysis a program and prints it in such
a way that the structure of the program becomes
clearly visible.For example,comments may appear in a
special font,and statements may appear with an
amount of indentation proportional to the depth of their
nesting in hierarchical organization of the statements.
24
Interpreter
Instead of producing a target program as an
translation an interpreter performs the
operations implied by the source program for
an assignment statement for example and
interpreter might build a tree and then carry out
the operations at the nodes as it walks the tree.
25
Interpreter (cont’d)
 At the root it would discover it (interpreter) had on
assignment to perform so it would call a routine to
evaluate the expression on the right and then store the
resulting value in the location as associated with the
identifier position .At the right side of the root the
routine would discover,it had to compute the sum of
two expressions.It would call itself recursively to
compute the value of the expression rate*60 it would
then add that value to the value of the variable initial.
26
THANKS

More Related Content

Similar to Lect-01.ppt

Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
Dr. C.V. Suresh Babu
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
Mukesh Tekwani
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
HarshaVardhan196987
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
Paras Patel
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
tharwatabdulhmed
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
Md Hossen
 
C.pdf
C.pdfC.pdf
Ide description
Ide descriptionIde description
Ide description
Nidhi Baranwal
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
Tech
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
Hemantha Kulathilake
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)Suneel Dogra
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
vino108206
 
WEBSITE DEVELOPMENT
WEBSITE DEVELOPMENTWEBSITE DEVELOPMENT
WEBSITE DEVELOPMENT
shahzadebaujiti
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
nharsh2308
 
Introduction to system programming
Introduction to system programmingIntroduction to system programming
Introduction to system programming
sonalikharade3
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
shahzadebaujiti
 
Compiler vs interpreter
Compiler vs interpreter Compiler vs interpreter
Compiler vs interpreter
HarshaVardhan196987
 
LKGtoPG - Basics of C Language
LKGtoPG - Basics of  C LanguageLKGtoPG - Basics of  C Language
LKGtoPG - Basics of C Language
lkgtopg jobs
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
KINGZzofYouTube
 

Similar to Lect-01.ppt (20)

Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Introduction to systems programming
Introduction to systems programmingIntroduction to systems programming
Introduction to systems programming
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
C.pdf
C.pdfC.pdf
C.pdf
 
Ide description
Ide descriptionIde description
Ide description
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
 
COM1407: Introduction to C Programming
COM1407: Introduction to C Programming COM1407: Introduction to C Programming
COM1407: Introduction to C Programming
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 
CS8251_QB_answers.pdf
CS8251_QB_answers.pdfCS8251_QB_answers.pdf
CS8251_QB_answers.pdf
 
WEBSITE DEVELOPMENT
WEBSITE DEVELOPMENTWEBSITE DEVELOPMENT
WEBSITE DEVELOPMENT
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Introduction to system programming
Introduction to system programmingIntroduction to system programming
Introduction to system programming
 
SYSTEM DEVELOPMENT
SYSTEM DEVELOPMENTSYSTEM DEVELOPMENT
SYSTEM DEVELOPMENT
 
Compiler vs interpreter
Compiler vs interpreter Compiler vs interpreter
Compiler vs interpreter
 
LKGtoPG - Basics of C Language
LKGtoPG - Basics of  C LanguageLKGtoPG - Basics of  C Language
LKGtoPG - Basics of C Language
 
2 Programming Language.pdf
2 Programming Language.pdf2 Programming Language.pdf
2 Programming Language.pdf
 

More from KamranAli649587

UNIT-2-liang-barsky-clipping-algorithm-KM.pdf
UNIT-2-liang-barsky-clipping-algorithm-KM.pdfUNIT-2-liang-barsky-clipping-algorithm-KM.pdf
UNIT-2-liang-barsky-clipping-algorithm-KM.pdf
KamranAli649587
 
Data design and analysis of computing tools
Data design and analysis of computing toolsData design and analysis of computing tools
Data design and analysis of computing tools
KamranAli649587
 
graphs data structure and algorithm link list
graphs data structure and algorithm link listgraphs data structure and algorithm link list
graphs data structure and algorithm link list
KamranAli649587
 
lecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminologylecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminology
KamranAli649587
 
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptx
KamranAli649587
 
Radio propagation model...pptx
Radio propagation model...pptxRadio propagation model...pptx
Radio propagation model...pptx
KamranAli649587
 
Loops_and_FunctionsWeek4_0.ppt
Loops_and_FunctionsWeek4_0.pptLoops_and_FunctionsWeek4_0.ppt
Loops_and_FunctionsWeek4_0.ppt
KamranAli649587
 
Lecture+06-TypesVars.ppt
Lecture+06-TypesVars.pptLecture+06-TypesVars.ppt
Lecture+06-TypesVars.ppt
KamranAli649587
 
C++InputOutput.PPT
C++InputOutput.PPTC++InputOutput.PPT
C++InputOutput.PPT
KamranAli649587
 
radiopropagation-140328202308-phpapp01.pdf
radiopropagation-140328202308-phpapp01.pdfradiopropagation-140328202308-phpapp01.pdf
radiopropagation-140328202308-phpapp01.pdf
KamranAli649587
 
cluster.pptx
cluster.pptxcluster.pptx
cluster.pptx
KamranAli649587
 
Week11-EvaluationMethods.ppt
Week11-EvaluationMethods.pptWeek11-EvaluationMethods.ppt
Week11-EvaluationMethods.ppt
KamranAli649587
 
Week6-Sectionsofapaper.ppt
Week6-Sectionsofapaper.pptWeek6-Sectionsofapaper.ppt
Week6-Sectionsofapaper.ppt
KamranAli649587
 
null-13.pdf
null-13.pdfnull-13.pdf
null-13.pdf
KamranAli649587
 
Reaches
ReachesReaches
null-6.pdf
null-6.pdfnull-6.pdf
null-6.pdf
KamranAli649587
 
null-1.pptx
null-1.pptxnull-1.pptx
null-1.pptx
KamranAli649587
 
Db_05.ppt
Db_05.pptDb_05.ppt
Db_05.ppt
KamranAli649587
 
ch7.ppt
ch7.pptch7.ppt
lect09.ppt
lect09.pptlect09.ppt
lect09.ppt
KamranAli649587
 

More from KamranAli649587 (20)

UNIT-2-liang-barsky-clipping-algorithm-KM.pdf
UNIT-2-liang-barsky-clipping-algorithm-KM.pdfUNIT-2-liang-barsky-clipping-algorithm-KM.pdf
UNIT-2-liang-barsky-clipping-algorithm-KM.pdf
 
Data design and analysis of computing tools
Data design and analysis of computing toolsData design and analysis of computing tools
Data design and analysis of computing tools
 
graphs data structure and algorithm link list
graphs data structure and algorithm link listgraphs data structure and algorithm link list
graphs data structure and algorithm link list
 
lecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminologylecture10 date structure types of graph and terminology
lecture10 date structure types of graph and terminology
 
Encoder-and-decoder.pptx
Encoder-and-decoder.pptxEncoder-and-decoder.pptx
Encoder-and-decoder.pptx
 
Radio propagation model...pptx
Radio propagation model...pptxRadio propagation model...pptx
Radio propagation model...pptx
 
Loops_and_FunctionsWeek4_0.ppt
Loops_and_FunctionsWeek4_0.pptLoops_and_FunctionsWeek4_0.ppt
Loops_and_FunctionsWeek4_0.ppt
 
Lecture+06-TypesVars.ppt
Lecture+06-TypesVars.pptLecture+06-TypesVars.ppt
Lecture+06-TypesVars.ppt
 
C++InputOutput.PPT
C++InputOutput.PPTC++InputOutput.PPT
C++InputOutput.PPT
 
radiopropagation-140328202308-phpapp01.pdf
radiopropagation-140328202308-phpapp01.pdfradiopropagation-140328202308-phpapp01.pdf
radiopropagation-140328202308-phpapp01.pdf
 
cluster.pptx
cluster.pptxcluster.pptx
cluster.pptx
 
Week11-EvaluationMethods.ppt
Week11-EvaluationMethods.pptWeek11-EvaluationMethods.ppt
Week11-EvaluationMethods.ppt
 
Week6-Sectionsofapaper.ppt
Week6-Sectionsofapaper.pptWeek6-Sectionsofapaper.ppt
Week6-Sectionsofapaper.ppt
 
null-13.pdf
null-13.pdfnull-13.pdf
null-13.pdf
 
Reaches
ReachesReaches
Reaches
 
null-6.pdf
null-6.pdfnull-6.pdf
null-6.pdf
 
null-1.pptx
null-1.pptxnull-1.pptx
null-1.pptx
 
Db_05.ppt
Db_05.pptDb_05.ppt
Db_05.ppt
 
ch7.ppt
ch7.pptch7.ppt
ch7.ppt
 
lect09.ppt
lect09.pptlect09.ppt
lect09.ppt
 

Recently uploaded

一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
mzpolocfi
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
roli9797
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
ahzuo
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
u86oixdj
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
g4dpvqap0
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
eddie19851
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Subhajit Sahu
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 

Recently uploaded (20)

一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
一比一原版(Dalhousie毕业证书)达尔豪斯大学毕业证如何办理
 
Analysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performanceAnalysis insight about a Flyball dog competition team's performance
Analysis insight about a Flyball dog competition team's performance
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
一比一原版(CBU毕业证)卡普顿大学毕业证如何办理
 
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
原版制作(swinburne毕业证书)斯威本科技大学毕业证毕业完成信一模一样
 
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
一比一原版(爱大毕业证书)爱丁堡大学毕业证如何办理
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Nanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdfNanandann Nilekani's ppt On India's .pdf
Nanandann Nilekani's ppt On India's .pdf
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
Algorithmic optimizations for Dynamic Levelwise PageRank (from STICD) : SHORT...
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 

Lect-01.ppt

  • 1. 1 Textbooks and Class Materials  Compilers: Principles, Techniques and Tools, Alfred v.Aho, Ravi Sethi , Jeffrey D.Ullman.  Compiler Construction principles and Practice, Kenneth G.Louden  Compiler Design O.G.Kakde  Introduction to computer theory(second Edition) Daniel I.A.Cohen
  • 2. 2 Answer These Questions  What is compiler ?  Why we need compiler?  What are the high or low level languages?  Difference b/w them.
  • 3. 3 Answer These Questions (cont’d)  Difference b/w Assembly and Machine language.  What is the language of computer ?  Why we feel easy in high level language ?
  • 4. 4 What is compiler ? A compiler is a program that reads a program written in one language (i.e source program) And translates it into equivalent program in another Language(i.e the target language). Compiler Source program Target Program
  • 5. 5  The compiler reports to its user the presence of errors in the source program. Compiler Source program Target Program Error Messages
  • 6. 6 Different Terminology  Compiler are sometimes classified as SINGLE PASS,MULTI PASS ,DEBUGGING depending on how they have been constructed or on what function they are supposed to perform.Despite the apparent complexity, the basic functions that any compiler must perform are essentially the same.
  • 7. 7 Decompiler “A program that translates from low level to higher level one is a decompiler ” It can be used for the recovery of lost source code,and is also useful in some cases for error correction.In case if the vendor of a software lose its source code ,they can use a decompiler to recover the source code from the executable.
  • 8. 8 Decompiler (cont’d) If some error creeps in the executable of a software ,it can be decompiled to make corrections.Example of decompiler is: JAD- the fast java decompiler –jad is a 100% pure c++ program and claims to be several times faster than decompilers written in java.Jad is free for non-commercial use,but since the version 1.5.6 it’s no longer free for commercial use.
  • 9. 9 The Ethics of Decompilation  Is decompilation legal, and is it allowed? There are many situations when decompilation can be used... 1) To recover lost source code. You may have written a program for which you only have the executable now (or you got the exe of a program you wrote long back, from someone else!). If you want to have the source for such a program, you can use decompilation to recover it. In all rights, you are the owner of the program, so nobody is going to question you.
  • 10. 10 The Ethics of Decompilation(cont’d) 2) Just as stated above, applications written long back for a computer may not have the source code now, and you may need to port it to a new platform. Either you have to rewrite the application from the scratch, or use decompilation to understand the working of the application and write it again.
  • 11. 11 The Ethics of Decompilation(cont’d) 3) Say you have code written in some language for which you cant find a compiler today! If you have the executable, just decompile it and rewrite the logic in the language of your choice today
  • 12. 12 The Ethics of Decompilation(cont’d) 4) To discover the internals of someone else's program (like what algorithm they have used...)
  • 13. 13 Language Translator  A program that translates between high level languages is usually called a language translator ,source to source translator ,language converter,or language rewriter (this last term is usually applied to translations that do not involve a change of language)
  • 14. 14 Benefits  The benefit of using a language converter is to preserve investment in software across a change in programming language.As an example,if some organization wants to convert its software made in some old language to a newly arrived language in the software industry ,the organization will have to spend a lot of money for this purpose.
  • 15. 15 Cross-Compiler “A compiler that runs on one computer but produces object code for a different type of computer ” Cross compilers are used to generate software that can run on computers with a new architecture or on special-purpose devices that cannot host their own compilers.
  • 16. 16 Example  A program developed to control the operations of a microwave oven is an example of such an embedded system.As the software environment of a microwave oven is not that much proficient that is can support its own compiler,so a separate compiler is needed to first separately compile the software code.
  • 17. 17 Example (cont’d)  After compilation ,the software is embedded into the machine.This separate compiler used to compile the source code is called a cross compiler.
  • 18. 18 The Analysis-Synthesis Model of Compilation  There are two parts of compilation analysis and synthesis .  The ANALYSIS part breaks up the source program into pieces and creates and intermediate representation of the source program
  • 19. 19 The Analysis-Synthesis Model of Compilation (cont’d)  The SYNTHESIS part constructs the desired target program from the intermediate representation.
  • 21. 21 Software Tools  Many software tools that manipulate source programs first perform some kind of analysis.  Some examples of such tools include.
  • 22. 22 Structure Editors  A structure editor takes as input a sequence of commands to build a source program .The structure editor not only performs the text creation and modification functions of an ordinary text editor but it also analyses the program text ,putting appropriate hierarchical structure on the source program.Thus the structure editor can perform additional tasks that are useful in preparation of programs.
  • 23. 23 Pretty Printer A pretty printer analysis a program and prints it in such a way that the structure of the program becomes clearly visible.For example,comments may appear in a special font,and statements may appear with an amount of indentation proportional to the depth of their nesting in hierarchical organization of the statements.
  • 24. 24 Interpreter Instead of producing a target program as an translation an interpreter performs the operations implied by the source program for an assignment statement for example and interpreter might build a tree and then carry out the operations at the nodes as it walks the tree.
  • 25. 25 Interpreter (cont’d)  At the root it would discover it (interpreter) had on assignment to perform so it would call a routine to evaluate the expression on the right and then store the resulting value in the location as associated with the identifier position .At the right side of the root the routine would discover,it had to compute the sum of two expressions.It would call itself recursively to compute the value of the expression rate*60 it would then add that value to the value of the variable initial.