SlideShare a Scribd company logo
1 of 16
CSE240 – Introduction to
Programming Languages
Lecture 04:
Program Processing
Javier Gonzalez-Sanchez
javiergs@asu.edu
javiergs.engineering.asu.edu
Office Hours: By appointment
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 2
Program Processing
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 3
Program Processing: Interpretation
Interpreter is a program that translates in runtime and executes each statement
in the high level-language.
Advantages:
§ No separate compilation phase (quicker program development);
§ Good debugging information since the source code is being executed.
§ Abstraction
Disadvantages:
§ Slow execution
§ Can use more memory space
Why?
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 4
LISP
Steel Bank Common Lisp
https://sourceforge.net/projects/sbcl
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 5
Prolog
http://www.swi-prolog.org/download/stable
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 6
Program Processing
assembler
linker
compiler
Why?
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 7
Program Processing: Compilation
• Compiler is a program that translate the entire code from source to assembly
code.
• Assembler.
• Linker resolves external references (e.g., bring in code from libraries)
object
code
(binary)
linker
Executable binary
for
a specific machine
other
objects
source
program assembler
assembly
programcompiler
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 8
Program Processing: Compilation
Advantages:
• Faster than interpretation
• Good for multi-module programs
Disadvantages:
• Separate compilation phase
• May lose debugging info
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 9
C and C++
• Install Microsoft Visual Studio
• You can get it from MyASU / My Apps
Plan B
• Online Compiler for C/C++
https://www.onlinegdb.com/online_c_compiler
• Dev-C++ 5
http://www.bloodshed.net/devcpp.html
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 10
Program Processing
Program
Processing
Interpretation
LISP Prolog
Compilation
C C++
Two Step Translation
with Intermediate Code
Compilation
+
Interpretation
Java
Compilation
+
Compilation
C++
(.Net Solution)
C#
(.Net Solution)
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 11
Program Processing: Intermediate Code (Java)
Intermediate code make the language and compiler machine-independent.
This concept was implemented in 1970’s to simplify the compiler design. It is used
in Java.
bytecodeJava program javac Java virtual machine
Interpreter on a
specific machine
Simulator
or
Hardware
source
program
intermediate
code
Virtual
machinecompiler
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 12
Program Processing: Intermediate Code (Microsoft .Net)
Microsoft uses an intermediate code for its Common Language Runtime (CLR)
environment (.Net Runtime Environment), which is independent of languages
Prolog
F#
X
F# compiler
Prolog compiler
X compiler
JIT
AND
CLI
C#
Languages
MS IL
Just-In-Time
compiler
Intermediate
Language
Common
Language
Infrastructure
Compilers
C# compiler
C++ C++ compiler
C C compiler
Simulator
or
Hardware
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 13
Program Processing: Intermediate Code
Advantages:
• A single compiler for all machines
• A small virtual machine (interpreter) that even fits in a web browser
Disadvantages:
• Slow execution and memory space
• Separate compilation phase and may lose debugging info
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 14
Program Processing
Program
Processing
Interpretation
LISP Prolog
Compilation
C C++
Two Step Translation
with Intermediate Code
Compilation
+
Interpretation
Java
Compilation
+
Compilation
C++
(.Net Solution)
C#
(.Net Solution)
Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 15
Test Yourselves
• Pros and Cons Interpreter
• Pros and Cons Compiler
• Pros and Cons Two-Steps Processing using Intermediate Code
CSE240 – Introduction to Programming Languages
Javier Gonzalez-Sanchez
javiergs@asu.edu
Fall 2017
Disclaimer. These slides can only be used as study material for the class CSE240 at ASU. They cannot be distributed or used for another purpose.

More Related Content

What's hot

Accelerating time to delivery modern tools for cobol development
Accelerating time to delivery modern tools for cobol developmentAccelerating time to delivery modern tools for cobol development
Accelerating time to delivery modern tools for cobol developmentMicro Focus
 
Functional conf 2014_schedule
Functional conf 2014_scheduleFunctional conf 2014_schedule
Functional conf 2014_schedulegetdownload
 
Interoperate - Product Presentation
Interoperate - Product PresentationInteroperate - Product Presentation
Interoperate - Product PresentationDeepak Ravindran
 
Incremental upgrade cookbook
Incremental upgrade cookbookIncremental upgrade cookbook
Incremental upgrade cookbookMark Juras
 
Why developers love helix team hub
Why developers love helix team hubWhy developers love helix team hub
Why developers love helix team hubPerforce
 
Running Containerized Applications on Modern Serverless Platforms
Running Containerized Applications on Modern Serverless PlatformsRunning Containerized Applications on Modern Serverless Platforms
Running Containerized Applications on Modern Serverless PlatformsDevOps.com
 
C++ Programming Chapter 01
C++ Programming Chapter 01C++ Programming Chapter 01
C++ Programming Chapter 01Sourng Seng
 
Caribbean Developers Conference - 201K8s
Caribbean Developers Conference - 201K8sCaribbean Developers Conference - 201K8s
Caribbean Developers Conference - 201K8sRavi Lachhman
 
Programming Project Part 6
Programming Project Part 6Programming Project Part 6
Programming Project Part 6Bobby Billings
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentTalentica Software
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and AndroidShady Selim
 
The Ring programming language version 1.5.4 book - Part 5 of 185
The Ring programming language version 1.5.4 book - Part 5 of 185The Ring programming language version 1.5.4 book - Part 5 of 185
The Ring programming language version 1.5.4 book - Part 5 of 185Mahmoud Samir Fayed
 
Rabix Benten: A language server for Common Workflow Language
Rabix Benten: A language server for Common Workflow LanguageRabix Benten: A language server for Common Workflow Language
Rabix Benten: A language server for Common Workflow LanguageKaushik (koh-shik) Ghose (gHo-sh)
 

What's hot (20)

Accelerating time to delivery modern tools for cobol development
Accelerating time to delivery modern tools for cobol developmentAccelerating time to delivery modern tools for cobol development
Accelerating time to delivery modern tools for cobol development
 
Functional conf 2014_schedule
Functional conf 2014_scheduleFunctional conf 2014_schedule
Functional conf 2014_schedule
 
Introduction to xamarin
Introduction to xamarin  Introduction to xamarin
Introduction to xamarin
 
Interoperate - Product Presentation
Interoperate - Product PresentationInteroperate - Product Presentation
Interoperate - Product Presentation
 
Krisstell-Bonilla-Resume
Krisstell-Bonilla-ResumeKrisstell-Bonilla-Resume
Krisstell-Bonilla-Resume
 
Incremental upgrade cookbook
Incremental upgrade cookbookIncremental upgrade cookbook
Incremental upgrade cookbook
 
Why developers love helix team hub
Why developers love helix team hubWhy developers love helix team hub
Why developers love helix team hub
 
Running Containerized Applications on Modern Serverless Platforms
Running Containerized Applications on Modern Serverless PlatformsRunning Containerized Applications on Modern Serverless Platforms
Running Containerized Applications on Modern Serverless Platforms
 
Sankerth Resume
Sankerth ResumeSankerth Resume
Sankerth Resume
 
C++ Programming Chapter 01
C++ Programming Chapter 01C++ Programming Chapter 01
C++ Programming Chapter 01
 
Caribbean Developers Conference - 201K8s
Caribbean Developers Conference - 201K8sCaribbean Developers Conference - 201K8s
Caribbean Developers Conference - 201K8s
 
Programming Project Part 6
Programming Project Part 6Programming Project Part 6
Programming Project Part 6
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application Development
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
C# Application lifecycle
C# Application lifecycleC# Application lifecycle
C# Application lifecycle
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and Android
 
The Ring programming language version 1.5.4 book - Part 5 of 185
The Ring programming language version 1.5.4 book - Part 5 of 185The Ring programming language version 1.5.4 book - Part 5 of 185
The Ring programming language version 1.5.4 book - Part 5 of 185
 
Diwakar Nag
Diwakar NagDiwakar Nag
Diwakar Nag
 
Benten: An experimental language server for CWL
Benten: An experimental language server for CWLBenten: An experimental language server for CWL
Benten: An experimental language server for CWL
 
Rabix Benten: A language server for Common Workflow Language
Rabix Benten: A language server for Common Workflow LanguageRabix Benten: A language server for Common Workflow Language
Rabix Benten: A language server for Common Workflow Language
 

Similar to 201801 CSE240 Lecture 04

Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxpercivalfernandez3
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfpercivalfernandez2
 
InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...DevOps for Enterprise Systems
 
Ten compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkTen compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkJanBask Training
 
Enterprise DevOps Series: Using VS Code & Zowe
Enterprise DevOps Series: Using VS Code & ZoweEnterprise DevOps Series: Using VS Code & Zowe
Enterprise DevOps Series: Using VS Code & ZoweDevOps.com
 
What makes Flutter the best cross platform sdk
What makes Flutter the best cross platform sdkWhat makes Flutter the best cross platform sdk
What makes Flutter the best cross platform sdkExpeed Software
 
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...Simplilearn
 
4.LanguageProcessors and language Processing Activities.pdf
4.LanguageProcessors and language Processing Activities.pdf4.LanguageProcessors and language Processing Activities.pdf
4.LanguageProcessors and language Processing Activities.pdfSwapnaliPawar27
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloudlennartkats
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentS. M. Hossein Hamidi
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxGaytriMate
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Overcoming software development challenges by using an integrated software fr...
Overcoming software development challenges by using an integrated software fr...Overcoming software development challenges by using an integrated software fr...
Overcoming software development challenges by using an integrated software fr...Design World
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docxLenchoMamudeBaro
 
Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Eelco Visser
 

Similar to 201801 CSE240 Lecture 04 (20)

Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptx
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdf
 
IBM Application Delivery Foundation for z Systems
IBM Application Delivery Foundation for z SystemsIBM Application Delivery Foundation for z Systems
IBM Application Delivery Foundation for z Systems
 
InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...InterConnect 2017 : Programming languages in the enterprise: Which language s...
InterConnect 2017 : Programming languages in the enterprise: Which language s...
 
Ten compelling reasons to learn .net framework
Ten compelling reasons to learn .net frameworkTen compelling reasons to learn .net framework
Ten compelling reasons to learn .net framework
 
Enterprise DevOps Series: Using VS Code & Zowe
Enterprise DevOps Series: Using VS Code & ZoweEnterprise DevOps Series: Using VS Code & Zowe
Enterprise DevOps Series: Using VS Code & Zowe
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
What makes Flutter the best cross platform sdk
What makes Flutter the best cross platform sdkWhat makes Flutter the best cross platform sdk
What makes Flutter the best cross platform sdk
 
Visual studio 2019 launch
Visual studio 2019 launch Visual studio 2019 launch
Visual studio 2019 launch
 
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
How To Become A DevOps Engineer | Who Is A DevOps Engineer? | DevOps Engineer...
 
4.LanguageProcessors and language Processing Activities.pdf
4.LanguageProcessors and language Processing Activities.pdf4.LanguageProcessors and language Processing Activities.pdf
4.LanguageProcessors and language Processing Activities.pdf
 
Language Engineering in the Cloud
Language Engineering in the CloudLanguage Engineering in the Cloud
Language Engineering in the Cloud
 
C#: Past, Present and Future
C#: Past, Present and FutureC#: Past, Present and Future
C#: Past, Present and Future
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
An Introduction To Linux Development Environment
An Introduction To Linux Development EnvironmentAn Introduction To Linux Development Environment
An Introduction To Linux Development Environment
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Overcoming software development challenges by using an integrated software fr...
Overcoming software development challenges by using an integrated software fr...Overcoming software development challenges by using an integrated software fr...
Overcoming software development challenges by using an integrated software fr...
 
Event Driven Programming in C#.docx
Event Driven Programming in C#.docxEvent Driven Programming in C#.docx
Event Driven Programming in C#.docx
 
Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?Compiler Construction | Lecture 1 | What is a compiler?
Compiler Construction | Lecture 1 | What is a compiler?
 

More from Javier Gonzalez-Sanchez (20)

201804 SER332 Lecture 01
201804 SER332 Lecture 01201804 SER332 Lecture 01
201804 SER332 Lecture 01
 
201801 SER332 Lecture 03
201801 SER332 Lecture 03201801 SER332 Lecture 03
201801 SER332 Lecture 03
 
201801 SER332 Lecture 04
201801 SER332 Lecture 04201801 SER332 Lecture 04
201801 SER332 Lecture 04
 
201801 SER332 Lecture 02
201801 SER332 Lecture 02201801 SER332 Lecture 02
201801 SER332 Lecture 02
 
201801 CSE240 Lecture 26
201801 CSE240 Lecture 26201801 CSE240 Lecture 26
201801 CSE240 Lecture 26
 
201801 CSE240 Lecture 25
201801 CSE240 Lecture 25201801 CSE240 Lecture 25
201801 CSE240 Lecture 25
 
201801 CSE240 Lecture 24
201801 CSE240 Lecture 24201801 CSE240 Lecture 24
201801 CSE240 Lecture 24
 
201801 CSE240 Lecture 23
201801 CSE240 Lecture 23201801 CSE240 Lecture 23
201801 CSE240 Lecture 23
 
201801 CSE240 Lecture 22
201801 CSE240 Lecture 22201801 CSE240 Lecture 22
201801 CSE240 Lecture 22
 
201801 CSE240 Lecture 21
201801 CSE240 Lecture 21201801 CSE240 Lecture 21
201801 CSE240 Lecture 21
 
201801 CSE240 Lecture 20
201801 CSE240 Lecture 20201801 CSE240 Lecture 20
201801 CSE240 Lecture 20
 
201801 CSE240 Lecture 19
201801 CSE240 Lecture 19201801 CSE240 Lecture 19
201801 CSE240 Lecture 19
 
201801 CSE240 Lecture 18
201801 CSE240 Lecture 18201801 CSE240 Lecture 18
201801 CSE240 Lecture 18
 
