1 Concepts of Programming Languages TK 327, Fall 2015 MW 2:00 PM – 3:15 PM STV 104 Instructor:Dr. Chung-Chih Li Home page of the Class.

Slides:



Advertisements
Similar presentations
Computational Models The exam. Models of computation. –The Turing machine. –The Von Neumann machine. –The calculus. –The predicate calculus. Turing.
Advertisements

1 Scheme and Functional Programming Aaron Bloomfield CS 415 Fall 2005.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
Turing Machines (At last!). Designing Universal Computational Devices Was Not The Only Contribution from Alan Turing… Enter the year 1940: The world is.
A Brief History of Artificial Intelligence
HISTORY OF LOGIC BY JOHN NAGUIB. What is Logic? The science or study of how to evaluate arguments and reasoning. “Logic is new and necessary reasoning”
From Kant To Turing He Sun Max Planck Institute for Informatics.
Jigar Gaglani.  A Programming language is a notational system for describing computations in a machine and human readable form.
Language Specfication and Implementation - PART II: Semantics of Procedural Programming Languages Lee McCluskey Department of Computing and Mathematical.
Overview of Programming Paradigms
CS 101 Course Summary December 5, Big Ideas Abstraction Problem solving Fundamentals of programming.
The Evolution of Programming Languages
Comp 205: Comparative Programming Languages Imperative Programming Languages Functional Programming Languages Semantics Other Paradigms Lecture notes,
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Introduction (Chapter 1)
Programming Languages Chapter OneModern Programming Languages, 2nd ed.1.
Programming Paradigms Imperative programming Functional programming Logic programming Event-driven programming Object-oriented programming A programming.
CS 331, Principles of Programming Languages Introduction.
Programming Language A programming language is an artificial language designed to express computations or algorithms that can be performed by a computer.
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.
1 Purposes: Learn JAVA 1.What is programming languages 2.How to solve problems by computers 1.a CS major student, get a degree in BS 2.a programmer  system.
Computability and Modeling Computation What are some really impressive things that computers can do? –Land the space shuttle (and other aircraft) from.
Functional Programing Referencing material from Programming Language Pragmatics – Third Edition – by Michael L. Scott Andy Balaam (Youtube.com/user/ajbalaam)
Programming Paradigms
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
Future Computers.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
Chapter 1 - Introduction
The Church-Turing Thesis Lecture by H. Munoz-Avila.
Logic in Computer Science - Overview Sep 1, 2011 POSTECH 박성우.
CSE S. Tanimoto Lambda Calculus 1 Lambda Calculus What is the simplest functional language that is still Turing complete? Where do functional languages.
Lambda Calculus History and Syntax. History The lambda calculus is a formal system designed to investigate function definition, function application and.
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Software Basics. Some Pioneers Charles Babbage Analytical Engine Countess Ada Lovelace First Programmer ? John Von Neumann storing instructions in memory.
1 ML fun x -> e e 1 e 2 0, 1, 2,..., +, -,... true, false, if e then e else e patterns datatypes exceptions structures functors let f x = e variables These.
Course Overview and Road Map Computability and Logic.
Chapter OneProgramming Languages1. Chapter OneProgramming Languages2 Recommended Course Textbooks A. B. Webber (2002) Modern Programming Languages: A.
Overview.  Explores the theoretical foundations of computing  What can and cannot be done by an algorithm  Most of the material predates computers!
CS 331, Principles of Programming Languages Chapter 1.
Logical and Functional Programming
Algorithms Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006 by Maria Litvin, Gary Litvin,
-Calculus Kangwon National University 임현승 Programming Languages These slides are based on the slides by Prof. Sungwoo Park at POSTECH.
ISBN Structure of Programming Languages Prof. Dr. Mostafa Abdel Aziem Mostafa Senior Lecturer
1 The Evolution of Major Programming Languages Different Languages Characteristics.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
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.
Programming Models/ Paradigms Chapter 5: Programming Languages.
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 190 Programming Language Paradigms Fall 2014
Alonzo Church: Mathematician. Philosopher. Computer Scientist? Who is Alonzo Church? Alonzo Church was a man who was very important to the computer science.
Lambda Calculus A fairly simple system for representing functions The base of typed functional programming languages such as ML and Haskell.
Spring, 2011 –– Computational Thinking – Dennis Kafura – CS 2984 Lambda Calculus Introduction.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
Programming Language Paradigms ITSK2314 Lecture 3.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Programming Languages Chapter OneModern Programming Languages 1.
Functional Programming
Programming Languages 2nd edition Tucker and Noonan
Introduction to formal languages and automata
Computable Functions.
PROGRAMMING LANGUAGES
Programming Languages
Comp 205: Comparative Programming Languages
Turing Machines (At last!).
On Kripke’s Alleged Proof of Church-Turing Thesis
Principles of Programming Languages
Overview of Programming Paradigms
CO Games Development 2 Week 21 Turing Machines & Computability
Presentation transcript:

