The Evolution of Programming Languages Day 3 Lecturer: Xiao Jia The Evolution of PLs1.

Slides:



Advertisements
Similar presentations
Programming Languages and Paradigms
Advertisements

Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Introduction to Programming Languages Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Object Oriented Programming Chapter 7 Programming Languages by Ravi Sethi.
For Friday Read “lectures” 1-5 of Learn Prolog Now: prolog-now/
George Blank University Lecturer. CS 602 Java and the Web Object Oriented Software Development Using Java Chapter 4.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Copyright W. Howden1 Lecture 8: O/O Programming. Copyright W. Howden2 Topics OO Programming Languages Developing programs from Designs –Class and method.
Software Testing and Quality Assurance
The Object Oriented Programming Languages (OOPL). Done by: Tayeb El Alaoui Supervised by: Dr Driss Kettani.
Programming Languages Structure
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles C/C++ Emery Berger and Mark Corner University of Massachusetts.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
C++ fundamentals.
The Power of Abstraction Barbara Liskov May 2013 MIT CSAIL.
Comparison of OO Programming Languages © Jason Voegele, 2003.
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
C++ Programming. Table of Contents History What is C++? Development of C++ Standardized C++ What are the features of C++? What is Object Orientation?
OOPs Object oriented programming. Based on ADT principles  Representation of type and operations in a single unit  Available for other units to create.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
CS212: Object Oriented Analysis and Design Lecture 4: Objects and Classes - I.
Algorithm Programming Bar-Ilan University תשס"ח by Moshe Fresko.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Introduction to Object Oriented Programming CMSC 331.
The Power of Abstraction Barbara Liskov November 2009.
Chapter 12 Support for Object oriented Programming.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
Learners Support Publications Object Oriented Programming.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Chapter 12 Support for Object-Oriented Programming.
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
Copyright 2006 Oxford Consulting, Ltd1 January Introduction to C++ Programming is taking A problem Find the area of a rectangle A set of data.
Introduction To OOP 1.0 Fundamentals Of Java Programming Language 2.0 Exception Handling 3.0 Classes, Inheritance And Polymorphism © 2011 | PN AZRINA.
For Friday No reading Prolog Handout 2. Homework.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
© 2004 Pearson Addison-Wesley. All rights reserved January 23, 2006 Creating Objects & String Class ComS 207: Programming I (in Java) Iowa State University,
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
ISBN Chapter 12 Support for Object-Oriented Programming.
Language Paradigms CS655.
CS314 – Section 5 Recitation 9
Programming Language History and Evolution
Introduction to Computers Computer Generations
Java Yingcai Xiao.
Abstract Data Types and Encapsulation Concepts
7.1 What Is An Object Object-oriented program - Description or simulation of application Object-oriented programming is done by adopting or extending an.
For Wednesday Read “lectures” 7-10 of Learn Prolog Now:
Introduction Enosis Learning.
Lecture 2 of Computer Science II
Types of Programming Languages
Object orientation concepts
Programming Language History and Evolution
Introduction Enosis Learning.
Computer Programming.
Abstract Data Types and Encapsulation Concepts
Ada – 1983 History’s largest design effort
Programming Languages
Object Oriented Programming
CS565 Advanced Software Development
Parameter Passing Actual vs formal parameters
Chapter 6: Programming Languages
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
Presentation transcript:

The Evolution of Programming Languages Day 3 Lecturer: Xiao Jia The Evolution of PLs1

The Object Oriented Paradigm The Evolution of PLs2

Hoare 1968 A fundamental feature of our understanding of the world is that we organize our experience as a number of distinct object We often need to construct within the computer a model of that aspect of real or conceptual world The Evolution of PLs3

Simula Simula I and Simula 67 Purpose: to model systems A system is a collection of interacting processes A process can be represented during program execution by multiple procedures each with its own Algol-style stacks The Evolution of PLs4

A Simula Class class Account (real balance); begin procedure Deposit (real amount) balance := balance + amount; procedure Withdraw (real amount) balance := balance - amount; end; The Evolution of PLs5

Use A Simula Class ref (Account) myAccount; MyAccount := new Account(1000); // inherit from Account Account class ChequeAccount (real amount); The Evolution of PLs6

