UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 190 Programming Language Paradigms Fall 2014

Slides:



Advertisements
Similar presentations
CS 150 lecture 2. Review Reasons for studying programming languages Language evaluation criteria –Readability Simplicity? Orthogonality? –Writability.
Advertisements

1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Gerardo Schneider Department of Informatics University of Oslo December 2008.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
CSCE 330 Programming Language Structures Chapter 1: Introduction
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Chapter 1: Introduction Fall 2010.
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Chapter 1: Introduction Fall 2006.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Introduction Spring 2010 Marco Valtorta
The Evolution of Programming Languages
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Introduction Spring 2007 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Fall 2004 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 531 Compiler Construction Introduction Spring 2008 Marco Valtorta
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Chapter 1: Introduction Spring 2006.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Introduction to Functional Programming Notes for CSCE 190 Based on Sebesta,
Presented by Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion.
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
CSE 3302 Programming Languages Chengkai Li Spring 2008 History of Programming Languages Lecture 2 - History, Spring CSE3302 Programming Languages,
C H A P T E R O N E Overview.
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
1 Programming Language Concepts Ethics Why study concepts of programming languages (PLs)? PL categories Influences on PL design Problem areas & needs that.
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.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Introduction and History Fall 2013.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
By Neng-Fa Zhou1 Evolution of programming languages –Machine language –Assembly language –Sub-routines and loop (Fortran) –Procedures and recursion (Algol,
CS 403 Programming Language Theory Class 2 - August 29, 2000.
Introduction to Programming Languages Where do we start to understand programming languages as a core concept of Computer Science? There are literally.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Programming Languages Fundamentals Cao Hoaøng Truï Khoa Coâng Ngheä Thoâng Tin Ñaïi Hoïc Baùch Khoa TP. HCM.
Programming Languages What is a programming language? –systematic notation by which we describe computational processes to others –notation for description.
Programming Languages Meeting 14 December 9/10, 2014.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Introduction and History Fall 2012.
Logical and Functional Programming
Engr. Isabelo Jun D. Paat, ME-CoE Lecturer 1 Programming Languages.
Allyson M. Hoss, January 14, 2008 CSC 7101 Programming Language Structures Spring 2008 Louisiana State University.
int k = Integer.MAX_VALUE; k++; int k = Integer.MAX_VALUE; k++; What happens when the following code executes? byte b = someFile.readByte(); b = (byte)(b.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Introduction and History Fall 2014.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Functional Programming Part 1. Organization of Programming Languages-Cheng Big Picture u What we’ve learned so far: Imperative Programming Languages 
Functional Programming. Some Functional Languages Lisp Scheme - a dialect of Lisp Haskell Miranda.
Haskell Introduction CSCE 314 Spring CSCE 314 – Programming Studio Historical Background 1930s: Alonzo Church develops the lambda calculus, a simple.
A Short History of PL's (MacLennan 1999) “Zeroth Generation” (1940's-50's): machine language / assembly: if/then, read/write, store, goto
CS 313 History of Programming Languages
History of Programming Languages Compiled by Wasim Ahmad Khan.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Introduction and History Fall 2015.
小型系統 心情 vs. 古典樂 心情 vs. 古典樂 浪漫求籤系統 美食導航系統 季潔亭雅鈺熒岱芸 美食導航系統 楊氏音樂模擬大會考人瑋 若維 芷萱 伽倩 楊氏音樂模擬大會考 麥當勞熱量計算系統 火星文困擾你嗎 ? 火星文困擾你嗎 ? 歌詞知多少 - 挑戰你的腦容量英琪 日馨 青雪 鈺娟.
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.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Introduction and History Fall 2016.
Programming Language History and Evolution
CSCE 190 Programming Language Paradigms
Concepts of Programming Languages
Why study programming languages?
CSCE 330 Programming Language Structures Introduction and History
Programming Language History and Evolution
Chap. 6 :: Control Flow Michael L. Scott.
Programming Languages
Programming Language Design
Chap. 6 :: Control Flow Michael L. Scott.
CSCE 190 Programming Language Paradigms
Programming Languages and Paradigms
Principles of Programming Languages
Overview of Programming Paradigms
CSCE 190 Programming Language Paradigms
Presentation transcript:

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 190 Programming Language Paradigms Fall 2014

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Language Families Imperative (or Procedural, or Assignment-Based) Functional (or Applicative) Logic (or Declarative)

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Imperative Languages Mostly influenced by the von Neumann computer architecture Variables model memory cells, can be assigned to, and act differently from mathematical variables Destructive assignment, which mimics the movement of data from memory to CPU and back Iteration as a means of repetition is faster than the more natural recursion, because instructions to be repeated are stored in adjacent memory cells

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering GCD (Euclid’s Algorithm) in C To compute the gcd of a and b, check to see if a and b are equal. If so, print one of them and stop. Otherwise, replace the larger one by their difference and repeat. #include int gcd(int a, int b) { while (a != b) { if (a > b) a = a - b; else b = b - a; } return a; }

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Functional Languages Model of computation is the lambda calculus (of function application) No variables or write-once variables No destructive assignment Program computes by applying a functional form to an argument Program are built by composing simple functions into progressively more complicated ones Recursion is the preferred means of repetition

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering GCD (Euclid’s Algorithm) in Scheme (define gcd2 ; 'gcd' is built-in to R5RS (lambda (a b) (cond ((= a b) a) ((> a b) (gcd2 (- a b) b)) (else (gcd2 (- b a) a))))) The gcd of a and b is defined to be (1) a when a and b are equal, (2) the gcd of b and a-b when a > b and (3) the gcd of a and b-a when b > a. To compute the gcd of a given pair of numbers, expand and simplify this definition until it terminates

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Logic Languages Model of computation is the Post production system Write-once variables Rule-based programming Related to Horn logic, a subset of first-order logic AND and OR non-determinism can be exploited in parallel execution Almost unbelievably simple semantics Prolog is a compromise language: not a pure logic language

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering GCD (Euclid’s Algorithm) in Prolog gcd(A,B,G) :- A = B, G = A. gcd(A,B,G) :- A > B, C is A-B, gcd(C,B,G). gcd(A,B,G) :- B > A, C is B-A, gcd(C,A,G). The proposition gcd(a,b,g) is true if (a) a,b, and g are equal; (2) a is greater than b and there exists a number c such that c is a-b and gcd(c,g,b) is true; or (3) a is less than b and there exists a number c such that c is b-a and gcd(c,a,g) is true. To compute the gcd of a given pair of numbers, search for a number g (and various numbers c) for which these rules allow one to prove that gcd(a,b,g) is true

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Some Historical Perspective “Every programmer knows there is one true programming language. A new one every week.” –Brian Hayes, “The Semicolon Wars.” American Scientist, July-August 2006, pp – Language families Evolution and Design

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Figure by Brian Hayes (who credits, in part, Éric Lévénez and Pascal Rigaux): Brian Hayes, “The Semicolon Wars.” American Scientist, July- August 2006, pp

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Some Historical Perspective Plankalkül (Konrad Zuse, ) FORTRAN (John Backus, 1956) LISP (John McCarthy, 1960) ALGOL 60 (Transatlantic Committee, 1960) COBOL (US DoD Committee, 1960) APL (Iverson, 1962) BASIC (Kemeny and Kurz, 1964) PL/I (IBM, 1964) SIMULA 67 (Nygaard and Dahl, 1967) ALGOL 68 (Committee, 1968) Pascal (Niklaus Wirth, 1971) C (Dennis Ritchie, 1972) Prolog (Alain Colmerauer, 1972) Smalltalk (Alan Kay, 1972) FP (Backus, 1978) Ada (UD DoD and Jean Ichbiah, 1983) C++ (Stroustrup, 1983) Modula-2 (Wirth, 1985) Delphi (Borland, 1988?) Modula-3 (Cardelli, 1989) ML (Robin Milner, 1978) Haskell (Committee, 1990) Eiffel (Bertrand Meyer, 1992) Java (Sun and James Gosling, 1993?) C# (Microsoft, 2001?) Scripting languages such as Perl, etc. Etc.

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Alain Colmerauer and John Backus Alain Colmerauer (1941-), the creator of Prolog John Backus ( ), the creator of FP

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Haskell committee, history from

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering August 2014 Tiobe PL Index

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering August 2014 PYPL Index

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Tiobe Index Long Term Trends, August 2013

UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Tiobe Index Long Term Trends, August 2014