Programming Language Hierarchy, Phases of a Java Program

Slides:



Advertisements
Similar presentations
compilers and interpreters
Advertisements

Dr. Ken Hoganson, © August 2014 Programming in R COURSE NOTES 2 Hoganson Language Translation.
Computer Concepts 5th Edition Parsons/Oja Page 546 CHAPTER 11 Software Engineering Section A PARSONS/OJA Computer Programming.
Reference Book: Modern Compiler Design by Grune, Bal, Jacobs and Langendoen Wiley 2000.
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
1 CHAPTER 4 LANGUAGE/SOFTWARE Hardware Hardware is the machine itself and its various individual equipment. It includes all mechanical, electronic.
Types of software. Sonam Dema..
COMP Computer Basics Yi Hong May 13, 2015.
1 Chapter-01 Introduction to Computers and C++ Programming.
Introduction to Java Tonga Institute of Higher Education.
High-level Languages.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Tranlators. Machine Language The lowest-level programming languageprogramming language Machine languages are the only languages understood by computers.languagescomputers.
Introduction to C++ Programming Language
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Component 4: Introduction to Information and Computer Science Unit 5: Overview of Programming Languages, Including Basic Programming Concepts Lecture 2.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 2.
Computer Programming Languages HOW COMPUTERS WORK èCIRCUITS èBINARY DIGIT èBIT (0 OR 1) èBYTE - 8 BITS èASCII.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Compilers and Interpreters. HARDWARE Machine LanguageAssembly Language High Level Language C++ Visual Basic JAVA Humans.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
Analysis of Programming Languages (2). 2 LANGUAGE DESIGN CONSTRAINTS  Computer architecture  Technical setting  Standards  Legacy systems.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Compilers and Interpreters
OCR A Level F453: The function and purpose of translators Translators a. describe the need for, and use of, translators to convert source code.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Chapter 1Java: an Introduction to Computer Science & Programming - Walter Savitch 1 Chapter 1 l Background information »important regardless of programming.
Introduction to Computers and Programming
CIS 234: Object-Oriented Programming with Java
Computer Language
Evolution and History of Programming Languages
Computer Basics Computer system: hardware + software
Computer Systems Nat 5 Computing Science
Topic 2: Hardware and Software
Why don’t programmers have to program in machine code?
Computer Organization
Visit for more Learning Resources
Overview of Compilers and Language Translation
Compiler, Interpreter, and Bootstrapping
Introduction to programming
Operating System Interface between a user and the computer hardware
Programming languages
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Lecture 1: Introduction to JAVA
LESSON 1 Introduction to Programming Language
Computer Systems Nat 5 Computing Science
CS101 Introduction to Computing Lecture 19 Programming Languages
Introduction to Computers and Java
Chapter 4 Computer Software.
Assembler, Compiler, Interpreter
Programming Languages
Mobile Development Workshop
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Advanced Programming: C# Lecture 01: Introduction
High Level Programming Languages
Lesson Objectives Aims Key Words Compiler, interpreter, assembler
CMP 131 Introduction to Computer Programming
Assembler, Compiler, Interpreter
Programming Language Basics
Chapter 1 Introduction.
Dept. of Computer & Information Sciences (Course Introduction)
Programming language translators
Dasar-Dasar Pemrograman 2: Java Basics
Presentation transcript:

Programming Language Hierarchy, Phases of a Java Program Prepared by Neal Alfie Y. Lasta IT Lecturer

Programming Language Hierarchy High – Level Language (HLL) Assembly Language Machine Language Hardware

High-Level Language (HLL) Closest to natural language Words, numbers, and math symbols Not directly understood by hardware “portable” source code (hardware independent) Java, C, C++, COBOL, FORTRAN, BASIC, Lisp, Ada, etc.

Machine Language (lowest level) Least natural language for humans, most natural language for hardware Just 0s and 1s Directly understood by hardware Not portable (hardware dependent)

Assembly Language A more or less human readable version of machine language Words, Abbreviations, letters and numbers replace 0s and 1s Easily translated from human readable to machine executable Like machine code, not portable (hardware dependent)

Getting from Source Code to Machine Code “Compiling a program” – translating from a high-level language source code to machine (object, or executable) code “Compiler” – a program that translates HLL source code to machine (object, or executable) code “Assembly” – translating from assemble language source code to machine (object, or executable) code Assembler – a program that translates assembly source code to machine (object, or executable) code Compilers need to know the specific target hardware

Compilers vs Assemblers vs Interpreters Compilers and Assemblers Translation is a separate user step Translation is “off-line” i.e. not at run time Interpreters Another way to translate source to object code Interpretation (from source to object code) is not a separable user step Translation is “on-line” i.e. at run time

Compiler, Assembler or Interpreter Source Code object Code

Java Program Translation Both compilation and interpretation Intermediate Code: “Byte code” – similar to assembly code, but hardware independent Interpreter translates from generic byte code to hardware specific machine code

Java Byte Code The Java compiler does not translate your program into machine language for your particular computer. Instead, the Java compiler translates your Java Program into a language called byte-code. Byte-code -> the machine language for a hypothetical computer, which in this case, is called the Java Virtual Machine (JVM)

Java Virtual Machine JVM – a software implementation or runtime environment for hosting Java applications Interpreter works by translating each instruction of byte-code into machine language one after the other, rather than translating the entire byte-code program all at once Java byte-code has an extension of .class. This file can be copied to another computer and when you run your program, you do not have to recompile it anymore. That makes Java portable

Disadvantages: Requires both compiler and interpreter Slower program execution

Advantages Portability Same program can run on computers of different types (useful with the internet) Java compiler for new types of computers can be made quickly

Java Virtual Machine Data for Java Program Java Program Java Compiler Byte-Code Program Byte-Code Interpreter Machine-Language Instructions Computer Execution of Machine-Language Instructions Output of Java Program Java Virtual Machine

Phases of Java See 2.2.4 Phases of a Java Program in Book