The Power of Abstraction. Barbara Liskov May 2013 MIT CSAIL

Similar documents
The Power of Abstraction. Barbara Liskov November 2009

The P ower Power o f of A bstraction Abstraction Barbara Liskov October 2009

Topics. Modularity and Object-Oriented Programming. Dijkstra s Example (1969) Stepwise Refinement. Modular program development

CS 292 Software Development

CSc 520. Iterators. CLU-style Iterators... CLU-style Iterators. Principles of Programming Languages. Christian Collberg April 16, 2003

CSc 520. Principles of Programming Languages 29: Control Flow Iterators

A Sketchy Evolution of Software Design. Three Papers by David Parnas

CSc 520 Principles of Programming Languages

Data Structures and Algorithms Design Goals Implementation Goals Design Principles Design Techniques. Version 03.s 2-1

Computer Programming II Python

Objects as Session-Typed Processes

Modularity. Modular program development. Language support for modularity. Step-wise refinement Interface, specification, and implementation

Lecture 7: Data Abstractions

On the Criteria To Be Used in Decomposing Systems into Modules D.L. Parnas Carnegie-Mellon University

Aspects of Implementing CLU

Today's Agenda. References. Open Closed Principle. CS 247: Software Engineering Principles. Object-Oriented Design Principles

Object-Oriented Languages and Object-Oriented Design. Ghezzi&Jazayeri: OO Languages 1

Object-Oriented Genetic Improvement for Improved Energy Consumption in Google Guava

CSCI 136 Data Structures & Advanced Programming. Fall 2018 Instructors Bill Lenhart & Bill Jannen

CMSC 132: Object-Oriented Programming II

Chapter 13 Object Oriented Programming. Copyright 2006 The McGraw-Hill Companies, Inc.

Software Architecture

Menu. In general, what are possible advantages of one design over another? Class 27: Exam 2. Exam 2 Parenthesizing the Expression. Design A.

PROCESS DEVELOPMENT METHODOLOGY The development process of an API fits the most fundamental iterative code development

Lecture 13: Object orientation. Object oriented programming. Introduction. Object oriented programming. OO and ADT:s. Introduction

21) Functional and Modular Design

CS 32. Lecture 1: oops

Learning Objectives. C++ For Artists 2003 Rick Miller All Rights Reserved xli

Inheritance and object compatibility

Design issues for objectoriented. languages. Objects-only "pure" language vs mixed. Are subclasses subtypes of the superclass?

CS2013 Course Syllabus Spring 2018 Lecture: Mon/Wed 2:00 P.M. 2:50 P.M. SH C259 Lab: Mon/Wed 2:50 P.M. 4:00 P.M. SH C259

Spring 2003 Instructor: Dr. Shahadat Hossain. Administrative Matters Course Information Introduction to Programming Techniques

Computer Programming II C++ (830)

21) Functional and Modular Design

Compositionality in system design: interfaces everywhere! UC Berkeley

CS 445: Data Structures Final Examination: Study Guide

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

A Brief History of Modularity in Programming

Lecture 20: Implementation () / 33

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Surfing Ada for ESP Part 2

Trends in Automated Verification

Fall 2010 UVa David Evans. Yixin Sun

Procedural Programming. It's Back? It Never Went

Managing Change and Complexity

--(1977b), 'Finite State Machine Theory and Program Design: A Survey', Computer Studies Quarterly, 1, to be published.

1: Introduction to Object (1)

It Is Possible to Do Object-Oriented Programming in Java

Object-Oriented Concepts and Design Principles

AP Computer Science 4325

Cost of Your Programs

Lecture 4: MIPS Instruction Set

CS/ENGRD 2110 Object-Oriented Programming and Data Structures Spring 2012 Thorsten Joachims. Lecture 25: Review and Open Problems

Object Oriented Paradigm

Outline. Object Oriented Programming. Course goals. Staff. Course resources. Assignments. Course organization Introduction Java overview Autumn 2003

Type Hierarchy. Comp-303 : Programming Techniques Lecture 9. Alexandre Denault Computer Science McGill University Winter 2004

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

CS558 Programming Languages Winter 2013 Lecture 8

3D Graphics Programming Mira Costa High School - Class Syllabus,

OOPLs Semantic Foundations. Data Abstraction Foundation of OOPLs

CSE Lecture 3: Objects 2 September Nate Nystrom University of Texas at Arlington

A Brief History of Modularity in Programming

SDV4001 Object Oriented Programming with C++ and UI Midterm 2013

Learning the Hard Way

Programming Languages & Paradigms PROP HT Abstraction & Modularity. Inheritance vs. delegation, method vs. message. Modularity, cont d.

Modules. Cardelli, 1996

write the functions inside as well as outside the class. So in C++, they are called member functions and not methods.

CS Computable Functions. Reading: Chapter 2

CMPT Data and Program Organization

CPSC 211, Sections : Data Structures and Implementations, Honors Final Exam May 4, 2001

CS 320 Introduction to Software Engineering Spring March 06, 2017

Top Down Design vs. Modularization

Organization of User Interface Software

CS3500: Object-Oriented Design Fall 2013

CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing

New Programming Paradigms

Lecture 15: Generalization, Polymorphism and States. Copyright W. Howden 1

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

Data Abstraction. Hwansoo Han

The Object Oriented Paradigm

Chapter 2: Java OOP I

Objects First with Java A Practical Introduction using BlueJ

Programming Language Concepts 1982, 1987, Outline. Period

Inheritance & Interfaces and Code Layout

<Insert Picture Here> JVMLS 2013 Keynote

COT 6405: Analysis of Algorithms. Giri Narasimhan. ECS 389; Phone: x3748

Object Oriented Programming: Based on slides from Skrien Chapter 2

Programming Languages & Paradigms PROP HT Course Council. Subprograms. Meeting on friday! Subprograms, abstractions, encapsulation, ADT

Today s lecture. CS 314 fall 01 C++ 1, page 1

Programming Languages 2nd edition Tucker and Noonan"

Object-oriented Programming. Object-oriented Programming

n HW5 out, due Tuesday October 30 th n Part 1: Questions on material we ll cover today n Part 2: BFS using your graph from HW4

Outline. Subtype Polymorphism, Subtyping vs. Subclassing, Liskov Substitution Principle. Benefits of Subtype Polymorphism. Subtype Polymorphism

Programming Languages A few bits of history

CPSC 221: Algorithms and Data Structures Lecture #1: Stacks and Queues

Schedule(3/3) March 18th 13:00 Unified Process and Usecase-Driven Approach. (problem definition, use case model)

Functional Programming. Introduction To Cool

CS 32. Lecture 2: objects good?

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

Software Engineering

Transcription:

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 op1 op2 op3 Partition state

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

Idea Connect partitions to data types

Partitions as Data Types op1 op2 op3 Partition state

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. 1970 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