1 Concepts of Programming Languages TK 327, Fall 2015 MW 2:00 PM – 3:15 PM STV 104 Instructor:Dr. Chung-Chih Li Home page of the Class

2 Concepts of Programming Languages This is not a survey course Course Description and Purposes Objectives

10/14/2015ITK 3273 In order to understand the universe, we have to understand the language in which the universe is written, and mathematics is the language. -- Galileo Galilei ( ) -- In order to understand Information Technology, we have to understand the language in which Information Technology is written, and the Programming Language is the language. --

4 What is a computer ? What is a machine? A machine that can compute! What is computation? Why bother? Because, the way we understand and formalize them directly shapes the design of programming languages.

5 Computer -- Machine -- Computation -- A sequence of procedures that manipulate data. A device that follows a certain fixed causal rules. A machine that can compute!

6 Charles Babbage ( ) Difference Engine No. 1 design: Difference Engine No. 1 ( ) Analytical Engine ( ) Difference Engine No. 2 ( ) Difference Engine No. 2 (2002) / 10/14/2015

7 Leibniz’s Dream “Sir! Let’s sit down and compute!! ” Gottfried W.V. Leibniz ( )

8 Aristotle ( BC) L E J Brouwer ( ) Logic and Thought and Computing

9 Completeness theorem Incompleteness theorem Recursive theory Computable functions are recursively definable function Kurt Gödel ( )

10 Alonzo Church Lambda Calculus Computable functions are Lambda-term definable

11 Alan Turing ( ) – The Enigma The man who invented the computer. Image from Computable functions are Turing machine computable

12 Wittgenstein says: “Turing Machines are human that compute.” Ludwig Wittgenstein ( )

13 Church-Turing Thesis: all algorithms are computable 1. Logic 2. Recursive, λ-terms 3. Turing machines Logical languages e.g. PROLOG Functional languages e.g. LISP, ML Imperative languages e.g. Algol-60, Fortran, C OOP, ( e.g. Small Talk, JAVA, C++) What is it? Really? ?????

14 Imperative Languages C Using instructions to command the machine to do something, with branches, iterations, control flows, and side-effects,. int fact(int n) { int sofar = 1; while (n>0) sofar *= n--; return sofar; }

15 Functional Languages ML fun fact x = if x <= 0 then 1 else x * fact(x-1); defun fact (x) (if (<= x 0) 1 (* x (fact (- x 1))))) LISP Function definition, Recursion, no side-effect

16 Logical Languages PROLOG parent(A,B) :- dad(A,B). parent(A,B) :- mom(A,B). grandparent(A,B) :- parent(A,C), parent(C,B). dad(dennis, sean). dad(dennis, leon). dad(john, dennis). mom(sandy, leon). mom(sandy,sean). grandparent(X, sean). X = john. parent(X, leon). X = dennis. X = sandy. Rules (logic) and facts

17 Logical Languages PROLOG fact(X,1) :- X =:= 1. fact(X,Fact) :- X > 1, NewX is X - 1, fact(NewX,NF), Fact is X * NF. fact(4,X). X = 24. fact(5,30). false.

18 OOP (Object-oriented Programming) A new programming paradigm after ’80s. Problem solving  Procedure finding But Why should I have to write the same procedure to do the same job over and over again? Fact: Different problems usually consist of many common smaller problems. Problem solving  Solution arranging

19 OOP Java public class MyInt { private int value; public MyInt(int value) { this.value = value; } public int getValue() { return value; } public MyInt getFact() { return new MyInt(fact(value)); } private int fact(int n) { int sofar = 1; while (n > 1) sofar *= n--; return sofar; } }