Académique Documents
Professionnel Documents
Culture Documents
Programming Languages
Lecture 2
Topic
Review Compilation and Interpretation Phase of compilations Compilation Passes virtual machine (VM) Summary
Review
Programming paradigm
programming paradigm can be defined as a pattern or model used within a software programming language to create software applications.
Programming Domains
Scientific applications
Fortran
Business applications
COBOL
Artificial intelligence
LISP, Prolog
Systems programming
C
Web Software
HTML, PHP
Language Categories
Imperative(c, c++) Functional (LISP)
Programming Environments
A collection of tools used in software development UNIX Microsoft Visual Studio.NET
Overview of Compilation
program gcd(input, output); var i, j: integer; begin
read(i, j);
while i <> j do if i > j then i := i j; else j := j i; writeln(i) end.
Compilation
Compilation
Compilers: Translate a source (human-writable) program to an executable (machine-readable) program
Interpretation
Interpreters: Convert a source program and execute it at the same time.
Linking
Libraries of subroutines
Assembly language
Assembly language instead of machine language
Intermediate source
Intermediate source code
Programming Environments
Much more than compilers and interpreters
Assemblers, debuggers, preprocessors and linkers Editors Pretty printers Style Checkers Version management Profilers
Integrated environments
Phase of compilations
20
Compiler Structure
Lexical, syntax and semantic analyses are the front-end of a compiler
These phases serve to figure out the meaning of the program
The rest of the phases are considered part of the back-end of a compiler
They are responsible for the generation of the target program
virtual machine
System Architecture
Because VMs are separated from the physical resources they use, the host environment is often able to dynamically assign those resources among them.
Instead, the JVM creates virtualized resources which the bytecode accesses. These actions are then passed on to the machine's actual resources.
Summary
We have considered: A virtual machine (VM) is an environment, usually a program or operating system. Virtual machines have two major categories: 1. system virtual machine. 2. process virtual machine.
Summary The JVM is a virtual machine in that it executes code compiled specifically for it known as bytecode and abstracts use of resources for this bytecode.