SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Compilation Vs.
Interpretation
Source Code Translators
An Interpreter is a
Translator
Examples of translators:
● Compilers - translates high level code to low level code, e.g. Java -> JVM
● Assemblers - translates assembly language code to machine code, e.g. x86as -> x86
● High-level translators - translates code from one PL to another, e.g. Java -> C
● Decompilers - translates low-level code to high-level code, e.g. Java JVM bytecode -> Java
High Level / Low Level
Low High
Machine Readable Human Readable
Binary: 011011 Grammar: if let, while, for
executable Not executable
Knows about hardware Does not know about hardware
A compiler can be compared to taking a foreign
movie and first sub-titling it and then being able to
watch it again and again.
While an interpreter is like having a translator at the
UN translate each line of a delegate’s speech in real-
time.
AKA...
The compiler translates the entire program before it is run.
The interpreters translate a line at a time while the program is being run.
Compiled Languages
Python
Javascript
Lisp
Java ( compiled to byte code first )
C# (compiled to MSIL)
PHP
Perl
Interpreted Languages
C
C++
Objective-C
Swift
Fortran
Advantages of Compiled Languages
- Pre-Compiled binaries are inherently more difficult to reverse-engineer and
are therefore helpful to closed-source software providers wishing to keep the
I.P. contained in their source code private.
- Once a program is translated into native instructions (machine code), it can
then be executed over and over again withouth the overhead of this
translation.
- Ability to support architectures the interpreter hasn't been compiled for (such
as embedded systems)
- Can be optimized more heavily due to larger window of code to be translated.
Advantages of Interpreted Languages
- Programs can immediately be executed without the requirement of compiling
first.
- Potentially has lower memory footprint because no Object Code is created.
- Supports portability if interpreter is installed on different platforms.
- Starts executing immediately (no compilation phase)
- Source Code can be more easily changed between program executions
because there is no compilation step in between.
Hybrid Approach
An interpretive compiler combines fast translation with moderately fast execution, provided that:
● VM code is lower than the source language, but higher than native machine code
● VM instructions have simple formats (can be quickly analysed by an interpreter)
Example: JDK provides an interpretive compiler for Java.
Hybrid Approach Continued..
- any language can be either compiled or interpreted but the implementation of the language is what is either one or both. Sometimes even a
spectrum of compiled/interpreted
- Etymology - compiler (pile things together, throw in pile), interpreter (inter, between source and assembly)
- Interpreted languages require the interpreted to be installed on host machine
- Interpreter continues interpreting until it hits an error
- Compiler will check errors for you at compilation time
- Compiled program requires more memory as all the code is compiled as opposed to line by line discarding the previous line. However with
modern computers equipped with gigabytes of ram this isn’t a practical concern.
Extra Points

Mais conteúdo relacionado

Mais procurados

Programming languages
Programming languagesProgramming languages
Programming languagesvito_carleone
 
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
 
Primary and secondary storage devices
Primary and secondary storage devicesPrimary and secondary storage devices
Primary and secondary storage devicesPichano Kikon
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languagesraksharao
 
Graphical Programming
Graphical ProgrammingGraphical Programming
Graphical ProgrammingGaditek
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compilerIffat Anjum
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language TranslatorRanjeet Kumar
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of cHarish Kumawat
 
Types of Operating System
Types of Operating SystemTypes of Operating System
Types of Operating SystemHemant Raj
 

Mais procurados (20)

Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 
Computer languages 11
Computer languages 11Computer languages 11
Computer languages 11
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
Compilers
CompilersCompilers
Compilers
 
Shell programming
Shell programmingShell programming
Shell programming
 
Introduction to Ubuntu
Introduction to UbuntuIntroduction to Ubuntu
Introduction to Ubuntu
 
Programming
ProgrammingProgramming
Programming
 
Operating system
Operating system Operating system
Operating system
 
Primary and secondary storage devices
Primary and secondary storage devicesPrimary and secondary storage devices
Primary and secondary storage devices
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
FIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer LanguagesFIT-Unit3 chapter2- Computer Languages
FIT-Unit3 chapter2- Computer Languages
 
Graphical Programming
Graphical ProgrammingGraphical Programming
Graphical Programming
 
Lecture 01 introduction to compiler
Lecture 01 introduction to compilerLecture 01 introduction to compiler
Lecture 01 introduction to compiler
 
Compilers
CompilersCompilers
Compilers
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language Translator
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of c
 
Types of Operating System
Types of Operating SystemTypes of Operating System
Types of Operating System
 

Semelhante a Compilation v. interpretation

La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl TranslatorCma Mohd
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution pptKeerty Smile
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to CompilersAkhil Kaushik
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdfRakibRahman19
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer programAbhay Kumar
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9nahomyitbarek
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfHarshaVardhan196987
 
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
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptxAshenafiGirma5
 
Compiler - Computer Programming - UOZ
Compiler - Computer Programming - UOZ Compiler - Computer Programming - UOZ
Compiler - Computer Programming - UOZ Safen D Taha
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / TranslatorsProject Student
 
aditya malkani compiler.pptx
aditya malkani compiler.pptxaditya malkani compiler.pptx
aditya malkani compiler.pptxWildVenomOP
 

Semelhante a Compilation v. interpretation (20)

Cf&oa
Cf&oaCf&oa
Cf&oa
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Introduction to Compilers
Introduction to CompilersIntroduction to Compilers
Introduction to Compilers
 
Language processing system.pdf
Language processing system.pdfLanguage processing system.pdf
Language processing system.pdf
 
COMPILER DESIGN.docx
COMPILER DESIGN.docxCOMPILER DESIGN.docx
COMPILER DESIGN.docx
 
Compiler vs interpreter
Compiler vs interpreter Compiler vs interpreter
Compiler vs interpreter
 
Life cycle of a computer program
Life cycle of a computer programLife cycle of a computer program
Life cycle of a computer program
 
Computer assignment for grade 9
Computer assignment for grade  9Computer assignment for grade  9
Computer assignment for grade 9
 
Assembler
AssemblerAssembler
Assembler
 
compilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdfcompilervsinterpreter-161008074915.pdf
compilervsinterpreter-161008074915.pdf
 
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
 
4_5802928814682016556.pptx
4_5802928814682016556.pptx4_5802928814682016556.pptx
4_5802928814682016556.pptx
 
Compiler - Computer Programming - UOZ
Compiler - Computer Programming - UOZ Compiler - Computer Programming - UOZ
Compiler - Computer Programming - UOZ
 
Compiler type
Compiler typeCompiler type
Compiler type
 
Programming Languages / Translators
Programming Languages / TranslatorsProgramming Languages / Translators
Programming Languages / Translators
 
aditya malkani compiler.pptx
aditya malkani compiler.pptxaditya malkani compiler.pptx
aditya malkani compiler.pptx
 
Interpreter
InterpreterInterpreter
Interpreter
 

Último

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 

Último (20)

Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 

Compilation v. interpretation

  • 2. An Interpreter is a Translator Examples of translators: ● Compilers - translates high level code to low level code, e.g. Java -> JVM ● Assemblers - translates assembly language code to machine code, e.g. x86as -> x86 ● High-level translators - translates code from one PL to another, e.g. Java -> C ● Decompilers - translates low-level code to high-level code, e.g. Java JVM bytecode -> Java
  • 3. High Level / Low Level Low High Machine Readable Human Readable Binary: 011011 Grammar: if let, while, for executable Not executable Knows about hardware Does not know about hardware
  • 4. A compiler can be compared to taking a foreign movie and first sub-titling it and then being able to watch it again and again. While an interpreter is like having a translator at the UN translate each line of a delegate’s speech in real- time. AKA... The compiler translates the entire program before it is run. The interpreters translate a line at a time while the program is being run.
  • 5.
  • 6. Compiled Languages Python Javascript Lisp Java ( compiled to byte code first ) C# (compiled to MSIL) PHP Perl Interpreted Languages C C++ Objective-C Swift Fortran
  • 7. Advantages of Compiled Languages - Pre-Compiled binaries are inherently more difficult to reverse-engineer and are therefore helpful to closed-source software providers wishing to keep the I.P. contained in their source code private. - Once a program is translated into native instructions (machine code), it can then be executed over and over again withouth the overhead of this translation. - Ability to support architectures the interpreter hasn't been compiled for (such as embedded systems) - Can be optimized more heavily due to larger window of code to be translated.
  • 8. Advantages of Interpreted Languages - Programs can immediately be executed without the requirement of compiling first. - Potentially has lower memory footprint because no Object Code is created. - Supports portability if interpreter is installed on different platforms. - Starts executing immediately (no compilation phase) - Source Code can be more easily changed between program executions because there is no compilation step in between.
  • 9. Hybrid Approach An interpretive compiler combines fast translation with moderately fast execution, provided that: ● VM code is lower than the source language, but higher than native machine code ● VM instructions have simple formats (can be quickly analysed by an interpreter) Example: JDK provides an interpretive compiler for Java.
  • 11. - any language can be either compiled or interpreted but the implementation of the language is what is either one or both. Sometimes even a spectrum of compiled/interpreted - Etymology - compiler (pile things together, throw in pile), interpreter (inter, between source and assembly) - Interpreted languages require the interpreted to be installed on host machine - Interpreter continues interpreting until it hits an error - Compiler will check errors for you at compilation time - Compiled program requires more memory as all the code is compiled as opposed to line by line discarding the previous line. However with modern computers equipped with gigabytes of ram this isn’t a practical concern. Extra Points