13
The Diagram of Flow: Its Departure from Software Engineering and its Return Stephen Morris City University London United Kingdom Orlena Gotel Independent researcher New York, USA 1 1.5 2 i- I + 2 2.6 3 si # # a 2 6 4.5 2 2.5 4 4 4 5 j-J a # # si a # # sj + sj - Initial ‘flow diagram’ example given by Goldstine and von Neumann Burks, A.W., Goldstine, H.H. and von Neumann, J. Preliminary discussion of the logical design of an electronic computing instrument. Report for US Army Ordnance Dept. Sept. 1947 Wednesday, 20 June 2012 Last of three articles about the flow chart, initially expected to be just a few days’ research First article (Diagrams 06 at Stanford) dealt with all its interesting antecedents, this seminal reformulation defined by von Neumann and Goldstine to show flow of control in algorithmic computation in its very earliest form, ending with the publication of the ANSI standard in 1970 and ‘spaghetti’ programs ...

The Diagram of Flow: Its Departure from Software ...ollygotel.com/downloads/presentation-slides-the-diagram-of-flow.pdf · Last of three articles about the flow chart, ... HIPO -

Embed Size (px)

Citation preview

The Diagram of Flow: Its Departure from Software Engineering and its Return

Stephen MorrisCity University London

United Kingdom

Orlena GotelIndependent researcherNew York, USA

1 1.5 2i- I + 2 2.6 3

si# #

a2

6

4.5

2

2.5

4

4

4

5

j-J

a

#

# si

a#

#sj

+

sj

-

Initial ‘flow diagram’ example given by Goldstine and von Neumann

Burks, A.W., Goldstine, H.H. and von Neumann, J. Preliminary discussion of the logical design of an electronic computing instrument. Report for US Army Ordnance Dept. Sept. 1947

Wednesday, 20 June 2012Last of three articles about the flow chart, initially expected to be just a few days’ research

First article (Diagrams 06 at Stanford) dealt with all its interesting antecedents, this seminal reformulation defined by von Neumann and Goldstine to show flow of control in algorithmic computation in its very earliest form, ending with the publication of the ANSI standard in 1970 and ‘spaghetti’ programs ...

Higher level program flow chart by Mike Woodger, 1958

N9 File : Simplified programming systems for ACE. M. Woodger work 1959. Incl. complete DEUCE prog. for shockwave boundary layer interaction, Ma4532, 1957-59

Complex algorithmsSimple data

Wednesday, 20 June 2012Second article (Bulletin of the BSHM) showed the importance of flow charts when automated computation was having a radical effect on applied mathematicsUsed some of the few surviving examples of programme documentation from US and UK to show essential role of flow charts in complex algorithm representation and program structuring.

This third article takes up story with the appearance of many forms of what was known as ‘structured programming’ ...

Why structure the unstructured ?

• Ability to write increasingly complex programs using higher level languages

• Introduction of operating system programs to remove much of the effort from machine management

•!Availability of mass storage devices

• Shift in commercial domains towards mass data transformations and manipulations

•!General lack of experience in dealing with the problems of scaling

•!Craft nature of programming

• Rapidly expanding demand for machines and programming

Wednesday, 20 June 2012Not only such practical motivation but also theoretical opposition on grounds of need for formalityIn his book “The Science of Programming”(1981) David Gries used a phrase which he(?) had coined much earlier, "the flaw chart”, for “a two-dimensional representation that exhibited the program structure or flow of control”. For him, when using structured programming techniques, “good indentation obviates the need for a flaw chart."

Mike Woodger certainly stopped using them completely as approaches to programming altered radically to face issues of complexity and size ...

Hierarchical tree structure for program structure and control

Knuth, D.E. The art of computer programming - fundamental algorithms. Reading, Mass.: Addison Wesley, 1968

Q

N

O

MLKJF G H I

EDC

A

P

Parsing of functions or functional decomposition following Knuth

Wednesday, 20 June 2012Decomposition to solve problems of complexity and sizeNot simple division of functions because hierarchy of control maintaned(not A C J P A but A C J P J A)

This notion of hierarchy effects even flow charts ...

Flowchart with left-to-right levels of nesting by Dill et al.,1975

Dill, J.M., Hopson, R.W. and Dixon, D.F. Design and documentation standards. Providence, Rhode Island, Brown University, 1975.

TF

Ai+1Ai

NewswapsNewswaps + 1

Repeat :

Nswaps . 0

i . 0

DO :

i i+1

Ai+1Ai&Interchange

UntilNswaps =0

Loopexit

T

FWhilei n.1

Loopexit

Alterations to accommodate some indication of hierarchy

Wednesday, 20 June 2012Representation of nested loops used to implement an exchange sort algorithm for repositioning numbers in ascending orderLeft to right hierarchy of loops reminiscent, graphically, of swim lanes

Other attempts to continue using a flow-based conception ...

Internally nested representation of loops in a Chapin chart

Nassi, I. and Shneiderman, B. Flowchart techniques for structured programming. SIGPLAN Notices, Volume 8, Issue 8, August 1973

Repeat until nswaps = 0

Nswaps 0

Repeat for i = 1 to n.1

T >Ai+1Ai F

Ai+1Ai&Interchange

NewswapsNewswaps + 1

