Introduction. A. Bellaachia Page: 1

Similar documents
2. Evolution of the Major Programming languages

Chapter 2. 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

Chapter 2. Evolution of the Major Programming Languages

Evolution of the Major Programming Languages

Chapter 2. Evolution of the Major Programming Languages ISBN

Chapter 2. Evolution of the Major Programming Languages ISBN

Chapter 2 Evolution of the Major Programming Languages Chapter 2 Topics

Chapter 2. Chapter 2

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Programming Languages, Summary CSC419; Odelia Schwartz

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Chapter 2. Evolution of the Major Programming Languages

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

Chapter 1. Preliminaries

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Concepts of Programming Languages

Programming Paradigms

Principles of Programming Languages. Lecture Outline

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Concepts in Programming Languages

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Chapter 1. Preliminaries

CSC 533: Organization of Programming Languages. Spring 2005

Chapter 5 Names, Binding, Type Checking and Scopes

Low-Level Languages. Computer Programs and Programming Languages

Imperative Programming

Chapter 1 Preliminaries

Chapter 5. Names, Bindings, and Scopes

Continuations provide a novel way to suspend and reexecute

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

What is a programming language?

Comp 333: Concepts of Programming Languages Fall 2016

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

Programming Languages 2nd edition Tucker and Noonan"

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Programmiersprachen (Programming Languages)

Chapter 5 Names, Bindings, Type Checking, and Scopes

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Why are there so many programming languages?

SOFTWARE ARCHITECTURE 6. LISP

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

LECTURE 18. Control Flow

Concepts of Programming Languages

Evolution of PL s. EECS 476, Prog. Lang. Design/ page 1

Concepts of Programming Languages

Discovering Computers 2008

Informal Semantics of Data. semantic specification names (identifiers) attributes binding declarations scope rules visibility

COSC 2P90 Programming Languages & Object-Orientation

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

R13 SET Discuss how producer-consumer problem and Dining philosopher s problem are solved using concurrency in ADA.

Final-Term Papers Solved MCQS with Reference

NOTE: Answer ANY FOUR of the following 6 sections:

Design Issues. Subroutines and Control Abstraction. Subroutines and Control Abstraction. CSC 4101: Programming Languages 1. Textbook, Chapter 8

Com S 541. Programming Languages I

Programming Languages

St. MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

INSTITUTE OF AERONAUTICAL ENGINEERING

Chapter 3:: Names, Scopes, and Bindings (cont.)

LECTURE 1. Overview and History

Chapter 3:: Names, Scopes, and Bindings (cont.)

CS 314 Principles of Programming Languages

Discovering Computers Chapter 13 Programming Languages and Program Development

Names, Bindings, Scopes

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

CS 415 Midterm Exam Spring 2002

9/7/17. Outline. Name, Scope and Binding. Names. Introduction. Names (continued) Names (continued) In Text: Chapter 5

Introduction Primitive Data Types Character String Types User-Defined Ordinal Types Array Types. Record Types. Pointer and Reference Types

Chapter 6 Control Flow. June 9, 2015

Programming Language Pragmatics

Lecture 2. A Historical View

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Functional Programming. Big Picture. Design of Programming Languages

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

Page # CSCI: 4500/6500 Programming Languages. Programming Paradigm: Imperative. Programming Paradigm: Declarative. First General Purpose Machine

Control Structures. Outline. In Text: Chapter 8. Control structures Selection. Iteration. Gotos Guarded statements. One-way Two-way Multi-way

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

Chapter 11 :: Functional Languages

Why learn Computer Programming? Computer-based problem solving in Science and Engineering. Why learn Fortran? Elementary Computer Organization

COMP 201: Principles of Programming

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

Languages october 22, 2017 Éric Lévénez < FORTRAN III end-1958 FORTRAN II FORTRAN I october 1956

Software II: Principles of Programming Languages. Why Expressions?

CS2303 C14 Systems Programming Concepts. Bob Kinicki

Introduction to Scientific Computing Languages

A brief survey of programming languages: motivation and design/ continued. Lecture 3. Even more, Algol, Cobol. Are they really different?

CSE 307: Principles of Programming Languages

Lecture 1: Course Introduction

Programming Language Concepts 1982, 1987, Outline. Period

Introduction to Scientific Computing Languages

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

Introduction to Programming Languages. CSE 307 Principles of Programming Languages Stony Brook University

Transcription:

Introduction 1. Objectives... 2 2. Why are there so many programming languages?... 2 3. What makes a language successful?... 2 4. Programming Domains... 3 5. Language and Computer Architecture... 4 6. Types of Languages... 4 7. Compilation vs. Interpretation... 5 8. Phase of Compilation (From Scott s class notes)... 7 9. Language Evaluation... 8 10. Genealogy of common high-level programming languages... 9 11. Fortran... 10 12. Lisp-1959... 11 13. ALGOL 58 and 60... 12 14. Cobol... 13 15. PL/I... 14 16. Ada... 15 17. C++... 16 18. Java... 16 19. Python... 17 A. Bellaachia Page: 1

1. Objectives Increased capacity to express programming concepts Improved background for choosing appropriate languages Increased ability to learn new languages Understanding the significance of implementation Increased ability to design new languages Overall advancement of computing 2. Why are there so many programming languages? We are trying to improve previous languages For certain domains of applications For specific hardware Don t agree with the ways certain programming constructs are implemented in certain languages 3. What makes a language successful? Easy to learn (BASIC, Pascal, LOGO, Scheme) Familiarity: The language looks like the one I know. Easy to use A. Bellaachia Page: 2

Easy to implement (BASIC, Forth) possible to compile to very good (fast/small) code (Fortran) Who is pushing the language? (COBOL, PL/1, Ada, Visual Basic) Popularity (Pascal, Java) Are the supporters of Ruby and Python trying to push Java to die? Read this article: The Secret of a Successful Programming Language? A Really Great Beard (http://www.wired.com/2012/06/beard-gallery/) 4. Programming Domains Scientific applications Business applications Artificial intelligence Systems programming Scripting languages Special purpose languages A. Bellaachia Page: 3

5. Language and Computer Architecture Most conventional programming languages can be viewed as abstraction of an underlying Von Neumann architecture: I/O Memory: Store both data and instructions Fetch CPU Decode Execute The execution of the following expression: x = a + b; R1 a b R2 Adder R3 x 6. Types of Languages Imperative or procedural: Procedures are the main thing Functional: Everything is a function call Abstract Data Types: Like Ada packages Module-Based: C Program Modules Object-Oriented: C++/Java Classes Generic: Like Ada Generics/C++ Templates Declarative: A. Bellaachia Page: 4

o Functional programming languages o Logic programming languages Imperative/ Algorithmic Algol Cobol PL/1 Ada C Modula-3 Functional Programming Lisp Haskell ML Miranda APL Declarative Logic Programming Prolog Object-Oriented Smalltalk Simula C++ Java 7. Compilation vs. Interpretation Pure Compilation o The compiler translates the high-level source program into an equivalent target program (typically in machine language). Source Code Compiler Target Program Input(s) Target Program Output(s) Code o Most compilers produce an intermediate set of virtual instructions, also known as P-code. o Other Language translate the source code to another source code: Early C++ implementations generates an intermediate program in C, instead of an assembly language A. Bellaachia Page: 5

Pure Interpretation o Interpreter stays around for the execution of the program o Interpreter is the locus of control during execution Source Code Input(s) Interpreter Output(s) Code Mixing Compiler & Interpreter: o Some languages are semi-compiled like Java & C# Source Code Intermediate Program Code Input(s) Translator Virtual machine Intermediate Program Code Output(s) Code A. Bellaachia Page: 6

8. Phase of Compilation (From Scott s class notes) A. Bellaachia Page: 7

9. Language Evaluation Overall simplicity: Readability, Writability Orthogonality: Readability Support for abstraction: Writability Expressivity: Writability Reliability o Type checking: o Exception handling Maintainability o Factoring: The ability to group related features into a single unit. Use subroutines to group related computations units so they can be re-used in different parts of the application. o Locality: The ability to implement information hiding so that changes to a grouping (either control or data) are transparent. Cost o Programmer training o Software creation o Compilation o Execution o Compiler cost o Poor reliability o Maintenance Others: portability and generality A. Bellaachia Page: 8

10. Genealogy of common high-level programming languages A. Bellaachia Page: 9

11. Fortran Impact of environment on design of FORTRAN I No need for dynamic storage Need good array handling and counting loops No string handling, decimal arithmetic, or powerful input/output (commercial stuff) First implemented version of FORTRAN Names could have up to six characters Posttest counting loop (DO) Formatted i/o User-defined subprograms Three-way selection statement (arithmetic IF) No data typing statements No separate compilation Compiler released in April 1957, after 18 worker/years of effort Programs larger than 400 lines rarely compiled correctly, mainly due to poor reliability of the 704 Code was very fast Quickly became widely usedfortran II - 1958 Independent compilation Fix the bugsfortran IV - 1960-62Explicit type declarations Logical selection statement Subprogram names could be parameters ANSI standard in 1966 FORTRAN 77-1978Character string handling Logical loop control statement IF-THEN-ELSE statement FORTRAN 90-1990Modules Dynamic arrays A. Bellaachia Page: 10

Pointers Recursion CASE statement Parameter type checking FORTRAN Evaluation Dramatically changed forever the way computers are used 12. Lisp-1959 LISt Processing language (Designed at MIT by McCarthy)AI research needed a language that:process data in lists (rather than arrays) 2. Symbolic computation (rather than numeric) Only two data types: atoms and lists Syntax is based on lambda calculus Pioneered functional programmingno need for variables or assignment o Control via recursion and conditional expressions Still the dominant language for AI COMMON LISP and Scheme are contemporary dialects of LISP ML, Miranda, and Haskell are related languages A. Bellaachia Page: 11

13. ALGOL 58 and 60 Genealogy of ALGOL 60 Environment of development: 1. FORTRAN had (barely) arrived for IBM 70x 2. Many other languages were being developed, all for specific machines 3. No portable language; all were machine-dependent 4. No universal language for communicating algorithms Goals of the language: Close to mathematical notationgood for describing algorithmsmust be translatable to machine code ALGOL 58 Language Features: Concept of type was formalized Names could have any length Arrays could have any number of subscripts Parameters were separated by mode (in & out) Subscripts were placed in brackets Compound statements (begin... end) Semicolon as a statement separator Assignment operator was := if had an else-if clause no i/o - would make it machine dependent A. Bellaachia Page: 12

ALGOL 60 Modified ALGOL 58 at 6-day meeting in Paris New Features: o Block structure (local scope) o Two parameter passing methods o Subprogram recursion o Stack-dynamic arrays Still no i/o and no string handling Successes: o It was the standard way to publish algorithms o for over 20 years o All subsequent imperative languages are o based on it o First machine-independent language o First language whose syntax was formally defined (BNF) Failure: o Never widely used, especially in U.S. o Reasons: 1. No i/o and the character set made programs non-portable 2. Too flexible--hard to implement 3. Lack of support of IBM 14. Cobol First Design Meeting (Pentagon) - May 1959 o Design goals: 1. Must look like simple English 2. Must be easy to use, even if that means it will be less powerful 3. Must broaden the base of computer users A. Bellaachia Page: 13

4. Must not be biased by current compiler problems o Design committee members were all from computer manufacturers and DoD branches o Design Problems: 1. Arithmetic expressions? 2. Subscripts? 3. Fights among manufacturers Contributions: o First macro facility in a high-level language o Hierarchical data structures (records) o Nested selection statements o Long names (up to 30 characters), with hyphens o Separate data division Comments: o First language required by DoD; would have failed without DoD o Still the most widely used business applications language 15. PL/I Genealogy of PL/I Goals: o Scientific users began to need more elaborate i/o, like COBOL had; A. Bellaachia Page: 14

o Business users began to need fl. pt. and arrays (MIS) o Design a new language to do both kinds of applications. Designed by IBM in five months by the 3 X 3 Committee PL/I contributions: 1. First unit-level concurrency 2. First exception handling 3. First pointer data type 4. First array cross sections Comments: o Many new features were poorly designed o Too large and too complex o Was (and still is) actually used for both scientific and business applications 16. Ada Huge design effort, involving hundreds of people, much money, and about eight years. Environment: More than 450 different languages being used for DOD embedded systems (no software reuse and no development tools) Contributions: 1. Packages - support for data abstraction 2. Exception handling - elaborate 3. Generic program units 4. Concurrency - through the tasking model Comments: o Included all that was then known about software engineering and language design A. Bellaachia Page: 15

o First compilers were very difficult; the first really usable compiler came nearly five years after the language design was completed Ada 95 (began in 1988) o Support for OOP through type derivation o Better control mechanisms for shared data (new concurrency features) o More flexible libraries 17. C++ Developed at Bell Labs by Stroustrup Evolved from C and SIMULA 67 Facilities for object-oriented programming, taken partially from SIMULA 67, were added to C Also has exception handling A large and complex language, in part because it supports both procedural and OO programming Rapidly grew in popularity, along with OOP ANSI standard approved in November, 1997 18. Java Developed at Sun in the early 1990s Based on C++ Significantly simplified (does not include struct, union, enum, pointer arithmetic, and half of the assignment coercions of C++) Supports only OOP Has references, but not pointers Includes support for applets and a form of concurrency A. Bellaachia Page: 16

19. Python Visit: https://www.python.org/ Invented in the Netherlands, early 90s by Guido van Rossum Open sourced from the beginning Considered a scripting language, but is much more Scalable, object oriented and functional from the beginning Used by Google from the beginning Translation to bytecode (like Java) Dynamic typing (like LISP) Higher-order function (LISP, ML) Garbage-collected, no ptrs (LISP, SNOBOL4) A. Bellaachia Page: 17