BIT 1003 - Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.

Slides:



Advertisements
Similar presentations
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Advertisements

Programming Creating programs that run on your PC
Overview of Programming Paradigms
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
The Analytical Engine Module 6 Program Translation.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Computers: Tools for an Information Age
Programming Languages Structure
Chapter 9: The Tower of Babel
Development of Computer - Story of Steve. What is a computer A high intelligence machine A tool – make our life much convenient A very loyal servant Pretty.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Introduction to Programming Programming. COMP102 Prog. Fundamentals I: Introduction / Slide 2 Objectives l To learn fundamental problem solving techniques.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Concepts of Programming Languages Chapter 1.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
CS102 Introduction to Computer Programming
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Programming Languages Lecture 12. What is Programming?  The process of telling the computer what to do  Also known as coding.
 Define a problem  Prepare sequence of instructions for the computer to execute  Verify that the program works as expected.
Introduction to Computer Programming itc-314
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
1Object-Oriented Program Development Using C++ Computer Science and Programming Languages Computers are ubiquitous Computer literacy is essential Computer.
High-level Languages.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Computer programming.
Instruction Set Architecture
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Programming: A Brief History. Introduction Five Generations of Programming Languages Gets closer to representing data in human terms Requires additional.
L Ch5: Software Review Learning Objectives
1 History of compiler development 1953 IBM develops the 701 EDPM (Electronic Data Processing Machine), the first general purpose computer, built as a “defense.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number.
Programming Languages 1.07a.  A computer program is a series of instructions that direct a computer to perform a certain task.  A programming language.
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.
The Teacher Computing Computer Languages [Computing]
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
CSC425 - Introduction To Computer Programming 1. 2 Generation Of Programming Languages A set of rules that telling a computer what to do. There are over.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
A language which is acceptable to a computer system is called a computer language or programming language and the process of writing instructions in such.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
Programming Language 1. Programming language A programming language is a machine-readable artificial language designed to express computations that can.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
Programming Languages
Introduction to Computer Programming itc-314 Lecture 04.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
小型系統 心情 vs. 古典樂 心情 vs. 古典樂 浪漫求籤系統 美食導航系統 季潔亭雅鈺熒岱芸 美食導航系統 楊氏音樂模擬大會考人瑋 若維 芷萱 伽倩 楊氏音樂模擬大會考 麥當勞熱量計算系統 火星文困擾你嗎 ? 火星文困擾你嗎 ? 歌詞知多少 - 挑戰你的腦容量英琪 日馨 青雪 鈺娟.
Programming Languages Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
CHAPTER NINE.
Machine and Assembly Language
Why study programming languages?
Programming Languages
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Computer System and Programming
1.1 Reasons to study concepts of PLs
Compiler Construction
Principles of Programming Languages
Presentation transcript:

BIT Presentation 6

Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES FUNCTIONAL LANGUAGES LANGUAGE DESIGN LANGUAGE SYNTAX AND SEMANTICS 2

GENERATIONS OF LANGUAGES Each computer is wired to perform certain operations in response to instructions. An instruction is a pattern of ones and zeros stored in a word of computer memory. By the way, a “word” of memory is the basic unit of storage for a computer. A 16-bit computer has a word size of 16 bits, or two bytes. A 32-bit computer has a word size of 32 bits, or four bytes. A 64-bit computer has a word size of 64 bits, or eight bytes. When a computer accesses memory, it usually stores or retrieves a word of information at a time. 3

instruction set - architecture Each computer is wired to interpret a finite set of instructions. Most machines today have 75 to 150 instructions in the machine “instruction set.” Much of the “architecture” of a computer design is reflected in the instruction set, and the instruction sets for different architectures are different. For example, the instruction set for the Intel Pentium computer is different from the instruction set for the Sun SPARC. 4

The earliest computers They were programmed directly in the machine instruction set. The programmer worked with ones and zeros to code each instruction. As an example, here is code (and an explanation of each instruction), for a particular 16-bit computer (Load the A-register from 64) (Add the contents of 65) (Store the A-register in 66) 5

Assembly languages An early improvement in programming productivity was the assembler. Assembly languages are called second-generation languages. An assembler can read mnemonics (letters and numbers) for the machine instructions, and for each mnemonic generate the machine language in ones and zeros. 6

These are typical of such mnemonics: LDA m ADA m ALS SSA JMP m Load the A-register from memory location m. Add the contents of memory location m to the contents of the A- register, and leave the sum in the A-register. A Left Shift; shift the bits in the A-register left 1 bit, and make the least significant bit zero. Skip on Sign of A; if the most significant bit in the A-register is 1, skip the next instruction, otherwise execute the next instruction. Jump to address m for the next instruction. 7

FORTRAN In 1954 the world saw the first third-generation language. The language was FORTRAN, devised by John Backus of IBM. FORTRAN stands for FORmula TRANslation. example: X = Y + Z 8

procedural language FORTRAN is a “procedural language”. The computer is a flexible tool, and the programmer’s job is to lay out the sequence of steps necessary to accomplish the task. The program is like a recipe that the computer will follow mechanically. 9

LISP (for LISt Processing) In 1958, John McCarthy at MIT developed a very different type of language. It is a particularly good language for working with lists of numbers, words, and objects, and it has been widely used in artificial intelligence (AI) work. In mathematics, a function takes arguments and returns a value. LISP works the same way, and LISP is called a “functional language” example: (+ 2 5) 10

Cobol (COmmercial and Business- Oriented Language) In 1959 a consortium of six computer manufacturers and three US government agencies released Cobol as the computing language for business applications. Cobol, like FORTRAN, is an imperative, procedural language. To make the code more self-documenting, Cobol was designed to be a remarkably “wordy” language. The following line adds two numbers and stores the result in a third variable: ADD Y, Z GIVING X. 11

PL/1 and BASIC Both PL/1 and BASIC were introduced in These, too, are procedural, imperative languages. IBM designed PL/1 with the plan of “unifying” scientific and commercial programming. PL/1 was part of the IBM 360 project, and PL/1 was intended to supplant both FORTRAN and Cobol 12

BASIC (Beginner’s All-purpose Symbolic Instruction Code) BASIC was designed at Dartmouth by professors Kemeny and Kurtz as a simple language for beginners. Over time, however, an almost countless number of variations of BASIC have been created, and some are very rich in programming power. Microsoft’s Visual Basic, for example, is a powerful language rich in modern features. 13

C Dennis Ritchie created the very influential third- generation language C in C was developed as a language with which to write the operating system Unix, and the popularity of C and Unix rose together. C is also an imperative programming language. An important part of C’s appeal is its ability to perform low-level manipulations, such as manipulations of individual bits, from a high-level language. 14

Smalltalk During the 1970s, the language Smalltalk popularized the ideas of object-oriented programming. Object-oriented languages are another subcategory of imperative languages. Both procedural and object-oriented languages are imperative languages. The difference is that object-oriented languages support object-oriented programming practices such as inheritance, encapsulation, and polymorphism. 15

C++ In the mid-1980s, Bjarne Stroustrup, at Cambridge University in Britain, invented an object-oriented language called C++. C++ is a superset of C; any C program is also a C++ program. C++ provides a full set of object-oriented features, and at one time was called “C with classes.” 16

Java The most popular object-oriented language today is Java, which was created by James Gosling and his colleagues at Sun Microsystems. Java was released by Sun in 1994, and became an immediate hit due to its appropriateness for web applications, its rich language library, and its hardware independence. Java’s growth in use among programmers has been unprecedented for a new language. Today Java and C are the languages most frequently chosen for new work. 17