201801 CSE240 Lecture 17
201801 CSE240 Lecture 17201801 CSE240 Lecture 17
201801 CSE240 Lecture 17
 
201801 CSE240 Lecture 16
201801 CSE240 Lecture 16201801 CSE240 Lecture 16
201801 CSE240 Lecture 16
 
201801 CSE240 Lecture 15
201801 CSE240 Lecture 15201801 CSE240 Lecture 15
201801 CSE240 Lecture 15
 
201801 CSE240 Lecture 14
201801 CSE240 Lecture 14201801 CSE240 Lecture 14
201801 CSE240 Lecture 14
 
201801 CSE240 Lecture 13
201801 CSE240 Lecture 13201801 CSE240 Lecture 13
201801 CSE240 Lecture 13
 
201801 CSE240 Lecture 12
201801 CSE240 Lecture 12201801 CSE240 Lecture 12
201801 CSE240 Lecture 12
 
201801 CSE240 Lecture 11
201801 CSE240 Lecture 11201801 CSE240 Lecture 11
201801 CSE240 Lecture 11
 

Recently uploaded

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 

201801 CSE240 Lecture 04

  • 1. CSE240 – Introduction to Programming Languages Lecture 04: Program Processing Javier Gonzalez-Sanchez javiergs@asu.edu javiergs.engineering.asu.edu Office Hours: By appointment
  • 2. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 2 Program Processing
  • 3. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 3 Program Processing: Interpretation Interpreter is a program that translates in runtime and executes each statement in the high level-language. Advantages: § No separate compilation phase (quicker program development); § Good debugging information since the source code is being executed. § Abstraction Disadvantages: § Slow execution § Can use more memory space Why?
  • 4. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 4 LISP Steel Bank Common Lisp https://sourceforge.net/projects/sbcl
  • 5. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 5 Prolog http://www.swi-prolog.org/download/stable
  • 6. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 6 Program Processing assembler linker compiler Why?
  • 7. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 7 Program Processing: Compilation • Compiler is a program that translate the entire code from source to assembly code. • Assembler. • Linker resolves external references (e.g., bring in code from libraries) object code (binary) linker Executable binary for a specific machine other objects source program assembler assembly programcompiler
  • 8. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 8 Program Processing: Compilation Advantages: • Faster than interpretation • Good for multi-module programs Disadvantages: • Separate compilation phase • May lose debugging info
  • 9. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 9 C and C++ • Install Microsoft Visual Studio • You can get it from MyASU / My Apps Plan B • Online Compiler for C/C++ https://www.onlinegdb.com/online_c_compiler • Dev-C++ 5 http://www.bloodshed.net/devcpp.html
  • 10. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 10 Program Processing Program Processing Interpretation LISP Prolog Compilation C C++ Two Step Translation with Intermediate Code Compilation + Interpretation Java Compilation + Compilation C++ (.Net Solution) C# (.Net Solution)
  • 11. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 11 Program Processing: Intermediate Code (Java) Intermediate code make the language and compiler machine-independent. This concept was implemented in 1970’s to simplify the compiler design. It is used in Java. bytecodeJava program javac Java virtual machine Interpreter on a specific machine Simulator or Hardware source program intermediate code Virtual machinecompiler
  • 12. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 12 Program Processing: Intermediate Code (Microsoft .Net) Microsoft uses an intermediate code for its Common Language Runtime (CLR) environment (.Net Runtime Environment), which is independent of languages Prolog F# X F# compiler Prolog compiler X compiler JIT AND CLI C# Languages MS IL Just-In-Time compiler Intermediate Language Common Language Infrastructure Compilers C# compiler C++ C++ compiler C C compiler Simulator or Hardware
  • 13. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 13 Program Processing: Intermediate Code Advantages: • A single compiler for all machines • A small virtual machine (interpreter) that even fits in a web browser Disadvantages: • Slow execution and memory space • Separate compilation phase and may lose debugging info
  • 14. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 14 Program Processing Program Processing Interpretation LISP Prolog Compilation C C++ Two Step Translation with Intermediate Code Compilation + Interpretation Java Compilation + Compilation C++ (.Net Solution) C# (.Net Solution)
  • 15. Javier Gonzalez-Sanchez | CSE 240 | Fall 2017 | 15 Test Yourselves • Pros and Cons Interpreter • Pros and Cons Compiler • Pros and Cons Two-Steps Processing using Intermediate Code
  • 16. CSE240 – Introduction to Programming Languages Javier Gonzalez-Sanchez javiergs@asu.edu Fall 2017 Disclaimer. These slides can only be used as study material for the class CSE240 at ASU. They cannot be distributed or used for another purpose.