Features coroutines: simulation of concurrent processes multiple stacks: to support coroutines classes: combine data & collection of functions prefixing: now as known as inheritance garbage collection The Evolution of PLs7

Smalltalk 1969 (development) – 1972 (appear) first implemented using BASIC inspired by Simula and LISP The Evolution of PLs8

Six Principles 1.Everything is an object 2.Objects communicate by sending and receiving messages (in terms of objects) 3.Objects have their own memory 4.Every object is an instance of a class (which must be an object) 5.The class holds the shared behavior for its instances 6.To evaluate a program list, control is passed to the first object and the remainder is treated as its message The Evolution of PLs9

10 timesRepeat: [Transcript nextPutAll: ' Hi!'] The Evolution of PLs10 receiver

10 timesRepeat: [Transcript nextPutAll: ' Hi!'] The Evolution of PLs11 message parameter of the message

First practical Smalltalk developed in 1976 at Xerox Research Center an object has private data and public functions inheritance tree with Object as its root all classes inherit directly or indirectly from the class Object blocks coroutines garbage collection The Evolution of PLs12

CLU 1974 abstract data type (ADT) CLU is designed for programming with ADTs The Evolution of PLs13

Implement a set of integers intset = cluster is create, insert, delete, member, size, choose rep = array[int] create = proc () returns (cvt) return (rep$new()) end create insert = proc (s: intset, x: int) if ~member(s, x) then rep$addh(down(s), x) end end insert member = proc (s: cvt, x: int) returns (bool) return (getind(s, x) <= rep$high(s)) end member.... end intset The Evolution of PLs14

C superset of C hybrid language emphasize the stack rather than the heap multiple inheritance NO garbage collection The Evolution of PLs15

Eiffel Software Engineering was a key objective in the design of Eiffel multiple inheritance strong typing assertions The Evolution of PLs16

Eiffel does not have … global variables enumerations subranges goto, break, continue procedure variables casts pointer arithmetic I/O defined by libraries rather than built into the language The Evolution of PLs17

Programming by Contract defensive programming sqrt (x: real): real is require x >= 0.0 Result := square root of x ensure abs(Result * Result / x - 1.0) <= 1e-6 end The Evolution of PLs18

Repeated Inheritance class House feature address: String value: Money end class Residence inherit House rename value as residenceValue end class Business inherit House rename value as businessValue end class HomeBusiness inherit Residence Business.... end The Evolution of PLs19

Java 1995 portability security single inheritance interfaces exception handling concurrency: threads garbage collection The Evolution of PLs20

Exercise Byte codes provide portability. Can you suggest any other advantages of using byte codes? The Evolution of PLs21

Homework Kevo Beta Blue CLOS Self Io The Evolution of PLs22

Backtracking Languages (we only talk about Prolog[1972]) The Evolution of PLs23

A Family parent(pam, bob). parent(tom, bob). parent(tom, liz). parent(bob, ann). parent(bob, pat). parent(pat, jim). The Evolution of PLs24 Facts

Prolog Queries ?- parent(tom, liz). yes ?- parent(tom, jim). no ?- parent(pam, X). X = bob ?- parent(bob, C). C = ann C = pat ?- parent(P, jim), parent(G, P). P = pat G = bob The Evolution of PLs25

Adding Rules grandparent(G, C) :- parent(G, P), parent(P, C). sibling(X, Y) :- parent(P, X), parent(P, Y), different(X, Y). ?- sibling(pat, X). X = ann The Evolution of PLs26

Recursive Rules ancestor(A, X) :- parent(A, X). ancestor(A, X) :- ancestor(A, P), parent(P, X). ?- ancestor(pam, jim). yes The Evolution of PLs27

Cut minimum(X, Y, X) :- X <= Y. minimum(X, Y, Y) :- X > Y. The Evolution of PLs28

Cut minimum(X, Y, X) :- X <= Y, !. minimum(X, Y, Y) :- X > Y, !. The Evolution of PLs29

Cut different(X, X) :- !, fail. different(X, Y). ?- different(Tom, Tom). no ?- different(Ann, Tom). yes The Evolution of PLs30