Radically different representation of nested structures by Chapin

Wednesday, 20 June 2012Representation of same algorithm in a Chapin chartIngenious use of 2D space but not one that obviously or easily solved problem of complexity or size

More radical approach in same year ...

Data structure and Data-centric program structure in JSD notation

Jackson, M.A. Data structures as a basis for program design. In Structured Programming.Infotech State of the Art Report. Maidenhead: Infotech International Limited, 1976.

F

G H I

E

DC

A

*

o o

Processle

Processgroup

*

Startgroup

Processgroupdata

Endgroup

Processrecord

*

Completely data-centric view initiated by Jackson

Wednesday, 20 June 2012In collection of articles by members of IFIP WG2.3 (Programming Methodology), chaired by Woodger 69-76 and set up to examine "problems of construction and control of reliable programs", 6th meeting in Oct 73 was, according to MW (p4) "memorable for M.A.Jackson’s account of commercial programming and his technique of matching program structure to file structure."Within 5 years being used by major companies such as ICI

Also reflects concern with possible use at highest level ...

Hierarchy of components, Inputs and Outputs in a HIPO process P

HIPO - A Design Aid and Documentation Tool. Poughkeepsie, NY, IBM Corporation, Form SR20 - 9413, 1973

P

!P1 P2

C

D

E

PA

B

Combination of hierarchical and data approaches in system descriptions of HIPO

Wednesday, 20 June 2012High level descriptions for whole system combiningprocess decomposition (upper) and data input, output and processingFlow chart has disappeared from standard set of diagrammatic toolsStill heavily used in many other fields

Another even bigger explosion of diagrammatic forms with database formalisations, multiple approaches to development and OO ...

Earliest version of the UML activity diagram, 1996

Booch, G., Jacobson, I. and Rumbaugh, J. The Unified Modeling Language for Object-Oriented Development. Documentation Set Version 0.91 Addendum. Santa Clara CA:Rational Software Corporation, September 1996

[no coffee]

[found coffee]

[no tea]

[found tea]

coffeePot.turnOn

light goes on

1 .. 4

1 .. 4

Person::Prepare Beverage

GetWater

MakeTea

Drink

Pour Coffee

FindBeverage

Add Waterto Reservoir

Turn onMachine

Brew coffee

GetCup

Put Coffeein Filter

Put Filterin Machine

“a special kind of state machine that describes the implementation of an operation in terms of its sub-operations.”

Wednesday, 20 June 2012Satisfies need “to show work involved in performing an operation by an object”‘activity’ involves invocation and execution of operation[guards] and complex condition expressed as chain by dummy intermediate node “a small round(sic) circle”Standard ‘state’ notation for ‘Brew coffee’No specific role for flow although control mentioned

Many twist and turns in the develoment of UML ...

Example of an activity diagram from UML Version 2.4

Object Management Group. OMG Unified Modeling Languagege (OMG UML), Version 2.4. [Figure 12.35 of the Superstructure Specification] January 2011.

[order rejected]

Ship Order

Close Order

FillOrder

Receive Order

SendInvoice

MakePayment

AcceptPayment

[order accepted]

Invoice

Explicit modelling of control flow and object flow

Wednesday, 20 June 2012By V1.4.2 diamond symbol back, plus action and sub-activity statesbut still ‘stereotyped’ form of state diagramBy V2.4 reformulation using Petri net semanticsReintroduction of old diamond symbol (squashed)‘actions’ as steps in ‘activities’ with own ‘nodes’‘object nodes’ from and to which object values may flow

Now OO based diagrams as pervasive, and unquestioned, as once were ‘structured programming’ techniques’ and before them flow charts ...

Navigation order in car-sharing application

Stahl, T., Volter, M., Bettin, J., Haase, A. and Helsen, S. Model-driven software development : technology, engineering, management. Chichester : John Wiley, c2006 [Fig.36 Change in navigation order]

Edit!Reservation

Reservation!Confirmation

Show!Reservation

Select!Car Category

User!Registration

Member!Identification

[OK][OK]

[Show !reservation]

[Create !reservation]

[Cancel]

[Cancel]

[Cancel]

[Cancel][End]

[OK] [OK]

Contemporary use in MDSD and agile design

Wednesday, 20 June 2012Place even in most ‘up-to-date’ techniques Role in new field of ecommerce because of importance of interface and navigation.

However ...

Edit!Reservation

Reservation!Confirmation

Show!Reservation

Select!Car Category

User!Registration

Member!Identification

[OK][OK]

[Show !reservation]

[Create !reservation]

[Cancel]

[Cancel]

[Cancel]

[Cancel][End]

[OK] [OK]

Mais plusça change ...

Member!Identification

Reservation!Confirmation

Edit!Reservation

Show!Reservation

Select!Car Category

User!Registration

cancel

ID !ok

END

reg !ok

T

F

F

T

F

T

cancel

F

T

START

Wednesday, 20 June 2012Figure on right is ‘Flow Chart Classic’ a redrawn version of figure on left,suggesting mutability of representation but not of fundamental abstraction

So what conclusions ? ...

Conclusions

Longevity of concepts, not representations

Flow as an essential high level abstractionin software engineering - control- data- navigation

Value of studying diagram development and use

Other concepts and their histories ?

Wednesday, 20 June 2012