<<

IX

Basic Concepts in Object-Oriented Programming

An Overview of the Beta Language

K. Nygaard

Rapporteur: G. Pappalardo

... IX. l 7 i-·- The "Newcastle '88. Conference ••• I

"The Past, Present and Future of Object Oriented Programming"

(probably the "in lecture title" these days)

l!!;;;;;;;""""""""""""""""""""...... on Object Oriented Programming ;;;;;;;;;;;;;;;;;;111 © KriSten Nygaard, University of . Title: "The Past. Present and Future ot oop·

The "Newcastle '88 " Conference ••• 1lofu aia it all starf? ... or: etten t~e - ala '3Rnmana - ala ~fkfnga - ala 'iabbage - young ([urtng - early ~fmulatora ana QIA31VQIlU\1lt-era ma @bjert ®rtentea Jrogrnmmfng I

l!i&.______...... on Object Oriented Programming

e Kr1Bten Nyga.&rd. . Title: How did it aJl st&rt? IX.2 The "Newcastle '88 " Conference •••

Object Orgy in Oslo : (Local headline reporting on ECOOP 188)

rn.... ___....,; ___ ••• on Object Oriented Programming .....;;;;;;;;iII © Kr1Bten Nygaa,rd, University of Oslo. Title, Object Orgy In Oslol

The "Newcastle '88 " Conference •••

Object Oriented Programming ...

... a passingfad?

I!!.._....,;_iiiiii...... _ ... on Object Oriented Programming <0 Kr1sten Nygaa.rd., U01verslty of Oslo. Title, • oOP . • P&8S1ng Fod?' IX .3 The "Newcastle '88 " Conference •••

The idea that led to and OOP:

To create a languange that made it possible for people

V' to comprehend, describe, and communicate about systems V' to analyze existing and proposed systems through computer based models

11.._..... _____ ... on Object Oriented Programming _-aI " Kristen Nygaard. University of Oslo. __ t.hat led to 81mul& an OOP

The "Newcastle '88 " CQnference •••

To Describe Is to Understand

.~

'----...... -- ... on Object Oriented Programming

To Program Is to Understand

l!I...... ____ ••• on Object Oriented Programming e Krtsten Nygaard, University of Oslo. T1tle: To Program Is to Understand

The "Newcastle '88 " Conference •••

I CPU fbe~~.:iAj ········· ·· · ·· ··· · ······· w_ : procedure PI A : real • 1.a3 i Iprocedure 1'; :::BI A I. 1.a3 B:·AJ ...... ; PI· .. I eDdj eDdj ...~. [,».!\I ...... eDdj \ ~

Inner bloak IDa\ance B 1 real. 1.83 B:·AJ • ·····t lt;; ... en4 ,..

PlDatanoe

l!l;;;;,;...... _ ••• on Object Oriented Programming Cl Kristen Nyga,ard., University of Oslo. T1tle: Algol Program Exeautll IX .S The "Newcastle '88 " Conference •••

Job shop system oQject

IIns~ce I t t + • • Part Operator Machlnel Machlne2 oQject oQject oQject oQject IIns~cel • ~~ t ~ Ilnsta'nce I RJght Left arm arm oQject oQject

--t.~ Nesting (static link) l!!;;;;;; .....___ ...... __ ... on Object Oriented Programming

Q Kr1sten Nygaard. UDiverslty ot Oslo. T1t1e: 81mula Program Executit

The "Newcastle '88 " Conference •••

Each component (object) has its own attributes and action sequence. The action sequences are concurrent in the modelled system (the referent system). In the computer based model concurrency is simulated by alternating sequences.

\1;;;;;;;; ______••• on Object Oriented Programming

Kr1Bt

8jmula The world considered as a nested collection of interactive objects, each object organjzed as a stack

l!!;;;;;;;;..,..;...... ___ ••• on Object Oriented Programming <0 Kr1sten Nyga&rd., University of Oslo. Title: AlgollSlmul& Wor ld ViE

The "Newcastle '88 " Conference •••

From Mathematical Models to Monte Carlo to General Simulation Models to System Description and Programmjng in General

\!l;oa;;,...... on Object Oriented Programming e Kristen Ny ga&rd., University of Oslo. Title: From Math to !/lonte carlo .... IX. 7 The "Newcastle '88 " Conference •.• SimulaI 1961-64 A system description and simulation language that also was used as a general

Simula67 1966-67 A system description and general programming language that also is used as a simulation language

La____ ...... __ ... on Object Oriented Programming C Kristen Nyga.&rd, Univers1ty of 0810. Title: 81mul& Ii81mul& 67

The "Newcastle '88 " Conference •••

From the history of Simula - the Greek Night Club Episode:

/I •• a.i'ter the dinner in Wasllington DC, Jim Nlckltas brought KN to a Greek n1gb.t olub, and while they were watc.htng a beautiful belly dancer, Nlckltas proposed this interesting deal: ...... /I "History of Programming Languages", ed. R. Weze1blatt.

The version that came very close to final print:

/I •• after the dinner in Washington DC, Jim Nlokltas brought KN to a Greek night olub, and while they were was.htng a beautiful belly danoer, Nlokltas proposed this interesting deal: ...... /I

I!I...... _ .....- ... on Object Oriented Programming C Kr1sten Nyga.&rd, University of Oslo. Title: Greek N1g!l.t Club EpISOde IX .S The "Newcastle '88 " Conference •••

DELTA 1973 -78 a general system description language and not a programming language

BETA 1976- a general object oriented programming language and a research project with the objective ofcontributing to new concepts i languages

[1..__ ...... on Object Oriented Programming C Kristen Nygaard, UD.1verslty ot Oslo. TItle: DELTA/BlITA

The "Newcastle '88 " Conference ••• The idea that led to Smalltalk and Macintosh: The "Dynabook" To create a book-sized computer that

V' contajned a model of all facts relevant to its owner V' a model comprehensible to its owner V' a model used and controlled interactively by its owner

ta-_...... ___ ...... _ ... on Object Oriented Programming C Kr18ten Nygaa.rd., University of Oslo. TItle: The !de& tha; led to 8malltalk and Mac1ntoah· IX.9 The "Newcastle '88 " Conference ••• Smallta1k The Dynabook needed:

V' Simu1a's classes and subclasses to organize and make comprehensible the facts and models it contained V' Lisp's incrementality to respond immediately to what its user wanted to do

V' A new kind of user interface to make the internal organization visible and navigable

11-______... on Object Oriented Programming

Q Kr1Btsn Nyga&rd, Unlv.ratty of Oslo. Title: BmalIt&Ilt

The "Newcastle '88 " Conference •••

Smallta1k What the Dynabook did not need: Multiple action sequences -+ objects with virtual procedures (methods) but not own action sequences -+ no non-virtual procedures Objects within objects -+ only one layer of nesting

on Object Oriented Programming _ ..aI 111..----.....- ...... _ the Dynabook d1c1 DOt noed ... Q Kr1Btsn Nyga&rd, Unlv.ratty of Oslo. IX . l O The "Newcastle '88 " Conference •••

ConceptEUerarcbdes Inheritance

Classes and Subclasses (Simula 67) Multiple inheritance Flavors (Cannon 1981) Smallta1k, Loops etc.

'-----...... on Object Oriented Programming ~ e Kr1sten Nygaard, Unlverslty of 0010. Title, concept Hlerr.rah1ee

The "Newcastle '88 " Conference ••• -----"""11 Non-Virtual and Virtual Procedures Sirnula 67 Messages = Virtual Procedures + Run Time Binding Smalltalk Generalized Virtual .. Attributes Beta

~ _____...... on Object Oriented Programming -..:I

© Kristen Nygaard. University of Oslo. Title, V!rtu&ls In Slmul&/ Sma1lt&lk/ BETA IX .ll The "Newcastle '88 " Conference .•. Main Application Areas for Object Oriented Programmjng:

t/ Simulation From 1965 on t/ General Programming From 1965 on t/ Concurrency, Monitors Ca. 1970 t/ Structured Programming Book appearing in 1973 t/ Abstract DataTypes Much work from ca. 1973 on t/ VSLI Design From the mid-seventies on t/ Workstation Environments, Incremental Smalltalk versions 1972-76-80 t/ Reusable Software Modules Early work from 1967 on, much work from ca.1980

!II... ___iliiiiiliiiiiliiii ..... iiii ••• on Object Oriented Programming

C Kr1sten Nyga.ard. Universlty ot Oslo. Title: Mam Appl1catlon Ar~

The "Newcastle '88 " Conference ••• Dimensions in Object Space

1Mo..... __ ...... iiiiiliiiii ••• on Object Oriented Programming

C Kristen Nygaard. University of Oslo. __IOnS In O~ect Sp&oo • I 1X.12 The "Newcastle '88 " Conference •••

Dimensions in Object Space - 2 Objects' basic qualities

V Substance V Value: Measure ot state properties V Transitions

tM.____ ...... on Object Oriented Programming

C Kristen Nygaard. University of Oslo. __lena In O~""' 8p.,.,.2. B.. le qualltJea

The "Newcastle '88 " Conference ••• Hierarchical Organization v Action Hierarchies by stacked objects V Value Hierarchies by categories and subcategories: patterns and subpatterns in BETA V Substance Hierarchies by nested objects in S1mula and BETA V Structure (Concept) Hierarchies by categories and subcategories: classes/subclasses in S1mula/Smalltalk etc., patterns and subpatterns in BETA V Program. Execution Hierarchies (from hardware through operating systems layers to program executions) by the actor/role concept in BETA.

rn...... on Object Oriented Programming © Kr1Bten Nygaard. University of OSlo. Title: mera.rch1cal Org&n1z&t.1I I X.13 The "Newcastle '88 " Conference •••

lopu , ...... " ...... ibeginrealA; lnnaDoe : procellu:re P, A : real - 1.13 , A:-l.13, proce4u:re PJ begin real B, A :-l.13 B:-A; ...... ; P; '0' , oOL eII4j eD4; ... ~. eII4j \ 1'».«I n n •• n n • • ••• n •••• n . n •• n. n n n. _blocklDAance " B I real- 1.13 1.1 B:- A; ..... ; P; ; ... end. ~

PlnnaDoe

1lI-______••• on Object Oriented Programming e Kristen Nyg&a.rd.., University of Oslo. T1t1&, Algol Program l!xocut1on

The "Newcastle '88 " Conference •••

Value Hierarchies

Colour: (# Blue, Red #) Colour ~ Blue Red Colour: (# Blue, Red (crimson, pin k) #) Colour ~ Blue Red ~ Crimson Pink

1lI-____...... _ _ ••• on Object Oriented Programming e Kr1sten Nygaard, University of Oslo. T1t1&, ValueH1erarch1es IX.14 The "Newcastle '88 " Conference •••

Value Hierarchies - 2

Colour: (# Blue, Red (Pink, Crimso n), Dark (Crimson) #)

~ Blue

Pink Crimson

lIi;;;;o,..... ______...... on Object Oriented Programming «.'> K:r1st:en Nygaard. University ot Oslo. Title: Value Hiera.reb.1es

The "Newcastle '88 " Conference •••

Job shop system oQject , Ilnstance I f t • • Part Operator• Machlnel Machlne2 oQject oQject oQject oQject

~ Ilns~cel Ilns+cel ~ t Ilns~cel RIght• Left arm arm oQject oQject

W//////////HA Sts.clt1n& (dynamic lInk)

---t.~ Nesting (static link)

Il1;;;;;0_...... on Object Oriented Programming

~ Kristen Nygaard. University ot Oslo. Title: 8lmul& Progrsm Execution IX . 1S The "Newcastle '88 " Conference •••

begin •••• cwsA; begin •••••• cwsC; begin ••••••• cwsD; begin ...... end; •• ••• end; ••••• end; cwsB; begin ..... end; ••••••• end;

l!I..______.... _ ... on Object Oriented Programming e Kr1sten Nygaard. University of Oslo. TItle: Or1g1n Hierarchy

The "Newcastle '88 " Conference ••• System Object class A class B

AI: A object Bl: B* object A2:A object

class a class a J, J, all: a object 012: a object 021: 0 object (class a of AI) (class 0 of AI) (class 0 of A2)

class D class D class D J, D211: D object D212: D object (class D of 021) (class D of 021)

I!!&...... ---- ••• on Object Oriented Programming ICl Kr1sten Nygaard, University of Oslo. TItle: 0r1g1n Hierarchy &nQ OQlects Scopes IX . 16 The "Newcastle '88 " Conference •••

Vehicle

~,""~ ;.' ~<" , &r>. ,:,..-;~t>

,.. ,.. --- ~~ F{~, ',,:; ~ v I ,,~:' ,-,' c.:~" -' " ... '- Truck BWI

Ambulance

Actiona

Ille-.....___ iiiiiiiiiiiiii _ _ ••• on Object Oriented Programming e Kr1Bten Nygaa,rd.. University of Oslo. TItle: Voh1ole/Car.Truck,Bus .

The "Newcastle '88 " Conference •••

Concept Eaerarcbdes Inheritance Classes and Subclasses (Simula 67) Multiple inheritance Flavors (Cannon 1981) Smallta1k, Loops etc.

ll!...... ___ ..... _ ...... on Object Oriented Programming C Kr1Bten Nygaard. University of Oslo. TItle: Concept Hlerarcll10 IX . 17 The "Newcastle '88 " Conference •••

Execution

II' Actors, ensembles II' Boles, performances

Interpretation (actor/role) Communication (object/object)

tI....,...... ,... .,...____ ... on Object Oriented Programming _ -'II e K:r1sten Nyga&rd.. University of Oslo. _tlcm H18rarobleall

The "Newcastle '88 " Conference •••

Item (object) - Part ot the action sequence ot a component object or system object

Component (object) - Independent, alternating action sequence

System (object) - Independent, concurrent action sequences

Ila_ ___ .,..._.,..._ ... on Object Oriented Programming e Kristen Nygaard, Univers1ty of Oslo. TltIa, Object; Kin, I X.IS The "Newcastle '88 " Conference •••

Item (Object)

V' Part of the action sequence of a component object or system object

V' Sequencing: unisequential and deterministic, through action stack

V' Both local procedures (categories), remote procedures and remote virtual procedures ("methods") available

l!!...... _ ••• on Object Oriented Programming © Kristen Nyg&a.rd. University of 0810. T1tJe: Item (OQj""')

The "Newcastle '88 " Conference •••

Component (Object)

V' Independent, alternating action sequence

V' Sequencing: non-deterministic alternation

V' Both deterministic alternation (distributed control through coroutines, quasi-parallelism), and semi-coroutines ("master-slave" control) available

L...... on Object Oriented Programming e Kristen Nygaard, UDlverslty of 0810. T1tJe: Component (oQjoot) IX .19 The "Newcastle '88 " Conference •••

System (Object)

ttl Independent, concurrent action sequences

ttl Sequencing: synchronized through rendez-vous

ttl Non-synchronized concurrency with message-passing aggregated by synchronized concurrency

l!1...... ___ ••• on Object Oriented Programming <0 Kr1sten Nyg&a.rd.. University of Oslo. Title: System (obJ"'

The "Newcastle '88 " Conference ••• Objects Category Specified - Singular - Repeated

Let P: (# ..... #); describe a category, then

HI : @P ; is category specified,

E8 : @(# ••••• #) ; is singular,

E3 : @P(# ••••• #); is singular with prefix, and

Erep: [100] @P ; is repeated.

11-__..... __ ...... _ ... on Object Oriented Programming e Kr1Bten Nyga.a.rd.. University of Oslo. Title: 81DgUlar/C&tegory 8pec1f1sd O~"ctB IX . 20 The "Newcastle '88 " Conference ••• Dimensions in Object Space - 3 Sequencing categories

Unisequential (items) Only one action sequence Alternating (components) Many action sequences, only one at a time Concurrent (systems) Many action sequences, maybe more than one at a time

l!!o.. ______••• on Object Oriented Programming

C> Kristen Nyga&rd, Unlveretty of Oslo. l!tIIloonClng C&tegorte. (text)

I'- The "Newcastle '88 " Conference •••

Sequencing Categories

•• • U'Di- Alternating Concurrent sequential Sequences Sequences +

~...... ---- ... on Object Oriented Programming ...... aI Q Kristen Nygaa,rd. University of Oslo. Title: SequenCIng C&tegorte./ 2 IX.21 The "Newcastle '88 " Conference •••

Sequencing Categories

Uni­ Alternating Concurrent sequential Sequences Sequences

PartiaJ on­ Synchronized Sequences determinlstic Concurrency Alternation

Deterministic Non­ Procedures = Alternation Synchronized (Co routines) Concurrency

Semi­ Co routines ...... /

111;;;;; __...... ____ ••• on Object Oriented Programming © Kristen Nygaard, University of Oslo. Title: Sequenc:1nS CategoMea/3

The "Newcastle '88 " Conference •••

U'ni­ sequential

PartiaJ Sequences

11.0...... _ ...... _ ...... on Object Oriented Programming

~ Kristen Nygaard, University of Oslo. Title: A1goliPascal8oquenc1Dg / 2 IX . 22 [F"- Th e "Newcastle '88 " Conference ••• i

Simula 67 Sequencing •, Uni- Alternating sequential Sequences

Partial• Sequences [. ", J .-----: ..... ----- Rem•o te Deterministic Procedures = .' Alternation Message Passing ' (Coroutines) . . ~

Semi- ,.' Coroutines ,...... /

... on Object Oriented Programming it) KriSten Nygaard. University of Oslo. Title: Blmul& 67 Soquenolng/2

The "Newcastle '88 " Conference •••

Uni­ sequential

Partial Sequences

Procedures =

=

~-----...... on Object Oriented Programming e Kr1sten Nyga.a.rd., University of Oslo. Title: Sm&llt&lk and Usps BoquenoJng/2 IX . 23 The "Newcastle '88 " Conference .••

Un!­ Concurrent sequential Sequences

Partial Synchronized Sequences Concurrency'

= Synchronized Concurrency

lIlo.o...... ••• on Object Oriented Programming o Kr1sten Nygaa,rd. University of Oslo. Title: Actors 8equeootng/2

The "Newcastle '88 " Conference •••

BETA Sequencing • Un!­ Alternating Concurrent sequential Sequences Sequences ~ . :tion- • Partial Synchronized Sequences deterministic Concurrency Alternation 'tr Deterministic Non- ' ' " ynchronized Alternation .." S (Coroutines) ,. Concurrency

Semi- :' " Co routines .." ...... / . i l!i;...,...... ••• on Object Oriented P ro g rammin g e Kristen Ny gaard, University of Oslo. Title: BETA SequeDC1ng/2 IX .24 The "Newcastle '88 " Conference •••

Dimensions in Object Space - 6 Construction modes V Static v Inserted v Dynamjcally linked

l!!.ooo ___...... ___ """ on Object Oriented Programming J @ Kr1sten Nyga,a,rd. University of Oslo. ~ctlOO Modee

The "Newcastle '88 " Conference •••

Dimensions in Object Space - 7 "Creator" Substrate Identity - Continuation - Version "Copy" versus "Move" (= Communication versus Transportatioin)

l!!.ooo_...... __ """ on Object Oriented Programming e Kr1Bten Nygaard. University of Oslo. -.10118 In Object Bpaoe ·7· "Creator" etc. IX . 25 The "Newcastle '88 " Conference •••

Interpretation actor / role (ensemble / roles) performance = program execution Communication object / object within system, between systems

l!!;;;;;;; __...... __ ••• on Object Oriented Programming _ ..aI ttl Kristen Nyga.&rd, University of Oslo. Title: lnterpretat1on/Communlce.t1c

The "Newcastle '88 " Conference •••

Informatics is the science that has as its domain inrormation processes and related phenomena in artifacts, society and nature

l!i;;;;;;;;...... _ ••• on Object Oriented Programming e Kristen Nygaard.. University of Oslo. Title: Ioform&t1t IX.26 The "Newcastle '88 " Conference •••

A phenomenon is:

II ... any fact, circumstance, or experience that is apparent to the senses and that can be scientifically described or appraised ... II

[Webster, 1984]

I!!;;;;;;;;;iiliiliiliiliiiliiliii...... on Object Oriented Programming ;;;iiiiiiiiilll

The "Newcastle '88 " Conference •••

Cognitive Phenomena (in minds of people)

Manifest Phenomena (e.g. computer program executions)

l!i;;;,;,;liiIiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii ••• on Object Oriented Programming e Kristen Nygaard, University of Oslo. Cogn1tlve/Ll&o1teBt Phenom8l' IX . 27 The "Newcastle '88 " Conference ••• Aspects of Sciences 1. Phenomenology: The empirical study of the phenomena - their identification, observed behaviour, and properties. (Tycho Brahe in astronomy, Linne in botany.) 2. Analysis: Comprehension and explanation of phenomena in terms of an underlying theory. Identification of important properties and concepts, relations between properties and concepts, description and predictiOns of behaviour. (Newton in astronomy, Darwin in biology.) 3. Synthesis, construction, technology: Knowledge organized for the purpose of interfering with, constructing, or generating phenomena.(Teller in nuclear physics.) 4. Multiperspective refiection: The concurrent or alternating use of several perspectives (from different sciences, or from within the same science) in the consideration of phenomena. The study of how changes introduced according to one wiewpoint affect properties of the phenomena when regarded from another viewpoint.

l!!-___ ...... on Object Oriented Programming C Kr1Bten Ny gaa.rd.. UIl1verslty of Oslo. Aspects of Bc1eoOl

The "Newcastle '88 " Conference ••• Perspective

A perspective is a part of a person's cognitive universe that may structure her or his cognitive process when relating to situations within some d.Qmain:

by selecting those properties of the situation that are being considered. (and, by implication, those that are ignored), and by providing concepts and other cognitions that are being used in the interpretation of the selected properties. (By the verb "structure" we imply "contribute to the structuring of")

lIo.. ______... on Object Oriented Programming '" Kr1sten Nyg&&rd. University of Oslo. Title: Perspecth IX . 28 The "Newcastle /88 " Conference •••

Process

The economic development of in the sixteenth century.

Ms. Brown recovered after an exhausting disease process

l""-liiiiiiliiiiii_liiiiiiliiiiii...... on Object Oriented Programming .e Kr1Bten Nygaa.rd, University of Oslo. Title: Process (

The "Newcastle /88 " Conference •••

Processes

V' The chajn of events (and changes of state) in an office, in a hospital.

V' The execution of a computer program.

V' Cognitive processes (in the mjnds of people).

11-______... on Object Oriented Programming

Q Kristen Nyg&a.rd. University ot Oslo. Title: IX.29 The "Newcastle '88 " Conference ••• Process A process is a development of a part of the world through transformations during a time interval. Structure Structure of a process is limitations of its set of possible states and of transitions between these states.

l!l...... iiiiiiiiiiiiiiiii ••• on Object Oriented Programming ...... !IJ e Kr1sten Nyg&a.rd. University of Oslo. Process and Structu

The "Newcastle '88 " Conference •••

Structures

V' Written and unwritten rules being obeyed

V' The effect of programs

V' Perspectives

l!l....iiiiiiiiliiiiiiiiiiiiiiliiiiii...... on Object Oriented Programming ...... ;;;/11 e Kristen Nyga.&rd, UniversIty of Oslo. Title: Struct\l.rl IX . 30 The "Newcastle '88 " Conference ••• Process-structure Levels. I Process: The information process ( e.g. program executions, data processing by people and machinery in offices, etc.). 2 Structure: The limitations imposed.upon this process by computer programs, mach1nehardware properties, written and unwrittearules of human behaviour etc. 3 Process: The system development process, including programming as a partial process, that has the structure of the information process (or the modification of its structure) as its product• . 4 Structure: The limitations imposed upon system development by organization, existing knowledge,. available resources etc• . a Process: The process of learning within organizations, the research process, the adaptation of organizations to a changed environment.

l!i;;;;;;;...... iiiiii ...... on Object Oriented Programming <0 Kr1Bten Nyga.a.rd., UD1verstty of Oslo. TItle: Process-structure Level

The "Newcastle '88 " Conference ••• Information process A process is regarded as an information process when the qualities considered are:

tI its substance, the physical matter that it transforms, tI measurable properties of its substance, the results of measurement represented by values, tI transformations of its substance and thus its measurable properties.

l!!;;;;;;;...... on Object Oriented Programming C Kr1sten Nyga.a.rd. University of Oslo. TItle: Inform.&t1on Proce IX . 31 The "Newcastle '88 " Conference •••

System

A system is a part of the world V that is regarded as a whole, V consisting of components, Veach component characterized by properties that are selected as being relevant, and by V state transitions relating to these properties and to other components and their properties.

11-_.... - ....._-_ ...... on Object Oriented Programming ttl Kristen Nygaa,rd, Universtty of Oslo. Tlt.l&: Syste

The "Newcastle '88 " Conference •••

Information System

An information system is a part of the world til that is regarded as a whole,

til with substance consisting of separate components,

til each component characterized by measurable properties that are selected as being relevant,

and by

til transitions, regarded as actions, relating to these properties and those of other components•

..._-_ ...... _- ... on Object Oriented Programming C Kr1sten Nygaard. University of Oslo. Title: Information System IX .32 The "Newcastle '88 " Conference •••

The abstraction of the three basic qualities of information processes (and information systems) V Substance - the class declaration (records, files)

V Properties with values - (quantities) the type declaration (or predefined types) V Transformation - (transition, action) the procedure declaration.

i!1;;;;;,;...... _ ... on Object Oriented Programming C Kristen Nygaard, University ot Oslo. Title: Abatract10n of the Three Basic

The "Newcastle '88 " Conference •••

Object Oriented Programmjng

System Oriented Programming

~...... __....,.; ...... on Object Oriented Programming C Kristen Nygaard. University of Oslo. Title: COP • System ( IX . 33 The "Newcastle '88 " Conference ••• Object Oriented Programming

V' In object oriented programming an information process is regarded as a system developing through transformations of its state

V' The substance of the system is organized as objects, building the system's components

V' A measurable property of the substance is a property of an object

V' Transformations of state are regarded as being the result of actions of objects

l!Io.o...... _ ... on Object Oriented Programming Cl Kristen Nyg&a.rd, University ot Oslo. Title: O~ect Oriented Progrommll

The "Newcastle '88 " Conference ••• Locality

"I am now an operator (machine, terminal, scheduler, car) - what do I do next? Which properties of mine are involved in the actions I am now carrying out?"

Focussing attention on one component, transition, concept at a time. Achieving encapsulation and modnlarity

L.__ ...... _ _ _ ... on Object Oriented Programming !O Kr1sten Nyg&a.rd.. UniV81'8lty ot Oslo. Title: I.oc&llty IX.34 The "Newcastle '88 " Conference ••• Decomposition

V' The system into components and the components into constituent parts

V' The identified possible states into more refined descriptions of these states

V' The actions into components' actions and their partial actions

V' The general concepts - in terms of which we comprehend the system - into more specialized concepts and their sub-concepts Languages must contain means allowing all these forms of hierarchization l!!-______...... on Object Oriented Programming I:> KrIsten Nyg&ard, Unlversl\y of 0810. T1t le: DecomposItIOn

The "Newcastle '88 " Conference •••

Beferent Phenomenon Language (System, Process)

Model Phenomenon Generator (SystemjProcess)

lI-___...... ____ ... on Object Oriented Programming C Kr1Bten Nyg&ard.. Univ ers1ty of Oslo. Title: Referent Phenomenon to Model IX.35 The "Newcastle '88 " Conference .••

Clas.of Programming Referent Phenomena Language

Clas.of Program Computer Executions

lli;;;;oo ______••• on Object Oriented Programming @ Kr1sten Nygaa.rd, University ot Oslo. Tit.l8: Mapping by Programming r.an_.

The "Newcastle '88 " Conference ...

Perspectives OD Programmjng

Transition Oriented Programming The computing process is viewed as a sequence of transitions between representative (meaningful) states, in which transformations of inputs produces outputs that in their turn are inputs to new transformations. Object Oriented Programming The computing process is viewed as the development of a system, consisting of objects (components), through sequences of changing object states. Constraint Oriented Programming The computing process is viewed as a deduction process, developing from an initial state, the process being restricted by sets of constraints and by inputs from the environment, the information about the set of possible states being deduced by an inferencing algorithm.

h ...... _ ... on Object Oriented Programming © Kr1sten Nygaa.rd, University of Oslo. Tit.l8: Perspect1ves on Progr&IIl..m.1I

IX . 37 The "Newcastle '88 " Conference •••

Reference Attributes

A reference is an attribute for which the associated set has substance (e.g. objects) as elements. The associated element (e.g. object) is called the referent.

I!.\;;;;;, __...... on Object Oriented Programming ...... &iII Kristen Nyg&a.rd.. University ot Oslo. Title: Reference Attrtbut.

The "Newcastle '88 " Conference ••• Quantity Attributes ~ : A quantity is an attribute for which:

t/ a method of measuring a property of some substance is defined, t/ there exists a mapping from the set of measurements of every possible state to the elements of the attribute I s associated set, called the value set, t/ the associated element, called the attribute's value, corresponds to the measurement of the property at the given moment.

L....______." on·Object Oriented Programming

e Kristen Nyg&a.rd.. University of Oslo. Title: ~t1ty AttrlbutA IX.38 The "Newcastle '88 " Conference ...

Pattern Attributes

A pattern attribute is an attribute for which the associated set contains prescriptions for common structure for a category of substance (e.g. objects)

l!I;;;;;;; ______... on Object Oriented Programming

C> Kr1sten Nygaard.. Un1ve1'81ty ot Oslo. Title: P&ttern Attrlbut.

The "Newcastle '88 " Conference •••

Alternative Objectives for the BETA Language Project

Alternative 1:

1/ ••• to wipe FORTRAN, COBOL and Ada off the map. /I This choice implied defining the project into failure before it even was started.

Alternative 2:

1/... to oontribute usefully to the development of oonoepts and oonstruots in prOl5I'smmtng languages during the ooming deoade. /I We have chosen Alternative 2 which, however, necessitates implementation and use to gain relevant and sufficient experience I l!&...... _ .....___ ...... on Object Oriented Programming C> Kristen Nygaard. University of Oslo. Title: Alterna.t1ve O'QjectJ.ves for BETA IX.39 The "Newcastle '88 " Conference ••• Conceptual Proliferation: - procedure, type procedure, class, type, - package, module, + control structures ..... The Alternative: Fewer, but more powerful abstraction mechanisms.

tra-...... _ ... on Object Oriented Programming ;;;;;;;0;;;;;;;;;111 <0 Kr1sten Nyga&rd. University of Oslo. Title: Conceptu&l Proliterat1on

The "Newcastle '88 " Conference ••• ----""'"""'""'Ill

Beta One, unifying abstraction mechanism

~...... ______... on Object Oriented Programming _ 001II

Kr1sten Nygaard. Unlvorsll;y of Oslo. T1tle: BETA, One. unifying IX .40 The "Newcastle '88 " Conference •••

One Abstraction Mechanism: a category of objects, called a "Pattern"

A BETA program execution is organized as a collection or objects:

Declaration of pattern (category): P: (# Dl; Da; ... Dn attributes enter (Vl,Va, ... Vr) input parameters Jill I1; Ia; ... ; 1m imperatives exit (Bl,Ba, ... Bs) output parameters #)

I!!.. __...... _- ••• on Object Oriented Programming · , e Kristen Nygaard. University ot Oslo. Title: One Abstraot.1on l4ech&D1am .. .

The "Newcastle '88 " Conference ...

(# { begin description} Dl; D2; ..... Dn {list of declarations} enter In {input parameters} do Imp {imperatives to be executed} exit Out {otput parameters} #) {end descriptions}

w.... __...... __ ••• on Object Oriented Programming @ Kr1sten Nygaard, University of Oslo. Title: BBTADescr1ptor IX . 41 The "Newcastle '88 " Conference •••

c: (# DI; D2; ..... Dn enter In do Imp exit Out #)

lII...... ____ .... ___ ... on Object Oriented Programming

II) KrIsten Nygaard, UnlV01'8lty or 0810. T1tle: BETA P.tt

The "Newcastle '88 " Conference ...

Point: (# x,y: @ Integer #)

PI, P2: @ Point

L..______... on Object Oriented Programming

II) KrIsten Nygaard, UnlV01'8lty or Oslo. Title: Pattern Point

IX .43 The "Newcastle '88 " Conference •••

SingularPoint: @ (# x,y: @ Integer; Move: (# dx, dy: @ Integer enter (dx, dy) do x + dx ~ x; y+dy~y #) #)

(11,22) -> SingularPoint.Move PI -> FlipHorizontal -> Rotate -> P2

lIo.._...... _ ...... on Object Oriented Programming ...... ;;;;;;;111 10 Kr1Bten Nygaard, UIl1verslty ot Oslo. Title: BIngUlarPotnt

The "Newcastle '88 " Conference •••

Modes ot generation: to! Static to! Dynamic to! Inserted .,

Kind aJ2d mode or aJ2 object are specified as :part or its generation.

11..___ ...... __ ... on Object Oriented Programming Cl Kr1aten Nygaa,rd, Univers1ty of Oelo. Title: KInds a.nd 140daa at QQjecto IX . 44 The "Newcastle '88 " Conference •••

Sequencing Categories

Uni- Alternating Concurrent sequential Sequences Sequences

Part!a.l Non- Synchronized Sequences deterministic Concurrency .- Alternation • " Remote Deterministic .'.. Non­ Procedures = Alternation , Synchronized Message Passing; (Co routines) , Concurrency ...... '

Semi- Co routines ......

Ill-...... __ ..... _ ... on Object Oriented Programming It> Kristen Ny ga&rd. University of Oslo . TItle, SequenCIng C&tegOr1es/ 3

..... The "Newcastle '88 " Conference •••

Sequencing Categories

•• U'ni- Alternating Concurrent* sequential Sequences Sequences t • •

1lI;;;;;...... _ ... on Object Oriented Programming © Kristen Ny g&a.rd. University of Oslo. TItle, SequenCIng C&tegOr1e8/ 2 IX.4S The "Newcastle '88 " Conference •••

Item (Object)

V Part of the action sequence of a component object or system object

V Sequencing: unisequential and deterministic, through action stack

V Both local procedures (categories), remote procedures and remote virtual procedures ("methods") available

l!I;;;;o;...... ___ ...... on Object Oriented Programming e Kristen Nygaard. University of Oslo. Title, Item (OQject)

The "Newcastle '88 " Conference •••

Component (Object)

V Independent, alternating action sequence

V Sequencing: non-deterministic alternation

V Both deterministic alternation (distributed control through coroutines, quasi-parallelism), and semi-coroutines ("master-slave" control) available

...... __ ...... on Object Oriented Programming C Kristen Nygaard.. University ot Oslo. Title, Compoll8Ilt (oQjoct) IX. 46 The "Newcastle '88 " Conference •••

System (Object)

V Independent, concurrent action sequences

V Sequencing: synchronized through rendez-vous

V Non-synchronized concurrency with message-passing aggregated by synchronized concurrency

....- ...... ------... on Object Oriented Programming (l Kr1Bt8n Nyga.a.rd, University of Oslo. TttJo: 8_ (obJo,

The "Newcastle '88 " Conference ••• Basic BETA Object Control Structure:

do ••• ; (I I S 1 I I sa I I ••• I I Sn I I); ••• • • • ; (I C 1 I ca I ••• I Cn I); ••• .. . ,. I ,. ... El-> Ea -> ••• -> En Ei: V « list of evaluations> ) V object denotation

11-_...... ____ ...... on Object Oriented Programming

Kr1Bten Nygaard, Unlvorslty of 0 010 . TttJo: Basic B1!TA Control Btructuree IX.47 The "Newcastle '88 " Conference •••

Snmmjngup kinds and modes of objects (1)

I: @ P static item C : @ I P static component S : @ I I P static system

111. ______...... on Object Oriented Programming -.....!II C Kristen Nygaa.rd.. University ot Oslo. Title: BummlDg up (1)

The "Newcastle '88 " Conference ••• Snmmjngup kinds and modes of objects (2)

rI • dynamjc item rC : dynamic component rS : dynamjc system

It..___ ..... ___ ... on Object Oriented Programming

I.' Kr1Bten Nygaard, University or Oalo. Title: BummlDg up (2) IX .48 The "Newcastle '88 " Conference ••• Snmmjngup kinds and modes of objects (3) do .. .,• P; inserted item (I PI); inserted component (I I P I I); inserted system .. .,• &OP; dynamic item (I &OP I); dynamjc component (I I &0 P I I); dynamjc system

llI-...... _ ... on Object Oriented Programming C Kr1Bten Nygaard.. University of Oslo. Title, Summing up ( 3)

The "Newcastle '88 " Conference •••

Description Determines What the Objects Model:

"records" Point: (# x,y: @ Real #) "types" Point: (# x,y: @ Real enter (x, y) = exit (x , y) #)

It...______••• on Object Oriented Programming -~ C Kr1Bten Nygaard. University ot Oslo. Title, De6cr1t1on Determlnea ... IX . 49 The "Newcastle '88 " Conference •••

ff procedure/ function"

Dist: (# pl,p2: @Point; D:@Beal; enter (pI, p2) do (* compute distance D between pI and p2 *) exit (D) #)

l!a-...... _ ••• on Object Oriented Programming _..:I C Kr1sten Nygaard.. University of Oslo. Title: Procedure/ PunctlOIl

The "Newcastle '88 " Conference ••• "class with method" Point: (# x,y: @Beal; Move: (# dx,dy: @ Beal; enter (dx,dy) do x +dx ->x; y+dy->y#) ••••••••••• #); Pl,P2 : @ Point; ... do • • • ; (1,2) -> Pl.Move; •••

tt..._ _ ...... on Object Oriented Programming _ ;;;;iI Kristen Nyg&ard, University of Oslo. T1tle, CIa8a with Method· IX . SO The "Newcastle '88 " Conference •••

Value Hierarchies Colour: (# Blue, Red #) Colour ~ Blue Red Colour: (# Blue, Red (crimson, pin k) #) Colour ~ Blue Red /'-... Crimson Pink

l"-...... __ ... on Object Oriented Programming .....iiiiII C Kr1Bt8n Nygaa.rd.. University of Oslo. Title: Value Hierarch1ea-l

The "Newcastle '88 " Conference •••

Specialization by Sub-Categories, "inheritance"

l!ioooo...... ~ ••• on Object Oriented Programming 10 Kr1sten Nyg&a.rd. University of Oslo. Title: Bpec1allzat'on by Subcategories IX. Sl The "Newcastle '88 " Conference •••

SpeciaUzation of Actions

0: (# ••• do Imp 1; inner; Imp3; #)

01: 0 (# ••• do Imp2 #)

111-______••• on Object Oriented Programming e Kristen Nygaa.rd, University of Oslo. Title: 8peo1al!zat1on of A.ot1On8

- The "Newcas tte '88" Conference ••• Virtual Categories • Partially specified categories • Similar to formal types and procedures 0: (# V:< Q; virtual declaration M:@V #) 01: 0 (# V:: Ql; #) virtual biDding

02: o (# , V:: Q2; #) virtual biDding 01: @01 01.M is a Ql-object 02:@02 02.M is a Q2-object

... on Ob 'ect Oriented Programming KrIsten Nyga&rd, University of 0810. Tltle: V1rtu&l CategOries IX.52 The "Newcastle '88 " Conference •••

if-imperative: (if EO = IIEl thenImp 1 IIE2 then Imp 2 ••• I I En then Imp n if) for-imperative: (for Inx:Top repeat Imp for)

I!I;,,;; ____..... __ ••• on Object Oriented Programming _....IIJ

~ Kristen Nygaard, University of Oslo. Title: if · tmperatJ.ve

The "Newcastle '88 " Conference ...

leave- and restart- imperatives: L: (if ••• I I ... then M: (for ••• • • • ; leave L; ••• • • • ; restart M; ••• for); II • • • if); lto.._.... ___ ...... on Object Oriented Programming C> Kr1sten Nygaard, University of 0810. Title: leave- and restart- Imper&t1vee IX .S3 The "Newcastle '88 " Conference •••

Language Restriction (Subsetting)

P: (# excluding [object generation]; excludedin [object generation]; enter do exit #)

L.______... on Object Oriented Programming ...... ;;;iII

() Kr1Bten Nygaard, Univers1ty ot Oslo. Title: ~ Restr1Ct1On IX.54

DISCUSSION

Basic Concepts in Object-Oriented Programming Professor McConalogue observed that, from the applications listed for object­ oriented programming, there was a notable one missing: databases, and asked whether that was deliberate. Professor Nygaard answered that in fact he was missing out at least two important applications: operating systems and databases, and he was hoping of having the chance to discuss them. He added that many of the attempts at making object-oriented databases are too narrow and limited, and that In the next decade the major vendors and users will reorganize their database products in an object-oriented fashion. Professor Atkinson asked for terms like "action sequence", "dynamic/static binding", "class/object" to be clarified, as a discussion basis for the rest of the seminar. Owing to the lack of time, the answer concentrated on "action sequence": components of complex programs can be called, exited and resumed; the interleaving of such actions can be termed an "action sequence". Mr. Kerr observed that a superclass may be regarded as an abstraction of its subclasses within single, but not within multiple, inheritance; therefore, inheritance and abstraction seem to be closely related, but not identical concepts; in other words· the technique of inheritance seems necessary to support abstraction, but distinct from it. Professor Nygaard found the remark interesting. Professor Randell pointed out that the notion of having at the same time different viewpoints on, or abstractions of, the same object may also be appropriate and useful. Professor Nygaard added that a language based on multiple perspectives would allow to look at things from different viewpoints, which would be useful (e.g. for database applications), and interesting. Professor Bjoerner commented on the speaker's view of object-oriented programming in terms of operational thinking, and on his belief that to describe and to program is to understand. He found that this seemed to suggest a contradiction between operational thinking and the logical framework. . Professor Nygaard answered that, in his definitions, concepts like substance and measurable properties of information processes should be accepted and rather general. Building on this, one should approach a phenomenon, and, through abstraction, construct perspectives that can be regarded as a common base. One may then enter a more specialized thinking of situations, and reason formally in terms of logics and objects. At this stage, the operational aspects disappear because they have been abstracted. Professor Bayer pointed out that his experience from object-oriented databases seemed to indicate a need for multiple inheritance, although it was unclear what kind of multiple inheritance. The answer was that this uncertainty could mean a need to be careful, and maybe look for a better approach than multiple inheritance. Professor Nygaard found that for databases "multiple perspectives" could be more useful than multiple inheri tance. IX. 55

DISCUSSION An Overview of the Beta Language Dr. Ogden asked whether the "pattern" abstraction of the Beta language did not provide only for a single body of code for each object, which would seem inadequate. Professor Nygaard replied that this was not the case, because Beta allows an arbitrary number of procedures, which can be referred to and executed. They may be control structures, for example, and are typically implemented as a pattern that is expanded inline. Professor Morrison asked whether the language did not require the introduction of what Griffith calls store replicators, e.g. arrays, bitmaps or vectors. Professor Nygaard answered that conceptually a bitmap or alike would be a Beta pattern, and would be implemented in an ordinary way, ensuring conformance with respect to the description in Beta.