Where do programming languages come from? - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Where do programming languages come from?

Description:

Title: PowerPoint Presentation Author: Kristen Nygaard Last modified by: swong Created Date: 11/20/2001 10:10:24 PM Document presentation format: Custom – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 34
Provided by: Kristen172
Category:

less

Transcript and Presenter's Notes

Title: Where do programming languages come from?


1
(No Transcript)
2
Where do programming languages come from?
Where do programming languages come from? Dad,
where do the programming languages come
from? They come from God, my boy How do
they come down to us, Dad? God has created
something wonderful called inspiration, and
uses that to bring a language into the minds of
some nice and bright people called language
designers. They write it down so that we may
read it and learn it. Dad, why has God made
such strange rules for parameters? Dont
trouble your brain with such difficult questions.
He always has a deeper meaning with what he does.
Read the language manual and learn it by heart!

3
Mathematics
Mathematics is about relations Relations between
specified quantities, valid within specified
domains x a x ab Rules for transformation
into other valid relations exist, as x x a
implies 0 a Informatics is about
processes Description of sequences of events
(state transitions) in processes x x a
does not imply a 0 and should instead be
written x a gt x
4
Notation Mathematics, BETA (98-08-11)
In the 1950s it was natural to try to
make programs look like mathematics (Fortran
means Formula Translation)
  • Mathematics y x , y F(x)
  • Fortran y x , y F(x)
  • Algol and Simula used a different operator
  • y x y F(x)
  • BETA emphasises that programs should describe
    processes, not relations
  • x gt y , x gt F gt y

Mathematics y Fn( F(n-1)(... F2( F1( x ) )..
).).).).).).) BETA (a,b) gt T12 gt T23 gt ... gt
T(n-1)n gt (x,y,z)
5
The pedagogy
The pedagogics of OO In pedagogics, a well-known
principle is that the basic concepts should be
taught first. More difficult and composite
concepts should come later, after the basic ones
are understood and mastered. Object-oriented
programming is intended to comprehend and
organise complexity. Its basic concepts are
objects, classes, inheritance, with objects
having attributes, virtuals, and possibly action
sequences (threads) that may run
concurrently. Teaching object-oriented
programming thus must begin with exposing
students to complex situation that only may be
mastered by understanding and using these
concepts.
6
The Restaurant, main picture
7
The Restaurant Waiter!/1
8
Waiter! Waiter!!... Waiter!!! Sorry.
Not my table.
RestaurantWaiter!/2
9
The Restaurant Waiter!/3
How will these people describe their evening at
Restaurant Objecta? Alternatives We had a
wonderful discussionabout William Blakes
poetry. A sadly dissapointing ChateauBrâne
Cantenac. Two bottlesof excellent Hermitage more
than made up for it. Laura is an
extraordinarilyintelligent woman. You can read
it in her eyes while she listens to
you.Object-oriented programming is not suited
to discussions about poetry, wines, women, men or
gastronomy.
10
The Restaurant Waiter!/4
Object-oriented programming is not suited to
discussions about poetry, wines, women or
gastronomy. OK.
F.A.Q
Q But what is OO then suited to describe? A
Systems. Q What is a system? A A system is
something that you have decided to regard as a
system. Q What does it imply to regard something
as a system? A You regard it as a whole,
consisting of components, each component has
pro-perties and may interact with other
components.
A restaurant owner, a head-waiter, an architect,
an infor-mation system designer will often regard
something as a system.
11
Waiter! Waiter!!... Waiter!!! Sorry.
Not my table.
RestaurantWaiter!/2
12
Waiter! Waiter!! Sorry. Not my table.
What is a table?
What is a table?
13
Who will be permitted to enter Restaurant Objecta?
14
J. P. Morgan IVs visit at Objecta
J. P. Morgan IVs visit at Restaurant OBJECTA
J. P. Morgan IV arrives every day (except
weekends) at 1700, and leaves 1800. He has
Table 2 reserved, and Peterson, his waiter, has
made everything ready for him. He will drink one
glass (after a smart deal two glasses) of
his special Armagnac 1942, drink Colombian coffee
and smoke a (Cuban, dont mention it) cigar. He
is known for always carrying at least 1000 and
a gun.
15
James Smiths visit at Restaurant Objecta
James Smith was hilariouslyhappy when the
wonderfulVenus Jones accepted hisdinner
invitation He had 117.35 to spend. When the
(perhaps) naiveVenus Jones read the menu,she
exclaimed They saythat Russian caviar is
fantastic with champagne!James Smith did not
have the guts to say no. Now their waiter, Aku
Akufrom Easter Island, waitsthe accumulated
bill is 147.50. if fundsltbill then
negotiateelse pay and leave
James Smiths visit at Objecta
16
Attributes Objects are individual identified
components having substance (material existence
in our environment, on the substrate of our
brain, on paper, in the memory of a
computer).Properties of objects are called
attributes. A reference is an attribute that
indicates some object and its current state is
called its referent. A quantity is attribute that
may be observed and measured, the result being
mapped upon a value set. The current state is
called its value. An action part is an attribute
specifying a sequence of transitions to be
carried out by the object, and the current state
is called its ongoing transition. A pattern
attribute is is an attribute prescribing the
common structure for a category of objects. The
collection of an objects pattern attributes is
called its repertoire.
17
Basic qualities of processes
Basic qualities of processes Substance Guests,
waiters, gatekeepers, tables, chairs, menus,
food, drinks, bills State References My table,
My waiter, successor (in queue) Quantities
Available money, food names, prices, smoker,
finished OBS!Action part object begin ...
... end object Pattern attributes
Order Transition Seating, ordering, serving,
eating, paying, negotiating Structure (permanent
properties of the process)
18
Basic qualities of processes
Basic qualities of processes Substance Guests,
waiters, gatekeepers, tables, chairs, menus,
food, drinks, bills State Available money, accum.
amounts on bills, guest names, food names,
prices, table numbers, reserved, smoker,
finished, no. of guests, Transition Seating,
ordering, serving, eating, paying,
negotiating Structure
19
The queue inside, with the headwaiter as
gatekeeper
The queue outside, with the doorman as gatekeeper
The gatekeepers
20
Description of J. P. Morgan IV/1(2000-05-25)
J. P. Morgan IVs visit at Restaurant OBJECTA
GUEST 1 object begin text name (J. P. Morgan
IV) amount funds ( 1000.00), accum bill (
147,50) Boolean smoker (true), finished
(false), reserved table
(true) ref(table) my table (TABLE 2)
ref(waiter) my waiter (PETERSON) procedure
order begin .... end if not reserved then
begin enter(outside queue) wait
end enter(inside queue) wait sit down at my
table attract ( my waiter) get menu order
drinks wait(consider smart deal) drink attract
(my waiter) while not finished do begin order
food order drinks wait (consider smart
deal) eat and drink if smoker then smoke
attract (my waiter) end ask for check wait
(consider smart deal) if accum bill funds
then pay else negotiate leave end object
21
James Morgan IVs visit at Restaurant OBJECTA
Colour code Structure, Substance,
State, Transition, Comments
GUEST 1 object begin text name (James Morgan
IV) amount funds ( 1000.00), accum bill (
147,50) Boolean smoker (true), finished
(false), reserved table
(true) ref(table) my table (TABLE 2)
ref(waiter) my waiter (PETERSON) procedure
order begin .... end if not reserved then
begin enter(outside queue) wait
end enter(inside queue) wait sit down at my
table attract (my waiter) get menu order
drinks wait(consider smart deal) drink attract
(my waiter) while not finished do begin order
food order drinks wait (consider smart
deal) eat and drink if smoker then smoke
attract (my waiter) end ask for check wait
(consider smart deal) if accum bill funds
then pay else negotiate leave end object
Description of J. P, Morgan IV/2(2000-05-25)
22
Guest James Smith (2000-05-25)


James Smiths visit at Restaurant OBJECTA
GUEST 9 object begin text name (JAMES
SMITH) amount funds ( 113.35), accum bill (
147,50) Boolean smoker (false), finished
(false), reserved table
(false) ref(table) my table (TABLE 6)
ref(waiter) my waiter (AKUAKU) procedure
order begin .... end if not reserved then
begin enter(outside queue) wait
end enter(inside queue) wait sit down at my
table attract ( my waiter) get menu order
drinks wait (admire Venus Jones) drink attract
(my waiter) while not finished do begin order
food order drinks wait (admire Venus
Jones) eat and drink if smoker then smoke
attract (my waiter) end ask for check wait
(nervously) if accum bill funds then pay else
negotiate leave end object
Description of James Smith/1(2000-05-25)
23
Guests at Restaurant OBJECTA (2000-05-25)
Guests visit at Restaurant OBJECTA
Structure, Substance, State,Transition, Comments
class guest begin text name amount funds,
accum bill Boolean smoker, finished, reserved
table ref(table) my table ref(waiter) my
waiter procedure order begin .... end if
not reserved then begin enter(outside queue)
wait end enter(inside queue) wait sit down at
my table attract ( my waiter) get menu order
drinks wait drink attract (my waiter)
while not finished do begin order food order
drinks wait eat and drink if smoker then
smoke attract (my waiter) end ask for check
wait if accum bill funds then pay else
negotiate leave end class
new guest (J. P. MORGAN IV, 1000.00, 0,
true, false, true, none, none)
new guest (JAMES SMITH, 113.35, 0,
false, false, false, none, none)
24
Cashier in Restaurant OBJECTA (2000-05-25)
25
The hub of the money streams. Hopefully, the
cash register model only reflect that the artist
was in a nostalgic mood. Or that it is one of
the modern gimmicks with a com- puter inside.
Cashier (2000-05-25)
26
Harbour as restaurant
Guests (ships) waiting outside restaurant
(harbour)
Head waiter (harbour captain)
Guest (ship) being tabled (berthed)
Waiter (crane)
Waiter (crane)
Waiter (crane)
Waiter (crane)
Guests (ships) at tables (berths)
Kitchen (warehouses delivering goods)
Warehouses receiving goods
27
Basic qualities of processes
Basic qualities of processes Substance Guests,
waiters, tables, food - Ships, berths, cranes
- Clerks, customers, waiting lines, accounts
- Records, documents, files State No. of guests,
prices, accum. amounts on bills - Largest free
berth length, crane speed, crane max. load
- Client waiting time, clerks average
transaction time - Documents arrival date, name
of sender, department code Transition Seating,
ordering, serving, eating, paying - Assigning
berths, berthing, unloading, loading, leaving
- Waiting, paying, receiving, informing
- Classifying, filing, finding, sending Structure
28
Attributes of objects
Attributes of objects (themselves having
substance)
Substance attributes Guests Successor guests in
waiting line, table unit, waiter, menu,
food Waiters Table units, orders,
cashier,chef Ships Berth, crane,
containers Documents Enclosures, sender, receiver
State attributes Guests Available money,
accumulated bill, smoker/non-smoker, finished
Waiters No. of tables, busy/available, accum.
tips Ships Arrival time, length, cargo
load Documents Arrival date, security level,
ref.no.
Transition attributes Guests Entering outside
queue, waiting, waiting inside for table,
getting attention and menu, ordering, waiting,
eating, paying, leaving Waiters Order cycle
Getting orders- informing kitchen - delivering
food, presenting bill, collecting Ships
Arriving, berthing, unloading, loading,
leaving Documents Creation, sending, receiving,
filing, updating
29
Reference Substance state - 1 (2000-05-22)
Reference Substance state
Scope
Specifier Block struct.
30
Reference Substance state - 2 (2000-05-22)
Reference Substance state
Scope
Specifier Block struct.
internal
31
Quantity Measured value state
State
Scope
Structure
Designation
Specifier Block struct.
Category Type
Name, Identifier
Value
Integer
Age
34
Quantities/Measured state(2000-05-25)
32
Pattern Structure state (2000-05-22)
Pattern Structure state
33
Intercepting cattle herds (98-08-09)
Structural similarity between very diverse
systems Intercepting cattle herds by mobile
milking machines
(Introducing SIMULA 67 to UNIVACs civilian and
military simulation groups in 1967)
Write a Comment
User Comments (0)
About PowerShow.com