The Power of Abstraction Barbara Liskov May 2013 MIT CSAIL.

Slides:



Advertisements
Similar presentations
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Advertisements

Object Oriented Design An object combines data and operations on that data (object is an instance of class) data: class variables operations: methods Three.
PZ05A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ05A - Abstract data types Programming Language Design.
Checking correctness properties of object-oriented programs K. Rustan M. Leino Microsoft Research, Redmond, WA Lecture 1 EEF summer school on Specification,
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Data Structures Introduction. What is data? (Latin) Plural of datum = something given.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Chapter 1 Principles of Programming and Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Issues Derived from Dr. Fawcett’s Slides Phil Pratt-Szeliga Fall 2009.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
03 - ParnasCSC4071 A Sketchy Evolution of Software Design 1960s –Structured Programming (“Goto Considered Harmful”, E.W.Dijkstra) Emerged from considerations.
Types in programming languages What are types, and why do we need them? Types in programming languages1.
Copyright © 2002, Systems and Computer Engineering, Carleton University Intro.ppt * Object-Oriented Software Development Unit 1 Course.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1/19 Component Design On-demand Learning Series Software Engineering of Web Application - Principles of Good Component Design Hunan University, Software.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
“Enhancing Reuse with Information Hiding” ITT Proceedings of the Workshop on Reusability in Programming, 1983 Reprinted in Software Reusability, Volume.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
The Evolution of Programming Languages Day 3 Lecturer: Xiao Jia The Evolution of PLs1.
Guided Notes Ch. 9 ADT and Modules Ch. 10 Object-Oriented Programming PHP support for OOP and Assignment 4 Term project proposal C++ and Java Designer.
Some Software Engineering Principles by D. L. Parnas Presented by Team 7: Amitkumar Dhameja Cincy Francis Rong Gu CS575 - Software Design, Team 7.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
Design Concepts By Deepika Chaudhary.
The Power of Abstraction Barbara Liskov November 2009.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
Elements of OO Abstraction Encapsulation Modularity Hierarchy: Inheritance & Aggregation 4 major/essential elements3 minor/helpful elements Typing Concurrency.
Types in programming languages1 What are types, and why do we need them?
Ch Ch jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (notes, notes, notes) Dr. Carter Tiernan.
Real Time Programming Language. Intro A programming language represents the nexus of design and structure. But misuse of the programming language can.
The Power of Abstraction Barbara Liskov October 2009.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Abstraction ADTs, Information Hiding and Encapsulation.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Object-Oriented Programming Chapter Chapter
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
ADT data abstraction. Abstraction  representation of concepts by their relevant features only  programming has two major categories of abstraction process.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 16: Smalltalking about Objects.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
CSSE501 Object-Oriented Development. Chapter 10: Subclasses and Subtypes  In this chapter we will explore the relationships between the two concepts.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
Introduction to Objects and Encapsulation Computer Science 4 Mr. Gerb Reference: Objective: Understand Encapsulation and abstract data types.
Chapter 2 Principles of Programming and Software Engineering.
객체지향시스템 연구실 1 THE OBJECT-ORIENTED TECHNOLOGY: An Executive Summary 서울대학교 컴퓨터공학부 객체지향시스템 연구실 교수 김형주.
ISBN Chapter 12 Support for Object-Oriented Programming.
DESIGN PROCESS AND CONCEPTS. Design process s/w design is an iterative process through which requirements are translated into a “blueprint” for constructing.
1 THE OBJECT-ORIENTED TECHNOLOGY: An Executive Summary 서울대학교 컴퓨터공학부 Internet Database Lab 교수 김형주 Spring 2007.
CSCI 383 Object-Oriented Programming & Design Lecture 15 Martin van Bommel.
Language Paradigms CS655.
Software Engineering Lecture 4 Vladimir Safonov, Professor, head of laboratory St. Petersburg University WWW:
Principles of Programming & Software Engineering
CSC 222: Object-Oriented Programming
7. Modular and structured design
Principles of Programming and Software Engineering
Lecture 2 of Computer Science II
Chapter 2. Problem Solving and Software Engineering
Presentation transcript:

The Power of Abstraction Barbara Liskov May 2013 MIT CSAIL

Software is Complex Systems are big and they do complicated things and they may be distributed and/or concurrent

Addressing Complexity Algorithms, data structures, protocols

Addressing Complexity Algorithms, data structures, protocols Programming methodology Programming languages

This Talk Programming methodology as it developed Programming languages Programming languages today

