csci 4500 6500 programming languages
play

CSCI: 4500/6500 Programming Languages Origin & Evolution 1 - PDF document

CSCI: 4500/6500 Programming Languages Origin & Evolution 1 Maria Hybinette, UGA Programming Paradigm: Programming Paradigm: Imperative Declarative Not Imperative: Describes what computation should be performed and not how to


  1. CSCI: 4500/6500 Programming Languages Origin & Evolution 1 Maria Hybinette, UGA Programming Paradigm: Programming Paradigm: Imperative Declarative � � Not Imperative: Describes what computation should be performed and not how to compute it � � Imperative programming: Describes computation in terms of a � � Functional or Applicative, Programming: Treats computation as program state and statements that change the program state. � the evaluation of mathematical functions. » � Central features are variables, assignment statement and iterations � » � Reactive » � sequence of commands for the computer to perform » � emphasizes the definitions of functions rather than implementations of » � FORTRAN, Algol, Pascal, C state machines (idea is to apply functions to given parameters). » � von Neumann » � Can be done without assignment statements, and without iteration. � � Object Oriented programming: Computer program is composed » � Advantage: no side-effects of a collection of units, or objects that act on each other (instead » � Scheme, LISP, SM of a collection of functions. Each objects is capable of receiving a � � Logic programming: Defines “what” to be computed, rather than message, processing data and sending messages to other objects “how” the computation takes place. Example, in Prolog, you � � Scripting supply a database of facts and rules: and perform queries on the database. » � Goal directed: Contraints 3 4 Maria Hybinette, UGA Maria Hybinette, UGA First General Purpose Machine Ada Lovelace: First Programmer � � Charles Babbage designed the first computer, � � Worked with Babbage, the Analytical Engine, starting in 1823 never daughter of Lord Byron completed but build 100 years later � � Mathematician � � Created first program for the � � A store (memory) holding 1000 numbers Analytical Engine � � An arithmetical unit � � Assembly like language » � Plan for calculating Bernoulli � � Loops numbers � � Conditionals � � Language ADA named in her � � 3 types of punch cards (similar to ones that honor described patterns for weaving machines) » � one for arithmetical , constants, one for loads/store 5 6 Maria Hybinette, UGA Maria Hybinette, UGA

  2. Zuse’s Plankalkül : First High- Level Programming Language Grace Hoper: The First Compiler � � Formulated a language using predicate � � Mathematical PhD Yale 1934 logic (Prolog like), boolean algebra and � � Wrote first compiler, the “A” data structures for his general purpose relay computer called the Z4 (which compliler for programming survived the war) around 1942-1945, � � Co-designer of COBOL not published until 1972. First compiler implemented in 2000 5 years after (Common Business Oriented Zuse’s death. Language) the most widely � � Assignment statements, subroutines, used programming language conditional statements, iteration, floating point, hierarchical records, until recently (1959). 1960 – assertions, exceptions handling, goal compiler built. Influenced by directed execution, arrays. Flowmatic. 7 8 Maria Hybinette, UGA Maria Hybinette, UGA First Major Language: First Computer Bug? FORTRAN Photo #: NH 96566-KN (Color) � The First "Computer Bug" � � � Developed by John Backus for IBM Moth found trapped between points at Relay # 70, Panel F, of the Mark II Aiken Relay 704 (1955) Calculator while it was being tested at � � Scientific Computing Harvard University, 9 September 1945. The operators affixed the moth to the computer � � Names could have up to six log, with the entry: "First actual case of bug characters being found". They put out the word that they had "debugged" the machine, thus � � Post-test counting loop ( DO ) introducing the term "debugging a computer program". � � � Formatted I/O In 1988, the log, with the moth still taped by � � User-defined subprograms the entry, was in the Naval Surface Warfare Center Computer Museum at Dahlgren, � � Three-way selection statement Virginia. � (arithmetic IF ) Courtesy of the Naval Surface Warfare � � No data typing statements Center, Dahlgren, VA., 1988. � U.S. Naval Historical Center Photograph. � http://www.history.navy.mil/photos/images/h96000/h96566kc.htm 10 Maria Hybinette, UGA Fortran II Fortran IV � � Distributed in 1958 � � Evolved during 1960-62 » � Independent compilation » � Explicit type declarations » � Fixed the bugs » � Logical selection statement » � Subprogram names could be parameters » � ANSI standard in 1966 11 12 Maria Hybinette, UGA Maria Hybinette, UGA

  3. Fortran 77 Fortran 90 � � Became the new standard in 1978 � � Most significant changes from Fortran 77 » � Character string handling » � Modules » � Logical loop control statement » � Dynamic arrays » � IF-THEN-ELSE statement » � Pointers » � Recursion » � CASE statement » � Parameter type checking 13 14 Maria Hybinette, UGA Maria Hybinette, UGA Fortran Evaluation Functional Programming: LISP � � Highly optimizing compilers (all versions � � LISt Processing language (2 nd oldest high before 90) level programming language – FORTRAIN is oldest) » � Types and storage of all variables are fixed before run time » � Designed at MIT by McCarthy (1958) � � Dramatically changed forever the way � � AI research needed a language to computers are used » � Process data in lists (rather than arrays) » � Symbolic computation (rather than numeric) � � Only two data types: atoms and lists � � Syntax is based on Alonzo Church’s lambda calculus 15 16 Maria Hybinette, UGA Maria Hybinette, UGA Representation of Two LISP Lists LISP Evaluation � � Pioneered functional programming » � No need for variables or assignment » � 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 17 18 Maria Hybinette, UGA Maria Hybinette, UGA

  4. Scheme COMMON LISP � � Developed at MIT in mid 1970s � � An effort to combine features of several dialects of LISP into a single language � � Small � � Large, complex � � Extensive use of static scoping � � Functions as first-class entities � � Simple syntax (and small size) make it ideal for educational applications 19 20 Maria Hybinette, UGA Maria Hybinette, UGA The First Step Toward Sophistication: Early Design Process ALGOL 60 � � Environment of development � � ACM and GAMM met for four days for design (May 27 to June 1, 1958) » � FORTRAN had (barely) arrived for IBM 70x » � Many other languages were being developed, all for � � Goals of the language specific machines » � Close to mathematical notation » � No portable language; all were machine- » � Good for describing algorithms dependent » � Must be translatable to machine code » � No universal language for communicating algorithms � � ALGOL 60 was the result of efforts to design a universal language 21 22 Maria Hybinette, UGA Maria Hybinette, UGA ALGOL 58 ALGOL 58 Implementation � � Concept of type was formalized � � Not meant to be implemented, but variations � � Names could be any length of it were (MAD, JOVIAL) � � Arrays could have any number of subscripts � � Although IBM was initially enthusiastic, all � � Parameters were separated by mode (in & out) support was dropped by mid 1959 � � 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” 23 24 Maria Hybinette, UGA Maria Hybinette, UGA

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend