The Evolution of Programming Languages

Slides:



Advertisements
Similar presentations
1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Advertisements

Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
CS ExCo Advanced in Topics Object-Oriented Programming.
Language Paradigms Programming languages. Language paradigms. World view of imperative languages. World view of functional languages. World view.
Mark Hennessy CS351 Dept. Computer Science NUIM CS 351 Introduction.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
High-Level Programming Languages
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
Programming Languages Structure
Chapter 8 High-Level Programming Languages Nell Dale John Lewis.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
Programming Language Concepts
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
Chapter 8 High-Level Programming Languages (modified by Erin Chambers)
Imperative Programming
1Object-Oriented Program Development Using C++ Computer Science and Programming Languages Computers are ubiquitous Computer literacy is essential Computer.
Chapter 1. Introduction.
BIT 1003 – Presentation 7. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
The Evolution of the Object Model OOAD. The Evolution of the Object Model software engineering trends observed The shift in focus from programming-in-the-small.
Programming language history Created by wordle.net, from the text in this slide.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
Chapter 1 - Introduction
CS 152: Programming Language Paradigms February 10 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
1 Programming Language History and Evolution In Text: Chapter 2.
Chapter 6 Programming Languages (1) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Programming Languages Meeting 14 December 9/10, 2014.
Overview.  Explores the theoretical foundations of computing  What can and cannot be done by an algorithm  Most of the material predates computers!
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
Chapter 8 High-Level Programming Languages. 2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Logical and Functional Programming
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
CS 152: Programming Language Paradigms March 12 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 190 Programming Language Paradigms Fall 2014
Copyright © 2009 Elsevier Chapter 10 :: Functional Languages Programming Language Pragmatics Michael L. Scott.
Functional Programming. Some Functional Languages Lisp Scheme - a dialect of Lisp Haskell Miranda.
A Short History of PL's (MacLennan 1999) “Zeroth Generation” (1940's-50's): machine language / assembly: if/then, read/write, store, goto
Review for Test 2 Chapters 5 (start at 5.4), 6.1, , 12, 13, 15.1, Python.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
Language Paradigms CS655.
Functional Programming
CS314 – Section 5 Recitation 9
Programming Language History and Evolution
Chapter 1. Introduction.
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Programming Languages 2nd edition Tucker and Noonan
Functional Programming
CS314 – Section 5 Recitation 10
Functional Programming Languages
CS 3304 Comparative Languages
Why study programming languages?
Assembly Language Specific to each machine Extremely low level
PROGRAMMING LANGUAGES
课程名 编译原理 Compiling Techniques
Some Important Programming Languages
Programming Language History and Evolution
Evolution of programming languages
Ada – 1983 History’s largest design effort
CSC Classes Required for TCC CS Degree
Programming Language Design
Programming Languages 2nd edition Tucker and Noonan
Programming Languages and Paradigms
High Level Programming Languages
Low Level Programming Languages
Compilers Principles, Techniques, & Tools Taught by Jing Zhang
Some Important Programming Languages
Presentation transcript:

The Evolution of Programming Languages CS 351 Mark Hennessy Dept. Computer Science NUIM CS351

1. Customized Digital Computer Task j Ij Oj Task k Ik Ok Rig different circuit for each task Mark Hennessy Dept. Computer Science NUIM CS351

2. Stored Program Computing von Neumann showed the existence of a Universal Machine (hardware) that can be customized using control inputs to carry out different tasks. Software is the encoding of the task to control this machine. encoding(Tj) Ij Oj Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Imperative Languages Model of Computation ALU + Memory + Input + Output (von Neumann architecture) Levels of Abstraction (“Human Interface”) Machine Language Binary Representation of the task Assembly Language Symbolic Representation of the task Mark Hennessy Dept. Computer Science NUIM CS351

Imperative Languages - FORTRAN Stands for FORmula TRANslantion. Invented in the 1950’s as the first high level programming language i.e used a compiler. Hello World Example: C FORTRAN IV WAS ONE OF THE FIRST PROGRAMMING C LANGUAGES TO SUPPORT SOURCE COMMENTS WRITE (6,7) 7 FORMAT(13H HELLO, WORLD) STOP END Mark Hennessy Dept. Computer Science NUIM CS351

Imperative Languages – ALGOL 60 Stands for ALGOrithmic Language Defined in 1960 and was the first to introduce features still in use today: block structure and syntax defined by a grammar. procedure Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k); value n, m; array a; integer n, m, i, k; real y; comment The absolute greatest element of the matrix a, of size n by m is transferred to y, and the subscripts of this element to i and k; begin integer p, q; y := 0; i := k := 1; for p:=1 step 1 until n do for q:=1 step 1 until m do if abs(a[p, q]) > y then begin y := abs(a[p, q]); i := p; k := q end end Absmax Mark Hennessy Dept. Computer Science NUIM CS351

Imperative Languages - C The most successful ALGOL type language. Lexical variable scope and recursion A static type system which prevents many meaningless operations Function parameters are generally passed by value (pass-by-reference is achieved in C by explicitly passing pointer values) Heterogeneous aggregate data types (struct in C) which allow related data elements to be combined and manipulated as a unit A small set (around 30) of reserved keywords Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Functional Languages Imperative programs are concerened with programming a series of instructions that change the state of program towards giving the solution. Functional Programming is concerned with viewing a program as a series of mathematical functions. Based upon the maths model of Lambda Calculus, developed by Turing, Church and Kleene in the 1930’s. Church’s thesis says that there is no one form of computation that is any more powerful than another. This hold true as we are studying Paradigms! Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Functional Languages Turing developed a model of computation called the Turing Machine …. TCS course. Church developed lambda calculus. This is based on the notion of parameterised expressions, which forms the basis of Functional Programming. Passing arguments to methods. Mark Hennessy Dept. Computer Science NUIM CS351

Functional Programming Introduced into programming the notions of: First class and higher order functions Polymorphism Lists Recursion Constructors Garbage Collection Mark Hennessy Dept. Computer Science NUIM CS351

Functional Programming Difference between FP and Imperative programming: IP: “To compute the gcd of a and b, check to see if a and b are equal. If so print one of them and exit. Otherwise replace the larger one by their difference and repeat.” FP: “The gcd of a and b is defined to be a when a=b, and to be the gcd of c and d when a!=b, where c is the smaller of a and b and d is their difference. To compute the gcd of a given pair of numbers, expand and simplify this definition until it finishes. Mark Hennessy Dept. Computer Science NUIM CS351

Functional Languages - Lisp Stands for List Processing Same vintage as Fortran and ALGOL. Allows for operations on lists Eg car(0, 2, 4, 6) = 0 Eg cdr(0, 2, 4, 6) = (2, 4, 6) Lisp Program for factorials: (defun factorial (n) (if (<= n 1) 1 (* n (factorial (- n 1))))) Mark Hennessy Dept. Computer Science NUIM CS351

Functional Languages - ML Stands for Meta Language Functional Language with syntax closer to what you are familiar with. Will be doing practicals with it! (CaML). CaML Program for factorials. let rec fac n =    if n <= 1    then n    else n * fac(n-1);; Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Logic Programming Designed to allow mathematical axioms help prove a theorem. Based on the idea of a Horn clause H <- B1, B2,….Bn The arrow means “if” and the commas mean “and” We will be studying Logic programming via Prolog Mark Hennessy Dept. Computer Science NUIM CS351

Logic Programming - Prolog Name derives from the French programmation en logique. Dates from the early 1970’s. Based upon Predicate Calculus, the system uses backtracking. Example Prolog Program for Factorials: factorial(0,1). factorial(N,F) :- N>0, N1 is N-1, factorial(N1,F1), F is N * F1. Mark Hennessy Dept. Computer Science NUIM CS351

Object Oriented Programming Current paradigm. We write classes such that data is hidden, ideas are abstracted and code is re-usable! In theory…. Simula -> Smalltalk & Ada -> C++ -> Java Sub paradigms Aspect Oriented Programming Generic Programming via Templates We will use C++ to show some advanced OO features and generic programming. Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Scripting Another form of programming is via scripting. Huge amount of scripting languages, Awk, sed, Bash, Javascript, UnrealScript etc We will intoduce scripting via Bash and Python in this course. Python uses dynamic typing and features a very clean syntax. Multi Paradigm! Mark Hennessy Dept. Computer Science NUIM CS351

Mark Hennessy Dept. Computer Science NUIM CS351 Scripting - Python Indentation is essential! Sample factorial function: def fac ( num ): if num == 1: return 1 else : return num * fac(num-1) Mark Hennessy Dept. Computer Science NUIM CS351