Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

The Evolution of Programming Languages: From Prolog to Java, Slides of Advanced Computer Programming

An in-depth exploration of the history and development of three influential programming languages: prolog, ml, and java. Discover how these languages emerged, influenced mathematics and computing, and shaped modern programming. Learn about their creators, key features, and impact on the field.

Typology: Slides

2012/2013

Uploaded on 04/18/2013

palvani
palvani 🇮🇳

4.5

(2)

86 documents

1 / 66

Toggle sidebar

Related documents


Partial preview of the text

Download The Evolution of Programming Languages: From Prolog to Java and more Slides Advanced Computer Programming in PDF only on Docsity! The History Of Programming Languages Chapter Twenty-Four Modern Programming Languages, 2nd ed. 1 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 2 Docsity.com A Babylonian Program  Written language to describe computational procedures: Chapter Twenty-Four Modern Programming Languages, 2nd ed. 5 A cistern. The length equals the height. A certain volume of dirt has been excavated. The cross-sectional area plus this volume comes to 1,10. The length is 30. What is the width? You should multiply the length, 30, by … Translation by Donald Knuth Docsity.com Programming Language  No variables  Instead, numbers serve as a running example of the procedure being described  “This is the procedure”  Programming is among the earliest uses to which written language was put Chapter Twenty-Four Modern Programming Languages, 2nd ed. 6 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 7 Docsity.com Algorithms  The original is lost  Latin translation: Algorthmi de numero Indorum  Algorithms for computing with Hindu numerals: base-10 positional system with 0  A new technology (data structure and algorithms)  Strongly influenced medieval European mathematics Chapter Twenty-Four Modern Programming Languages, 2nd ed. 10 Docsity.com Other Early Written Algorithms  Euclid, 300 BC: an algorithm for computing the GCD of two numbers  Alexander de Villa Dei, 1220 AD: Canto de Algorismo, algorithms in Latin verse  Not programming languages: natural language (even poetry) plus mathematics Chapter Twenty-Four Modern Programming Languages, 2nd ed. 11 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 12 Docsity.com Analytical Engine  Processing unit (the Mill)  Memory (the Store)  Programmable (punched cards)  Iteration, conditional branching, pipelining, many I/O devices Chapter Twenty-Four Modern Programming Languages, 2nd ed. 15 Docsity.com Sketch of the Analytical Engine  A paper by Luigi Menabrea  Published 1843  Translated, with explanatory notes, by A.A.L.  Algorithms in a real programming language: the machine language of punched cards for the Analytical Engine Chapter Twenty-Four Modern Programming Languages, 2nd ed. 16 Docsity.com Not Just For Numbers Chapter Twenty-Four Modern Programming Languages, 2nd ed. 17 The bounds of arithmetic were however outstepped the moment the idea of applying the cards had occurred; and the Analytical Engine does not occupy common ground with mere "calculating machines." … In enabling mechanism to combine together general symbols in successions of unlimited variety and extent, a uniting link is established between the operations of matter and the abstract mental processes of the most abstract branch of mathematical science. A.A.L. Docsity.com Early Development  More computers: – Z2 experimented with relays for the ALU – Z3: all-relay technology (the first electronic programmable digital computer) – Z4: envisioned as a commercial system  Most designs and prototypes destroyed in the war  1945: Zuse flees Berlin with wife and Z4 Chapter Twenty-Four Modern Programming Languages, 2nd ed. 20 Docsity.com Plankalkül  In 1945/46, Zuse completed the design of a programming language: the Plankalkül  Many advanced ideas: – Assignment, expressions, subscripts – Constructed types: from primitive (bit) other types are constructed: integers, reals, arrays, etc. – Conditional execution, loops, subroutines – Assertions  Many example programs: sorting, graphs, numeric algorithms, syntax analysis, chess Chapter Twenty-Four Modern Programming Languages, 2nd ed. 21 Docsity.com The Notation  Main line with three underneath: – V: variable number – K: subscript – S: optional comment (showing types)  V0[Z1]+=1 looks like: Chapter Twenty-Four Modern Programming Languages, 2nd ed. 22 V Z + 1 ⇒ V Z V 0 1 0 1 K S m×1·n 1·n 1·n m×1·n 1·n Docsity.com The Labor Of Programming  Programming has always been hard  In the early days of large-scale digital computers, it was labor-intensive  Hard to appreciate now, how much tedious work was involved then Chapter Twenty-Four Modern Programming Languages, 2nd ed. 25 Docsity.com The Good Old Days Chapter Twenty-Four Modern Programming Languages, 2nd ed. 26 In the early years of programming languages, the most frequent phrase we heard was that the only way to program a computer was in octal. Of course a few years later a few people admitted that maybe you could use assembly language…. I have here a copy of the manual for Mark I. I think most of you would be totally flabbergasted if you were faced with programming a computer, using a Mark I manual. All it gives you are the codes. From there on you're on your own to write a program. We were not programmers in those days. The word had not yet come over from England. We were "coders." Rear Admiral Dr. Grace Murray Hopper Docsity.com Wish List  Floating point: coders had to keep track of the exponent manually (Babylonian style)  Relative addressing: coders kept notebooks of subroutines, but the codes had to be adjusted by hand for the absolute addresses  Array subscripting help  Something easier to remember than octal opcodes Chapter Twenty-Four Modern Programming Languages, 2nd ed. 27 Docsity.com Separate Compilation  First Fortran: no separate compilation  Compiling “large” programs – a few hundred lines – was impractical, since compilation time approached 704 MTTF  Fortran II added separate compilation  Later Fortrans evolved with platform independence: no more PAUSE statement! Chapter Twenty-Four Modern Programming Languages, 2nd ed. 30 I don’t know what the language of the year 2000 will look like, but I know it will be called FORTRAN. C.A.R. Hoare, 1982 Docsity.com Fortran’s Influence  Many languages followed, but all designers learned from Fortran  Fortran team pioneered many techniques of scanning, parsing, register allocation, code generation, and optimization Chapter Twenty-Four Modern Programming Languages, 2nd ed. 31 Docsity.com John Backus  Many contributions to programming languages: Fortran, Algol 58 and 60, BNF, FP (a purely functional language) Chapter Twenty-Four Modern Programming Languages, 2nd ed. 32 My point is this: while it was perhaps natural and inevitable that languages like FORTRAN and its successors should have developed out of the concept of the von Neumann computer as they did, the fact that such languages have dominated our thinking for twenty years is unfortunate. It is unfortunate because their long-standing familiarity will make it hard for us to understand and adopt new programming styles which one day will offer far greater intellectual and computation power. John Backus, 1978 Docsity.com Early AI Language Efforts  An IBM group (consulting McCarthy) developed FLPL: Fortran List Processing Language  McCarthy had a wish list, developed while writing AI programs (chess and differential calculus) – Conditional expressions – Recursion – Higher-order functions (like ML’s map) – Garbage collection  FLPL wasn’t the answer for McCarthy’s group at MIT in 1958… Chapter Twenty-Four Modern Programming Languages, 2nd ed. 35 Docsity.com Lisp’s Unusual Syntax  A Lisp program is a list representing an AST: (+ a (* b c))  The plan was to use some Fortran-like notation  But McCarthy wrote a paper showing a simple Lisp interpreter in Lisp: a function called eval  To avoid syntax issues, he used the list-AST form, both for eval’s input and for eval itself  This eval, hand-translated into assembly language, became the first implementation of Lisp Chapter Twenty-Four Modern Programming Languages, 2nd ed. 36 Docsity.com Lisp’s Unusual Syntax  The group never gave up the idea of compiling from some Fortran-like syntax  But they never got around to it either  In later years, people often tried to compile Lisp from a Fortran- or Algol-like syntax  None of them caught on  There are advantages to having programs and data use the same syntax, as we saw with Prolog Chapter Twenty-Four Modern Programming Languages, 2nd ed. 37 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 40 Docsity.com Algol  In 1957, languages were proliferating – In the US, computer manufacturers were developing platform-specific languages like IBM’s Fortran – In Europe, a number of languages had been designed by different research groups: Plankalkül and others  Algol was intended to stop this proliferation – It would be the one universal, international, machine- independent language for expressing scientific algorithms  In 1958, an international committee (!) was formed to come up with the design Chapter Twenty-Four Modern Programming Languages, 2nd ed. 41 Docsity.com The Algols  Eventually, three major designs: Algol 58, Algol 60, and Algol 68  Developed by increasingly large (!) international committees Chapter Twenty-Four Modern Programming Languages, 2nd ed. 42 Docsity.com Structured Programming  Using phrase-level control instead of labels was called structured programming  There was a long debate: many programmers found it difficult at first to do without labels  Now, the revolution is over: – Some languages (like Java) eliminated go to – Others (like C++) still have it – But programmers rarely use it, even when permitted  The revolution was triggered (or at least fueled) by the Algol designs Chapter Twenty-Four Modern Programming Languages, 2nd ed. 45 Docsity.com Issue: Orthogonality  The Algol designs avoided special cases: – Free-formal lexical structure – No abritrary limits: Any number of characters in a name Any number of dimensions for an array – And orthogonality: every meaningful combination of primitive concepts is legal—no special forbidden combinations to remember Chapter Twenty-Four Modern Programming Languages, 2nd ed. 46 Docsity.com Example  Each combination not permitted is a special case that must be remembered by the programmer  By Algol 68, all combinations above are legal  Just a sample of its orthogonality—few modern languages take this principle as far as Algol Chapter Twenty-Four Modern Programming Languages, 2nd ed. 47 Integers Arrays Procedures Passing as a parameter Storing in a variable Storing in an array Returning from a procedure Docsity.com Smalltalk  Alan Kay, Xerox PARC, 1972  Inspired by Simula, Sketchpad, Logo, cellular biology, etc.  Smalltalk is more object-oriented than most of its more popular descendants  Everything is an object: variables, constants, activation records, classes, etc.  All computation is performed by objects sending and receiving messages: 1+2*3 Chapter Twenty-Four Modern Programming Languages, 2nd ed. 50 Docsity.com A Design Philosophy  Commit to a few simple ideas, then find the most elegant language design from there: – Lists, recursion, eval: Lisp – Objects, message-passing: Smalltalk – Resolution-based inference: Prolog  Hallmarks: – Initial implementation is easy – Easy to modify the language – Programming feels like custom language design Chapter Twenty-Four Modern Programming Languages, 2nd ed. 51 Docsity.com Smalltalk’s Influence  The Simula languages and Smalltalk inspired a generation of object-oriented languages  Smalltalk still has a small but active user community  Most later OO languages concentrate more on runtime efficiency: – Most use static typing (Smalltalk uses dynamic) – Most include non-object primitive types as well as objects Chapter Twenty-Four Modern Programming Languages, 2nd ed. 52 Docsity.com Prolog Evolution  1973 version: – Eliminated special backtracking controls (introducing the cut operation instead) – Eliminated occurs-check  David Warren, 1977: efficient compiled Prolog, the Warren Abstract Machine  (For many languages—Smalltalk, Prolog, ML— techniques for efficient compilation were critical contributions)  ISO standards, 1995 and 2000 Chapter Twenty-Four Modern Programming Languages, 2nd ed. 55 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 56 Docsity.com ML  Robin Milner, Edinburgh, 1974  LCF: a tool for developing machine-assisted construction of formal logical proofs  ML was designed as the implementation language for LCF  Strong typing, parametric polymorphism, and type inference were in the first designs  Remained closely tied to LCF development for several years Chapter Twenty-Four Modern Programming Languages, 2nd ed. 57 Docsity.com  Prehistory of programming languages – The story of the programmers of Babylon – The story of Mohammed Al-Khorezmi – The story of Augusta Ada, Countess of Lovelace  Early programming languages – The story of the Plankalkül – The story of Fortran – The story of Lisp – The story of Algol – The story of Smalltalk  Our languages – The story of Prolog – The story of ML – The story of Java Chapter Twenty-Four Modern Programming Languages, 2nd ed. 60 Docsity.com A Long Lineage Chapter Twenty-Four Modern Programming Languages, 2nd ed. 61 Algol 60 CPL BCPL B “Basic CPL.” Vastly simplified. Typeless: manipulates untyped machine words. Introduced the C-family array idea: A[I], written in BCPL as A!I, is the same as a reference to the word at address A+I. Martin Richards (a student of Strachey), 1967 An even larger language than Algol 60, adding features for business data processing. Christopher Strachey et. al., 1962-1966 An even simpler language, developed for systems programming for the first Unix systems at Bell Labs. Included compound assignments (a+=b), borrowed from Algol 68. Ken Thompson, 1969 Docsity.com A Long Lineage, Continued Chapter Twenty-Four Modern Programming Languages, 2nd ed. 62 B C C++ Java Originally a C preprocessor adding object-oriented features to C: “C with Classes”. Added dynamic dispatch, overloaded operators and function names, multiple inheritance, templates, exception handling. Became and remains one of the most widely used languages. Bjarne Stroustrup, 1984 Extension of B (originally, “NB”) to take advantage of more hardware (PDP-11). Type system, macro preprocessor, I/O library, etc. Used to reimplement the Unix kernel, and spread widely with Unix. Dennis Ritchie et. al., 1971-1973 Docsity.com Conclusion: The Honor Roll  Some programming language pioneers who have won the Turing award:  Alan Perlis, John McCarthy, Edsger Dijkstra, Donald Knuth, Dana Scott, John Backus, Robert Floyd, Kenneth Iverson, C.A.R. Hoare, Dennis Ritchie, Niklaus Wirth, John Cocke, Robin Milner, Kristen Nygaard, Ole-Johan Dahl, Alan Kay, Peter Naur, Frances Allen, and Barbara Liskov  These very bright people had to work very hard on things that now seem easy, such as: – Local variables with block scope – Using phrase-level control instead of go to  Before becoming perfectly obvious to everyone, these things were unknown and unguessed Chapter Twenty-Four Modern Programming Languages, 2nd ed. 65 Docsity.com Conclusion  Is the evolution of programming languages nearly done, or have we as far again to go?  Maybe all the important discoveries have been made, and language evolution will now slow and converge  Or maybe we will have the pleasure of seeing new ideas, now unknown and unguessed, become perfectly obvious to everyone  Enjoy! Chapter Twenty-Four Modern Programming Languages, 2nd ed. 66 Docsity.com
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved