SlideShare a Scribd company logo
CS 415: Programming
CS 415: Programming
Languages
Languages
Chapter 1
Chapter 1
Aaron Bloomfield
Aaron Bloomfield
Fall 2005
Fall 2005
The first computers
The first computers
Scales – computed relative weight of two items
Scales – computed relative weight of two items

Computed if the first item’s weight was less than, equal to, or
Computed if the first item’s weight was less than, equal to, or
greater than the second item’s weight
greater than the second item’s weight
Abacus – performed mathematical computations
Abacus – performed mathematical computations

Primarily thought of as Chinese, but also Japanese, Mayan,
Primarily thought of as Chinese, but also Japanese, Mayan,
Russian, and Roman versions
Russian, and Roman versions

Can do square roots and cube roots
Can do square roots and cube roots
Stonehenge
Stonehenge
Computer Size
Computer Size
ENIAC then…
ENIAC today…
With computers (small) size does matter!
With computers (small) size does matter!
Why study programming
Why study programming
languages?
languages?
Become a better software engineer
Become a better software engineer

Understand how to use language features
Understand how to use language features

Appreciate implementation issues
Appreciate implementation issues
Better background for language selection
Better background for language selection

Familiar with range of languages
Familiar with range of languages

Understand issues / advantages / disadvantages
Understand issues / advantages / disadvantages
Better able to learn languages
Better able to learn languages

You might need to know a lot
You might need to know a lot
Why study programming
Why study programming
languages?
languages?
Better understanding of implementation issues
Better understanding of implementation issues

How is “this feature” implemented?
How is “this feature” implemented?

Why does “this part” run so slowly?
Why does “this part” run so slowly?
Better able to design languages
Better able to design languages

Those who ignore history are bound to repeat it…
Those who ignore history are bound to repeat it…
Why are there so many
Why are there so many
programming languages?
programming languages?
There are thousands!
There are thousands!
Evolution
Evolution

Structured languages -> OO programming
Structured languages -> OO programming
Special purposes
Special purposes

Lisp for symbols; Snobol for strings; C for systems;
Lisp for symbols; Snobol for strings; C for systems;
Prolog for relationships
Prolog for relationships
Personal preference
Personal preference

Programmers have their own personal tastes
Programmers have their own personal tastes
Expressive power
Expressive power

Some features allow you to express your ideas better
Some features allow you to express your ideas better
Why are there so many
Why are there so many
programming languages?
programming languages?
Easy to use
Easy to use

Especially for teaching / learning tasks
Especially for teaching / learning tasks
Ease of implementation
Ease of implementation

Easy to write a compiler / interpreter for
Easy to write a compiler / interpreter for
Good compilers
Good compilers

Fortran in the 50’s and 60’s
Fortran in the 50’s and 60’s
Economics, patronage
Economics, patronage

Cobol and Ada, for example
Cobol and Ada, for example
Programming domains
Programming domains
Scientific applications
Scientific applications

Using the computer as a large calculator
Using the computer as a large calculator

Fortran and friends, some Algol, APL
Fortran and friends, some Algol, APL

Using the computer for symbol manipulation
Using the computer for symbol manipulation

Mathematica
Mathematica
Business applications
Business applications

Data processing and business procedures
Data processing and business procedures

Cobol, some PL/1, RPG, spreadsheets
Cobol, some PL/1, RPG, spreadsheets
Systems programming
Systems programming

Building operating systems and utilities
Building operating systems and utilities

C, PL/S, ESPOL, Bliss, some Algol and derivitaves
C, PL/S, ESPOL, Bliss, some Algol and derivitaves
Programming domains
Programming domains
Parallel programming
Parallel programming

Parallel and distributed systems
Parallel and distributed systems

Ada, CSP, Modula, DP, Mentat/Legion
Ada, CSP, Modula, DP, Mentat/Legion
Artificial intelligence
Artificial intelligence

Uses symbolic rather than numeric computations
Uses symbolic rather than numeric computations

Lists as main data structure
Lists as main data structure

Flexibility (code = data)
Flexibility (code = data)

Lisp in 1959, Prolog in the 1970s
Lisp in 1959, Prolog in the 1970s
Scripting languages
Scripting languages

A list of commands to be executed
A list of commands to be executed

UNIX shell programming, awk, tcl, Perl
UNIX shell programming, awk, tcl, Perl
Programming domains
Programming domains
Education
Education

Languages designed to facilitate teaching
Languages designed to facilitate teaching

Pascal, BASIC, Logo
Pascal, BASIC, Logo
Special purpose
Special purpose

Other than the above…
Other than the above…

Simulation
Simulation

Specialized equipment control
Specialized equipment control

String processing
String processing

Visual languages
Visual languages
Programming paradigms
Programming paradigms
You have already seen assembly language
You have already seen assembly language
We will study five language paradigms:
We will study five language paradigms:

Top-down (Algol 60 and Fortran)
Top-down (Algol 60 and Fortran)

Functional (Scheme and/or OCaml)
Functional (Scheme and/or OCaml)

Logic (Prolog)
Logic (Prolog)

Object oriented (Smalltalk)
Object oriented (Smalltalk)

Aspect oriented (AspectJ)
Aspect oriented (AspectJ)
Programming language history
Programming language history
Pseudocodes (195X) – Many
Pseudocodes (195X) – Many
Fortran (195X) – IBM, Backus
Fortran (195X) – IBM, Backus
Lisp (196x) – McCarthy
Lisp (196x) – McCarthy
Algol (1958) – Committee (led to Pascal, Ada)
Algol (1958) – Committee (led to Pascal, Ada)
Cobol (196X) – Hopper
Cobol (196X) – Hopper
Functional programming – FP, Scheme, Haskell, ML
Functional programming – FP, Scheme, Haskell, ML
Logic programming – Prolog
Logic programming – Prolog
Object oriented programming – Smalltalk, C++, Python,
Object oriented programming – Smalltalk, C++, Python,
Java
Java
Aspect oriented programming – AspectJ, AspectC++
Aspect oriented programming – AspectJ, AspectC++
Parallel / non-deterministic programming
Parallel / non-deterministic programming
Compilation vs. Translation
Compilation vs. Translation
Translation: does a ‘mechanical’ translation of the source
Translation: does a ‘mechanical’ translation of the source
code
code

No deep analysis of the syntax/semantics of the code
No deep analysis of the syntax/semantics of the code
Compilation: does a thorough understanding and
Compilation: does a thorough understanding and
translation of the code
translation of the code
A compiler/translator changes a program from one
A compiler/translator changes a program from one
language into another
language into another

C compiler: from C into assembly
C compiler: from C into assembly
An assembler then translates it into machine language
An assembler then translates it into machine language

Java compiler: from Java code to Java bytecode
Java compiler: from Java code to Java bytecode
The Java interpreter then runs the bytecode
The Java interpreter then runs the bytecode
Compilation stages
Compilation stages
Scanner
Scanner
Parser
Parser
Semantic analysis
Semantic analysis
Intermediate code generation
Intermediate code generation
Machine-independent code improvement (optional)
Machine-independent code improvement (optional)
Target code generation
Target code generation
Machine-specific code improvement (optional)
Machine-specific code improvement (optional)
For many compilers, the result is assembly
For many compilers, the result is assembly

Which then has to be run through an assembler
Which then has to be run through an assembler
These stages are machine-independent!
These stages are machine-independent!

The generate “intermediate code”
The generate “intermediate code”
Compilation: Scanner
Compilation: Scanner
Recognizes the ‘tokens’ of a program
Recognizes the ‘tokens’ of a program

Example tokens: ( 75 main int { return ; foo
Example tokens: ( 75 main int { return ; foo
Lexical errors are detected here
Lexical errors are detected here

More on this in a future lecture
More on this in a future lecture
Compilation: Parser
Compilation: Parser
Puts the tokens together into a pattern
Puts the tokens together into a pattern

void main ( int argc , char ** argv ) {
void main ( int argc , char ** argv ) {

This line has 11 tokens
This line has 11 tokens

It is the beginning of a method
It is the beginning of a method
Syntatic errors are detected here
Syntatic errors are detected here

When the tokens are not in the correct order:
When the tokens are not in the correct order:

int int foo ;
int int foo ;

This line has 4 tokens
This line has 4 tokens

After the type (int), the parser expects a variable
After the type (int), the parser expects a variable
name
name
Not another type
Not another type
Compilation: Semantic analysis
Compilation: Semantic analysis
Checks for semantic correctness
Checks for semantic correctness
A semantic error:
A semantic error:
foo = 5;
foo = 5;
int foo;
int foo;
In C (and most languages), a variable has to be
In C (and most languages), a variable has to be
declared before it is used
declared before it is used

Note that this is syntactically correct
Note that this is syntactically correct
As both lines are valid lines as far as the parser is concerned
As both lines are valid lines as far as the parser is concerned
Compilation: Intermediate code
Compilation: Intermediate code
generation (and improvement)
generation (and improvement)
Almost all compilers generate intermediate code
Almost all compilers generate intermediate code

This allows part of the compiler to be machine-
This allows part of the compiler to be machine-
independent
independent
That code can then be optimized
That code can then be optimized

Optimize for speed, memory usage, or program
Optimize for speed, memory usage, or program
footprint
footprint
Compilation: Target code
Compilation: Target code
generation (and improvement)
generation (and improvement)
The intermediate code is then translated into the
The intermediate code is then translated into the
target code
target code

For most compilers, the target code is assembly
For most compilers, the target code is assembly

For Java, the target code is Java bytecode
For Java, the target code is Java bytecode
That code can then be further optimized
That code can then be further optimized

Optimize for speed, memory usage, or program
Optimize for speed, memory usage, or program
footprint
footprint

More Related Content

Similar to brief intro for Programming Languages 02-chapter-1 (20)

PDF
concepts-in-programming-languages-2kuots4121.pdf
hidrahrama
 
PPT
introduction to computer vision and image processing
pakboy12
 
PPT
Ch1 (1).ppt
MDSayem35
 
PPTX
Compilers.pptx
MohammedMohammed578197
 
PDF
Functional programming
OpenAgile Romania
 
PDF
List of programming_languages_by_type
Phoenix
 
PPTX
System Programming Unit III
Manoj Patil
 
PPT
Bay NET Aug 19 2009 presentation ppt
Art Scott
 
PPTX
L1.1 Introduction to Programming Languages.pptx
shiblyrahman7
 
PPTX
Cd ch1 - introduction
mengistu23
 
PPTX
CD - CH1 - Introduction to compiler design.pptx
ZiyadMohammed17
 
PPT
Internationalisation And Globalisation
Alan Dean
 
PPTX
4_5802928814682016556.pptx
AshenafiGirma5
 
PPTX
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
PDF
Download full ebook of Computer Systems 5th Edition (eBook PDF) instant downl...
sonkaeiraseb
 
PPT
Programing Language
76 Degree Creative
 
PPT
presentation_intro_to_python
gunanandJha2
 
PPT
presentation_intro_to_python_1462930390_181219.ppt
MohitChaudhary637683
 
PPTX
Lecture1 compilers
Aftab Ahmad
 
DOCX
How do you learn Compiler Construction.docx
Tri AB Refardi
 
concepts-in-programming-languages-2kuots4121.pdf
hidrahrama
 
introduction to computer vision and image processing
pakboy12
 
Ch1 (1).ppt
MDSayem35
 
Compilers.pptx
MohammedMohammed578197
 
Functional programming
OpenAgile Romania
 
List of programming_languages_by_type
Phoenix
 
System Programming Unit III
Manoj Patil
 
Bay NET Aug 19 2009 presentation ppt
Art Scott
 
L1.1 Introduction to Programming Languages.pptx
shiblyrahman7
 
Cd ch1 - introduction
mengistu23
 
CD - CH1 - Introduction to compiler design.pptx
ZiyadMohammed17
 
Internationalisation And Globalisation
Alan Dean
 
4_5802928814682016556.pptx
AshenafiGirma5
 
Cobbbbbbbnnnnnnnnnnnnnnnnncepts of PL.pptx
mehrankhan7842312
 
Download full ebook of Computer Systems 5th Edition (eBook PDF) instant downl...
sonkaeiraseb
 
Programing Language
76 Degree Creative
 
presentation_intro_to_python
gunanandJha2
 
presentation_intro_to_python_1462930390_181219.ppt
MohitChaudhary637683
 
Lecture1 compilers
Aftab Ahmad
 
How do you learn Compiler Construction.docx
Tri AB Refardi
 

Recently uploaded (20)

PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Human Resources Information System (HRIS)
Amity University, Patna
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Ad

brief intro for Programming Languages 02-chapter-1

  • 1. CS 415: Programming CS 415: Programming Languages Languages Chapter 1 Chapter 1 Aaron Bloomfield Aaron Bloomfield Fall 2005 Fall 2005
  • 2. The first computers The first computers Scales – computed relative weight of two items Scales – computed relative weight of two items  Computed if the first item’s weight was less than, equal to, or Computed if the first item’s weight was less than, equal to, or greater than the second item’s weight greater than the second item’s weight Abacus – performed mathematical computations Abacus – performed mathematical computations  Primarily thought of as Chinese, but also Japanese, Mayan, Primarily thought of as Chinese, but also Japanese, Mayan, Russian, and Roman versions Russian, and Roman versions  Can do square roots and cube roots Can do square roots and cube roots
  • 4. Computer Size Computer Size ENIAC then… ENIAC today… With computers (small) size does matter! With computers (small) size does matter!
  • 5. Why study programming Why study programming languages? languages? Become a better software engineer Become a better software engineer  Understand how to use language features Understand how to use language features  Appreciate implementation issues Appreciate implementation issues Better background for language selection Better background for language selection  Familiar with range of languages Familiar with range of languages  Understand issues / advantages / disadvantages Understand issues / advantages / disadvantages Better able to learn languages Better able to learn languages  You might need to know a lot You might need to know a lot
  • 6. Why study programming Why study programming languages? languages? Better understanding of implementation issues Better understanding of implementation issues  How is “this feature” implemented? How is “this feature” implemented?  Why does “this part” run so slowly? Why does “this part” run so slowly? Better able to design languages Better able to design languages  Those who ignore history are bound to repeat it… Those who ignore history are bound to repeat it…
  • 7. Why are there so many Why are there so many programming languages? programming languages? There are thousands! There are thousands! Evolution Evolution  Structured languages -> OO programming Structured languages -> OO programming Special purposes Special purposes  Lisp for symbols; Snobol for strings; C for systems; Lisp for symbols; Snobol for strings; C for systems; Prolog for relationships Prolog for relationships Personal preference Personal preference  Programmers have their own personal tastes Programmers have their own personal tastes Expressive power Expressive power  Some features allow you to express your ideas better Some features allow you to express your ideas better
  • 8. Why are there so many Why are there so many programming languages? programming languages? Easy to use Easy to use  Especially for teaching / learning tasks Especially for teaching / learning tasks Ease of implementation Ease of implementation  Easy to write a compiler / interpreter for Easy to write a compiler / interpreter for Good compilers Good compilers  Fortran in the 50’s and 60’s Fortran in the 50’s and 60’s Economics, patronage Economics, patronage  Cobol and Ada, for example Cobol and Ada, for example
  • 9. Programming domains Programming domains Scientific applications Scientific applications  Using the computer as a large calculator Using the computer as a large calculator  Fortran and friends, some Algol, APL Fortran and friends, some Algol, APL  Using the computer for symbol manipulation Using the computer for symbol manipulation  Mathematica Mathematica Business applications Business applications  Data processing and business procedures Data processing and business procedures  Cobol, some PL/1, RPG, spreadsheets Cobol, some PL/1, RPG, spreadsheets Systems programming Systems programming  Building operating systems and utilities Building operating systems and utilities  C, PL/S, ESPOL, Bliss, some Algol and derivitaves C, PL/S, ESPOL, Bliss, some Algol and derivitaves
  • 10. Programming domains Programming domains Parallel programming Parallel programming  Parallel and distributed systems Parallel and distributed systems  Ada, CSP, Modula, DP, Mentat/Legion Ada, CSP, Modula, DP, Mentat/Legion Artificial intelligence Artificial intelligence  Uses symbolic rather than numeric computations Uses symbolic rather than numeric computations  Lists as main data structure Lists as main data structure  Flexibility (code = data) Flexibility (code = data)  Lisp in 1959, Prolog in the 1970s Lisp in 1959, Prolog in the 1970s Scripting languages Scripting languages  A list of commands to be executed A list of commands to be executed  UNIX shell programming, awk, tcl, Perl UNIX shell programming, awk, tcl, Perl
  • 11. Programming domains Programming domains Education Education  Languages designed to facilitate teaching Languages designed to facilitate teaching  Pascal, BASIC, Logo Pascal, BASIC, Logo Special purpose Special purpose  Other than the above… Other than the above…  Simulation Simulation  Specialized equipment control Specialized equipment control  String processing String processing  Visual languages Visual languages
  • 12. Programming paradigms Programming paradigms You have already seen assembly language You have already seen assembly language We will study five language paradigms: We will study five language paradigms:  Top-down (Algol 60 and Fortran) Top-down (Algol 60 and Fortran)  Functional (Scheme and/or OCaml) Functional (Scheme and/or OCaml)  Logic (Prolog) Logic (Prolog)  Object oriented (Smalltalk) Object oriented (Smalltalk)  Aspect oriented (AspectJ) Aspect oriented (AspectJ)
  • 13. Programming language history Programming language history Pseudocodes (195X) – Many Pseudocodes (195X) – Many Fortran (195X) – IBM, Backus Fortran (195X) – IBM, Backus Lisp (196x) – McCarthy Lisp (196x) – McCarthy Algol (1958) – Committee (led to Pascal, Ada) Algol (1958) – Committee (led to Pascal, Ada) Cobol (196X) – Hopper Cobol (196X) – Hopper Functional programming – FP, Scheme, Haskell, ML Functional programming – FP, Scheme, Haskell, ML Logic programming – Prolog Logic programming – Prolog Object oriented programming – Smalltalk, C++, Python, Object oriented programming – Smalltalk, C++, Python, Java Java Aspect oriented programming – AspectJ, AspectC++ Aspect oriented programming – AspectJ, AspectC++ Parallel / non-deterministic programming Parallel / non-deterministic programming
  • 14. Compilation vs. Translation Compilation vs. Translation Translation: does a ‘mechanical’ translation of the source Translation: does a ‘mechanical’ translation of the source code code  No deep analysis of the syntax/semantics of the code No deep analysis of the syntax/semantics of the code Compilation: does a thorough understanding and Compilation: does a thorough understanding and translation of the code translation of the code A compiler/translator changes a program from one A compiler/translator changes a program from one language into another language into another  C compiler: from C into assembly C compiler: from C into assembly An assembler then translates it into machine language An assembler then translates it into machine language  Java compiler: from Java code to Java bytecode Java compiler: from Java code to Java bytecode The Java interpreter then runs the bytecode The Java interpreter then runs the bytecode
  • 15. Compilation stages Compilation stages Scanner Scanner Parser Parser Semantic analysis Semantic analysis Intermediate code generation Intermediate code generation Machine-independent code improvement (optional) Machine-independent code improvement (optional) Target code generation Target code generation Machine-specific code improvement (optional) Machine-specific code improvement (optional) For many compilers, the result is assembly For many compilers, the result is assembly  Which then has to be run through an assembler Which then has to be run through an assembler These stages are machine-independent! These stages are machine-independent!  The generate “intermediate code” The generate “intermediate code”
  • 16. Compilation: Scanner Compilation: Scanner Recognizes the ‘tokens’ of a program Recognizes the ‘tokens’ of a program  Example tokens: ( 75 main int { return ; foo Example tokens: ( 75 main int { return ; foo Lexical errors are detected here Lexical errors are detected here  More on this in a future lecture More on this in a future lecture
  • 17. Compilation: Parser Compilation: Parser Puts the tokens together into a pattern Puts the tokens together into a pattern  void main ( int argc , char ** argv ) { void main ( int argc , char ** argv ) {  This line has 11 tokens This line has 11 tokens  It is the beginning of a method It is the beginning of a method Syntatic errors are detected here Syntatic errors are detected here  When the tokens are not in the correct order: When the tokens are not in the correct order:  int int foo ; int int foo ;  This line has 4 tokens This line has 4 tokens  After the type (int), the parser expects a variable After the type (int), the parser expects a variable name name Not another type Not another type
  • 18. Compilation: Semantic analysis Compilation: Semantic analysis Checks for semantic correctness Checks for semantic correctness A semantic error: A semantic error: foo = 5; foo = 5; int foo; int foo; In C (and most languages), a variable has to be In C (and most languages), a variable has to be declared before it is used declared before it is used  Note that this is syntactically correct Note that this is syntactically correct As both lines are valid lines as far as the parser is concerned As both lines are valid lines as far as the parser is concerned
  • 19. Compilation: Intermediate code Compilation: Intermediate code generation (and improvement) generation (and improvement) Almost all compilers generate intermediate code Almost all compilers generate intermediate code  This allows part of the compiler to be machine- This allows part of the compiler to be machine- independent independent That code can then be optimized That code can then be optimized  Optimize for speed, memory usage, or program Optimize for speed, memory usage, or program footprint footprint
  • 20. Compilation: Target code Compilation: Target code generation (and improvement) generation (and improvement) The intermediate code is then translated into the The intermediate code is then translated into the target code target code  For most compilers, the target code is assembly For most compilers, the target code is assembly  For Java, the target code is Java bytecode For Java, the target code is Java bytecode That code can then be further optimized That code can then be further optimized  Optimize for speed, memory usage, or program Optimize for speed, memory usage, or program footprint footprint