Chapter 9: The Tower of Babel 國立雲林科技大學 資訊工程研究所 張傳育 (Chuan-Yu Chang ) 博士 Office: ES 709 TEL: 05-5342601 ext. 4337 國立雲林科技大學.

Slides:



Advertisements
Similar presentations
Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Advertisements

Computers Are Your Future
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
Computers: Tools for an Information Age
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Fourth Edition Additions by S. Steinfadt for SP08.
Programming Languages Structure
Chapter 9: The Tower of Babel Invitation to Computer Science, Java Version, Third Edition.
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Fourth Edition Editied / additions by S. Steinfadt for SP09.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Chapter 9: The Tower of Babel
Chapter 8 The Tower of Babel. Chapter Outline Procedural languages Fortran, COBOL, PASCAL, C, Ada Object-oriented programming Special-purpose languages.
Alternative Programming Paradigms
© Prentice Hall CHAPTER 3 Computer Software.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Building Applications.
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 
INTRODUCTION TO WEB DATABASE PROGRAMMING
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter Lead Black Slide Powered by DeSiaMore Powered by DeSiaMore.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
CS 355 – Programming Languages
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
Invitation to Computer Science 5 th Edition Chapter 9 Introduction to High-Level Language Programming.
High-Level Programming Languages: C++
Microsoft Visual Basic 2005: Reloaded Second Edition
Chapter 9: The Tower of Babel Invitation to Computer Science, C++ Version, Third Edition.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
COMPUTER PROGRAMMING Source: Computing Concepts (the I-series) by Haag, Cummings, and Rhea, McGraw-Hill/Irwin, 2002.
4 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
CS 363 Comparative Programming Languages
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 1 – Car Payment Calculator and Guess the Number.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
Machine Languages It is the only language the computer understands. It is made of 0s and 1s. They must be in 0s and 1s because the internal circuit of.
Visual C++ Programming: Concepts and Projects
Chapter 3: Computer Software. Stored Program Concept v The concept of preparing a precise list of exactly what the computer is to do (this list is called.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Discovering Computers 2009 Chapter 13 Programming Languages and Program Development.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 5 Information System Software.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Invitation to Computer Science 5th Edition
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
JavaScript Defined JavaScript Basics Definitions JavaScript is an object-oriented programming language designed for the world wide web. JavaScript code.
 2001 Prentice Hall, Inc. All rights reserved. Chapter 1 – Introduction to Computers, the Internet and the World Wide Web Outline 1.1Introduction 1.2What.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Course Instructor: Hira Farman Course : BY:HIRA FARMAN.
Invitation to Computer Science, Java Version, Second Edition 1 Logic Programming Logic programming  Various facts are asserted to be true  On the basis.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Invitation to Computer Science 6 th Edition Chapter 10 The Tower of Babel.
Chapter 11  Getting ready to program  Hardware Model  Software Model  Programming Languages  Facts about C++  Program Development Process  The Hello-world.
Software Design and Development Languages and Environments Computing Science.
Introduction to computer programming
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Website Source Code Free Download.
Concepts of Programming Languages
Concepts of Programming Languages
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Introduction of Programming Languages
Developing Applications
Chapter 10 The Tower of Babel.
Programming Languages 2nd edition Tucker and Noonan
High Level Programming Languages
Introduction to Computer Programming
Principles of Programming Languages
Presentation transcript:

Chapter 9: The Tower of Babel 國立雲林科技大學 資訊工程研究所 張傳育 (Chuan-Yu Chang ) 博士 Office: ES 709 TEL: ext 國立雲林科技大學 資訊工程研究所 張傳育 (Chuan-Yu Chang ) 博士 Office: ES 709 TEL: ext

2 Objectives In this chapter, you will learn about: Procedural languages Special-purpose languages Alternative programming paradigms

3 Why Babel? Story of Tower of Babel A biblical story about people suddenly starting to speak different languages and no longer being able to communicate with each other Multiple programming languages Each language designed for specific needs One language may be better suited than others for writing certain kinds of programs

4 Procedural Languages Also called imperative languages A program consists of sequences of statements that manipulate data items They change the contents of memory cells. The programmer devises the step by step sequence of “imperative commands” Procedural languages follow directly from the Von Neumann architecture, (an architecture characterized by sequential fetch-decode-execute cycles.) All procedural languages that tell the computer in a step by step fashion how to manipulate the contents of memory locations.

5 FORTRAN FORTRAN is from FORmula TRANslation Developed in the mid-1950s by a group at IBM headed by John Backus First high-level programming language Remains an effective language for engineering applications

6 FORTRAN (continued) Designed for numerical computations Allows concise mathematical notation and a number of mathematical functions Another goal: optimize the object code External libraries of code modules that are separately compiled and used by a program

7 COBOL COBOL derives from COmmon Business- Oriented Language Developed in 1959–1960 by a group headed by Grace Hopper of the U.S. Navy Designed to serve business needs such as managing inventories and payrolls Better for file input than keyboard input The “master file” would be updated from the “transaction file” on a daily or weekly basis.

8 COBOL (continued) Much of a COBOL program may be concerned with formatting Particular attention was paid to input formatting for data being read from files and to output formatting both for writing data to a file and for generating business reports. Described by “PICTURE clauses” in the program COBOL programs More verbose than other languages In C++: sum = a + b ; In COBOL: ADD A To B GIVING SUM Highly portable

9 COBOL (continued) COBOL programs Easy to read Well-suited for manipulating large data files Still the most widely used language

10 C/C++ C Developed in the early 1970s by Dennis Ritchie at AT&T Bell Laboratories Originally designed for systems programming (UNIX) Most widely used language for system software Also used for general-purpose computing

11 C/C++ (continued) Why is C so popular Relationship between C and UNIX C’s efficiency C is close to assembly language Has high-level statements Portability

12 Figure 9.1 User Hardware Interface and Programming Languages

13 C/C++ (continued) C++ Developed in the early 1980s by Bjarne Stroustrup at AT&T Bell Laboratories A “superset” of C One of the most popular modern “industrial- strength” languages, because of Standardization Object-orientation A strong collection of library code

14 Ada Mid-1970s: Branches of the U. S. armed services started to develop a common high-level programming language Efficiency, reliability, readability, and maintainability. Straw-man, Wooden man, Tin-man, Iron man, Steel man 1979: winner of design competition Ada 95 Reference Manual Current international standard exists

15 Ada (continued) Ada Provides multiprocessing capability Strongly object-oriented Still used today in Transportation industry Safety monitoring systems at nuclear reactors Financial and communication systems

16 Java 1995 Java program Application Standalone program Applet Small application Web Browser Bytecode Java bytecode interpreter

17 C# and.NET C# Introduced in June 2000 Many improvements in safe usage over C++ Shares many features with Java MSIL (Microsoft Intermediate Language) JIT (Just In Time)

18 C# and.NET (continued) Microsoft.NET Framework Supports C# and other languages Facilitates ease of development Traditional text-based applications GUI applications Web-based programs

19 C# and.NET (continued).NET programs are highly portable.NET programs are compiled into Microsoft Intermediate Language (MSIL) MSIL is not tied to any particular platform Just In Time compiler or JIT Compiles MSIL code into object code on the user’s machine

20 Special-purpose Languages Designed for one specialized task Examples: SQL HTML JavaScript

21 SQL SQL: Structured Query Language A database stores data Databases can be queried: the user can pose questions to the database SQL is the language used to frame database queries Example: SELECT NAME FROM VENDOR WHERE PURCHASE>40000

22 HTML HTML: HyperText Markup Language HTML is the language used to create HTML documents Web page An HTML document viewed with Web browser software

23 HTML (continued) An HTML document Consists of text displayed on the Web page and tags The overall format for an HTML document is stuff to go in the title bar stuff to go on the page Tags are special characters Formatting Special effects References to other HTML documents

24 Figure 9.4: HTML Code for a Web Page

25 Figure 9.5 Body of the Web Page Generated by Figure 9.4

26 Figure 9.6 Some HTML Tags

27 JavaScript JavaScript is a scripting language Scripting language A “lightweight” language that is Interpreted (translated/executed, statement by statement) Code fragments can be embedded in Web pages to make those pages active

28 Alternative Programming Paradigms A paradigm A model or mental framework for representing or thinking about something The paradigm of procedural programming languages A sequence of detailed instructions is provided to the computer

29 Alternative Programming Paradigms (continued) The paradigm of procedural programming languages (continued) Each instruction accesses or modifies the contents of a memory location Computer carries out the instructions one at a time, resulting in the solution to the problem

30 Alternative Programming Paradigms (continued) Alternative paradigms for programming languages Viewing a program’s actions as A combination of various transformations upon items (functional programming) A series of logical deductions from known facts (logic programming) Multiple copies of same subtask or multiple subtasks of same problem being performed simultaneously by different processors (parallel programming)

31 Functional Programming 1958: LISP (LISt Processing) language designed by John McCarthy at MIT Scheme A functional programming language derived from LISP in the late 1970s A functional programming language views every task in terms of functions

32 Functional Programming (continued) In a functional programming language Primitive functions are part of the language Other functions can be defined and named by the programmer Once defined, functions can be used in the definition of other functions Functional programming languages sometimes called applicative languages

33 Functional Programming (continued) (define (double x) ( * 2 x)) 2x (double 4)  8 (define (square x)) ( *x x) X^2 (square 3)  9 (define (polynomial x) (double (square x))) (polynomial 3)  18

34 Figure 9.9 Scheme Program to Add Nonnegative Integers

35 Functional Programming (continued) Functional languages offer another layer of abstraction: mathematics Functions are described mathematically by what they do to an item of data rather than by how they modify memory cells Possibility of “side effects” is eliminated

36 Logic Programming Logic programming Various facts are asserted to be true On the basis of these facts, a logic program can infer or deduce other facts A query can be posed to the program The program applies logical deductions to answer the query Logic programming languages are sometimes called declarative languages

37 Logic Programming (continued) Logic programming has been used to write expert systems Prolog (PROgramming in LOGic) Developed in France at the University of Marseilles in 1972 by a group headed by A. Colmerauer

38 Logic Programming (continued) Prolog programs Consist of “facts” and “rules” A fact expresses a property about a single object or a relationship among several objects A rule is a declaration of an “if A then B” form We interact with the program by posing queries

39 Figure 9.10 A Prolog Program

40 Logic Programming (continued) Logic programming paradigm The program is a knowledge base of facts and rules about a certain domain of interest Interaction with the program: posing queries to an inference engine (also called a query interpreter)

41 Figure 9.11 The Logic Programming Paradigm

42 Parallel Programming SIMD (single instruction stream/multiple data stream) A single control unit broadcasts a single program instruction to multiple ALUs Each ALU carries out that instruction on its own local data stored in its local memory

43 Parallel Programming (continued) MIMD (multiple instruction stream/multiple data stream) Numerous interconnected processors execute their own programs on their own data, communicating results as necessary Variations of parallel processing Divide-and-conquer approach to MIMD parallel processing Neural networks

44 Figure 9.13 An Example of MIMD Parallel Processing

45 Summary Each programming language was designed to meet specific needs Procedural programming languages: FORTRAN, COBOL, C, Ada, Java, C++, C#, Visual Basic Special-purpose languages: SQL, HTML, JavaScript A functional programming language views every task in terms of functions

46 Summary Logic programming: various facts are asserted to be true, based on whether the program infers or deduces other facts Parallel programming SIMD (single instruction stream/multiple data stream) MIMD (multiple instruction stream/multiple data stream)