The Situation in 1970 The software crisis!

Programming Methodology How should programs be designed? How should programs be structured?

The Landscape E. W. Dijkstra. Go To Statement Considered Harmful. Cacm, Mar. 1968

The Landscape N. Wirth. Program Development by Stepwise Refinement. Cacm, April 1971

The Landscape D. L. Parnas. Information Distribution Aspects of Design Methodology. IFIP Congress, 1971 “The connections between modules are the assumptions which the modules make about each other.”

Modularity A program is a collection of modules

Modularity A program is a collection of modules Each module has an interface, described by a specification

Modularity A program is a collection of modules Each has an interface, described by a specification A module’s implementation is correct if it meets the specification A using module depends only on the specification

Modularity A program is a collection of modules Each has an interface, described by a specification A module’s implementation is correct if it meets the specification A using module depends only on the specification E.g. a sort routine sort(a)

Benefits of Modularity Local reasoning Modifiability Independent development

The Situation in 1970 Procedures were the only type of module Not powerful enough, e.g., a file system Not used very much Complicated connections

Partitions B. Liskov. A Design Methodology for Reliable Software Systems. FJCC, Dec. 1972

Partitions Partition state op1 op2 op3

From Partitions to ADTs How can these ideas be applied to building programs?

Idea Connect partitions to data types

Partitions as Data Types Partition state op1 op2 op3

Exploring Abstract Data Types Joint work with Steve Zilles

The Landscape Extensible Languages S. Schuman and P. Jourrand. Definition Mechanisms in Extensible Programming Languages. AFIPS R. Balzer. Dataless Programming. AFIPS. 1967

The Landscape O-J. Dahl and C.A.R. Hoare. Hierarchical Program Structures. Structured Programming, Academic Press, 1972

The Landscape J. H. Morris. Protection in Programming Languages. Cacm. Jan. 1973

Abstract Data Types B. Liskov and S. Zilles. Programming with Abstract Data Types. ACM Sigplan Conference on Very High Level Languages. April 1974

What that paper proposed Abstract data types A set of operations And a set of objects The operations provide the only way to use the objects A sketch of a programming language

From ADTs to CLU Participants Russ Atkinson Craig Schaffert Alan Snyder

Why a Programming Language? Communicating to programmers Do ADTs work in practice? Getting a precise definition Achieving reasonable performance

Some Facts about CLU Static type checking Heap-based Separate compilation No concurrency, no gotos, no inheritance

CLU Mechanisms Clusters Polymorphism (generics) Iterators Exception handling

Clusters IntSet = cluster is create, insert, delete, … % representation for IntSet objects % implementation of the operations end IntSet

Clusters IntSet = cluster is create, insert, delete, … % representation for IntSet objects % implementation of the operations end IntSet IntSet s = IntSet$create( ) IntSet$insert(s, 3)

Polymorphism Set = cluster[T: type] is create, insert, … % representation for Set object % implementation of Set operations end Set Set[int] s := Set[int]$create( ) Set[int]$insert(s, 3)

Polymorphism Set = cluster[T: type] is create, insert, … where T has equal: proctype(T, T) returns (bool)

Iterators For all x in C do S

Iterators For all x in C do S Destroy the collection? Complicate the abstraction?

Visit to CMU Bill Wulf and Mary Shaw, Alphard Generators

Iterators sum: int := 0 for e: int in Set[int]$members(s) do sum := sum + e end

Also Exception handling Strong specifications, e.g., IntSet$choose First class procedures and iterators

After CLU Argus and distributed computing Programming methodology Modular program design Reasoning about correctness Type hierarchy

From CLU to Object-Oriented Programming SmallTalk provided inheritance

The Landscape Inheritance was used for: Implementation Type hierarchy

Type Hierarchy Wasn’t well understood E.g., stacks vs. queues

The Liskov Substitution Principle (LSP) Objects of subtypes should behave like those of supertypes if used via supertype methods B. Liskov. Data abstraction and hierarchy. Sigplan notices, May 1988

What Next? Modularity based on abstraction is the way things are done

Programming Languages Today Languages for experts, e.g., Java, C#

Programming 1A E.g., Python

Challenges A programming language for novices and experts Ease of use vs. expressive power Readability vs. writeability Modularity and encapsulation Powerful abstraction mechanisms State matters

Challenges Massively-parallel computers Programming methodology Programming language support

The Power of Abstraction Barbara Liskov May 2013 MIT CSAIL