59
1 Karl Reed u.karlsruhe.1 On the recognition of components, re-use and designs based on components-the problem of isomorphisms, some examples Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern estions and results from Jacob Cybulski, Oddur Benediktsson and Mark Wood

Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

  • Upload
    dusty

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

On the recognition of components, re-use and designs based on components-the problem of isomorphisms, some examples. Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern (using suggestions and results from Jacob Cybulski, Oddur Benediktsson and Mark Woodman). - PowerPoint PPT Presentation

Citation preview

Page 1: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

1

Karl Reedu.karlsruhe.1On the recognition of components,

re-use and designs based on components-the problem of

isomorphisms, some examples

Karl ReedVisiting Scientist

Fraunhofer IESE Kaiserslautern

(using suggestions and results from Jacob Cybulski, Oddur Benediktsson and Mark Woodman)

Page 2: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

2

Karl Reedu.karlsruhe.1About This SeminarAbout This Seminar

The issues of infrastructure may be solved, but the problem of “composition” remains…

Rather than present a theory, we present a series of COTS/CBSE problems collected over a 30 year period, and show their solutions

Several have been actually implemented… (and some are in the literature)

Some are assertions of “isomorphisms” Some are conjectures…. The collection illustrates a number of different techniques, and different

levels of granularity of composition re-use The results in each case will be presented in terms of the author’s

KABASPP classification

Page 3: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

3

Karl Reedu.karlsruhe.1The Presenter’s ViewsThe Presenter’s Views

My beliefs…B1. Without techniques for composition (functional and otherwise), CBSE

will progress slowly, if at allB2. Since people are actually building systems from components, and have

done so for a long time, there must exist “operational” rules for composition..B3. Theoretical approaches are important, however, an analysis of actual

case studies will provide a basis for theoretical development.. Let’s collect examples

B4. There (must) exist pervasive canonical representations of applications from different domains that define cross-domain isomorphisms…

B5. The emphasis on infrastructure and formality makes progress slow.B6. Detailed analyses of this kind may lead to improved “analogues” for standard

solutions

Page 4: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

4

Karl Reedu.karlsruhe.1The Audience? The Audience?

Experienced researchers who already know how important CBSE is…

So, we skip 6-7 slides motivating CBSE, and so-on..

Page 5: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

5

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning..

(an idea Reed 1990)3. Ungrouped list from IT areas4. What do we want to be able to do with CBSE, and where are we

at?5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 6: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

6

Karl Reedu.karlsruhe.11.1. Simple Examples from Phyiscal SciencesSimple Examples from Phyiscal Sciences

There are versions of the following problem-statements which are “isomorphisms” in that despite their different domains, they have a common solution/canonical representation.

1. The amount of “learning” achieved over time,2. the decay of charge on a capacitor, 3. the transfer of heat between two bodies, 4. the decay of a radio active substance, 5. efficiency of sub-sonic jet engines, 6. population growth ….all have the same canonical representation in terms of DE’s

dYY

=−kdx There are many more...

Page 7: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

7

Karl Reedu.karlsruhe.11.1. Simple Examples from Physical Simple Examples from Physical

SciencesSciences(cont’d)(cont’d)

Isomorphisms, Generalisations, Specialisations, Evolutions, Canonical Representations, Formal Methods

Next question.. How do we recognise these?? The role of Canonical Representations, Formal Methods

Canonical Representation… A Description of something in terms of some underlying properties that abstracts its true nature…

Formal Methods (maths..)…. A particular set of representational systems which include “reasoning” processes (proof techniques) which (in our case) permit the identification of descriptions with identical canonical representations..

Specialisation…. See above..

Page 8: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

8

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences

2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)

3. Un-grouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 9: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

9

Karl Reedu.karlsruhe.12. KABASPP Domains and Components2. KABASPP Domains and Components

AD- APPLICATIONS DOMAIN

- Acceleration characteristics of a train

- Organisational structure of business

- Rules for issuing air-line tickets or degrees

- Procedures for organising work flow

- Procedures for design of pressure vessel etc.

CURRENTLY Commercial Systems Analysis, Engineering Design Analysis,“Knowledge” Engineering and a well understood

process

APPLICATION SOLUTION DOMAIN - Algorithms for searching lists - Approx. method for calculating acceleration of

train - Procedure for allocating positions on a vehicle

given multiple access - Path optimisation procedure for routing of

information - Algorithm for rotating graphic images - Procedure for recovering disc-space - Sorting procedures

Currently Computer Science, graphics, A.I., S.E., etc.

Page 10: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

10

Karl Reedu.karlsruhe.12. KABASSP Domains and Components2. KABASSP Domains and Components

DEVELOPMENT ENVIRONMENT DOMAIN-Programming languages-Methodologies {JSD, SD, Modular Design}-Tools - CASE, other development aids, Test tools-O.S and control language - Shell, MCD, DOS, JCL,

etc.-Utilities - Loaders, File manipulation, editors,

configuration managers.-Files memory, DBMS-Compiler writing

CURRENTLY Computer Science, Software Engineering, etc

RUN-TIME DOMAIN- O.S. interfaces- DBMS calls- Instruction set, external interfaces- Resource constraints (i.e. profile of available cpu-time, i/o, mem for the system).- Response time- Device peculiarities- Hardware Reliability vs Design goal

CURRENTLY computer science and hardware plus S.E.

PROJECT MANAGEMENT DOMAIN- Estimating, Project Planning, Project Organisation- Resource acquisition, Project Tracking, Customer liaison- Quality Assurance, System Delivery, Maintenance Planning

CURRENTLY Commercial EDP and Software Engineering and KABA

Page 11: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

11

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed

1990)

3. Ungrouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 12: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

12

Karl Reedu.karlsruhe.1

Reuse examples, evolving listReuse examples, evolving listexamples from reed, cybulski, examples from reed, cybulski, bendiktsson and woodman bendiktsson and woodman rev2.0 8/9/2002rev2.0 8/9/2002

Page 13: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

13

Karl Reedu.karlsruhe.1Arrange these in groups which are either Arrange these in groups which are either

isomorphic, or, can be built from the same isomorphic, or, can be built from the same component kit. component kit. (1-9)(1-9)

1. Count the number of occurrences of different words in a text file...

2. A simple banking system, with passbook accounts

3. Design an ATM controller

4. Given a text file of records containing suburb names and their postcodes, check that each entry is correct,

5. A stock control system for a warehouse

6. implement a currency converter

7. design a “tickler” system, which tells you that you should look at file on a particular date and time.

8. A file with records containing sales incidents in the form of a product code and the no. sold, produce a list of the total no. sold for each product

9. A player flips two coins. If the coins have the same face, the player wins, else they loose

Page 14: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

14

Karl Reedu.karlsruhe.1Arrange these in groups which are either Arrange these in groups which are either

isomorphic, or, can be built from the same isomorphic, or, can be built from the same component kit. component kit. (10-15)(10-15)

10. A system for handling video store lending

11. A program to control a vending machine is required

12. design an email system which sends a message to a particular user,

13. A dice game in which players roll choose a number of dice to roll. They win if the sum of the total resulting from the roll is even, else they loose

14. A library lending system

15. Translate metric to imperial units

Page 15: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

15

Karl Reedu.karlsruhe.1Grouping the Examples..Grouping the Examples..REUSABLE REQUIREMENT FRAGMENTS

1. Count the number of occurrences of different words in a text file...

2. A simple banking system, with passbook accounts

3. Design an ATM controller

4. Given a text file of records containing suburb names and their

postcodes, check that each entry is correct,

5. A stock control system for a wharehouse

6. implement a currency converter

7. design a “tickler” system, which tells you that you should look at

file on a particular date and time.

8. A file with records containing sales incidents in the form of a

product code and the no. sold, produce a list of the total no. sold for

each product

9. A player flips two coins. If the coins have the same face, the

player wins, else they loose

10. A system for handling video store lending

11. A program to control a vending machine is required

12. design an email system which sends a message to a particular

user

13. A dice game in which players roll choose a number of dice to

roll. They win if the sum of the total resulting from the roll is even,

else they loose

14. A library lending system

15. Translate metric to imperial units

RF

Group

RF Origin

1. Count the number of occurrences of

different words in a text file

4. Given a text-file of records containing

a suburb name and its postcode. Check

that the post-code is correct for the

suburb name provided .

RG1

8. A with records containing sales

incidents in the form of a product code

and the no. of items sales for that

product. Produce a list of the total no.

sold for each product code.

First year student

assignment set La Trobe

university ~1991 (Reed)

6. Implement a currency converter

RG2 15. Translate kilometres to imperial

units

San Francisco Project

Component Suite,

Middlesex Univ.

Component Based

Process Project

7. design a “tickler” system, which tells

you that you should look at a file at

some future date and time

RG3

12. Design an email system which sends

a message to a particular user

RMIT PEOSK Software

Engineering team project

1981 (Reed)

13. A dice game in which players

choose a number of dice to roll. They

win if the sum of the faces is even, else

they loose.

RG4

9. A player flips two coins. If the coins

have the same face, the player wins

other wise they loose.

Example by Cybulski,

requirements re-use

~1996

11. Design a program to control a

vending machine dispensing drinks of

different price

RG5

3. Design an ATM controller

Example from

Benediktsson, 2001

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002

Page 16: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

16

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)3. Un-grouped list from IT areas

4. What do we want to be able to do with CBSE, and where are we at?

5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 17: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

17

Karl Reedu.karlsruhe.1

4.4. What do we want to be able to do with What do we want to be able to do with CBSE, and where are we at?CBSE, and where are we at?1. What do we want to able to do? (KR’s view) Construct systems from components to achieve a’priori

requirements, both functional and non-functional

More economically than by alternative means (in the broadest sense)

This requires the ability to reason about composition properties, either formally, or informally

2. Where are we at?-using ICSE CBSE as a basis for judgement...

Page 18: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

18

Karl Reedu.karlsruhe.14.4. What do we want to be able to do with What do we want to be able to do with

CBSE, and where are we at?CBSE, and where are we at?1. What do we want to able to do? (KR’s view)

2. Where are we at?-using ICSE CBSE as a basis for judgement...

General understanding of … Infrastructure requirements for CB systems

Mechanisms within existing programming paradigms and languages that support CB systems

Broad concepts of process issues - impact of CB on process models

Not well understood.. Reasoning about various properties of a composed system, e.g, functionality,security,

performance (?), testability, persistance

Mapping requirements onto selections of components

Compositional hierarchic ripple.. How are changes in the property of a component reflected the overall properties of a system?

Page 19: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

19

Karl Reedu.karlsruhe.14.4. What do we want to be able to do with What do we want to be able to do with

CBSE, and where are we at?CBSE, and where are we at? 1. What do we want to able to do? (KR’s view)

2. Where are we at?-Actually quite extensive history of CB systems, over a long period, so there is an opportunity to study these, and consider operational approaches..

(E.G. I worked on AKE130 at Ericsson’s in 1970.. The approach was large-scale, malleable component based.., with medium to high levels of code re-use across variants within the same product-line)

Page 20: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

20

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)3. Un-grouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?

5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 21: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

21

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

5. Solutions to the Ungrouped listApproach taken…. “semi-formal”,

5.1 Simple NL statements of functional requirements at a core level. This is based upon work proposed by Reed and undertaken by Cybulski in recognising commonality in requirements

5.2 Large amount of application domain knowledge used in some cases5.3 Canonical representations used in others,5.4 “formal” approach taken in only ONE5.5 The presentation in two cases is “work in progress”.. Note that there is iteration across the problems in

different domainsto be completed.. Convert some of these to “formal” notation.

5.6 Some of these have been implemented, some are examples stimulated by existing components5.7 We assume the following… and hence ignore them:-

5.7.1 Appropriate component/module deployment infrastructure exists (most of these examples could be demonstrated in Fortran 66…)

5.7.2 Various non functional requirements (e.g., security, performance, etc.) are orthoganal to the designs (this is not strictly true, however it will do for a start)

5.7.3 There is a separation between UI, Logic and Repository functions. We are dealing with the logic

Page 22: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

22

Karl Reedu.karlsruhe.15. Solution-RG1..5. Solution-RG1..

RFGroup

RF Origin

1. Count the number of occurrences ofdifferent words in a text file

4. Given a text-file of records containinga suburb name and its postcode. Check

that the post-code is correct for the

suburb name provided .

RG1

8. A file with records containing sales

incidents in the form of a product codeand the no. of items sales for that

product. Produce a list of the total no.

sold for each product code.

First year student

assignment set La Trobe

university ~1991 (Reed)

Page 23: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

23

Karl Reedu.karlsruhe.1

Alphachar string delimited by

blanks or specials

Tool ?Returns string of chars, delimited by blanks/specials with a “type”

Lexical analyser

Persistant DS for result

WORD COUNTit 2is 3not 2always 1Easy 1To 1See 1what 2And 1relevant 1When 1One 1Has 1This 1Done

Table-handler or DB

5. Solutions-RG1-S11. Count the number of occurrences of different words in a text file...

SAMPLE INPUT approach-how would you do this with paper and pencil

It is not always easy to see what is, and what is not relevant. When one has done this, often designs become easy-when it is not done, they may be “not-easy”.

Page 24: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

24

Karl Reedu.karlsruhe.1

Alphachar string delimited by

blanks or specials

Tool ?Returns string of chars, delimited by blanks/specials with a “type”

Lexical analyser

Persistent DS Table of valid suburb-postcode pairs

SUBURB POSTCODEBundoora 3083Eltham 3095Melbourne 3000

Table-handler or DB

5. Solutions-RG1-S14. Given a text-file of records containing a suburb name and its postcode. Check that the post-code is correct for the suburb name provided . SAMPLE INPUT approach-how would you do this

with paper and pencil, and the APO Post-code list

Melbourne∆∆3000

Eltham∆3095

Bundoora∆∆3083

Page 25: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

25

Karl Reedu.karlsruhe.1

Alphachar string delimited by

blanks or specials

Tool ?Returns string of chars, delimited by blanks/specials with a “type”

Lexical analyser

Persistent DS for result

Product Code No.soldDB123 80XY459 2UZV123-56 0UZV123-55 0

Table-handler or DB

5. Solutions-RG1-S18. A file with records containing sales incidents in the form of a product code and the no. sold, produce a list of the total no. sold for each product

SAMPLE INPUT

DB123,30

XY459,2

DB123,50

UZV1234-56,50

Page 26: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

26

Karl Reedu.karlsruhe.15. Solutions-RG1-S1

COMMON COMPONENTS…

-lexical analyser,

-table-handler/DB

Alphachar string delimited by

blanks or specials

Tool ?Returns string of chars, delimited by blanks/specials with a “type”

Lexical analyser

Persistant DS for result

Product Code No.soldDB123 70XY459 2UZV123-56 0UZV123-55 0

Table-handler or DB

SAMPLE INPUT

DB123,30

XY459,2

DB123,50

UZV1234-56,50

Page 27: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

27

Karl Reedu.karlsruhe.15. Solutions-RG1

COMMON COMPONENTS…

We were only looking for some re-usable building blocks. However, a more general re-usable template exists.

HOWEVER, the effort to use it may, for a AD/ASD novice, be too great..

Conjecture.. It may be possible to construct a simple table-driven FSM that will allow more than one of these to be implemented without changing the code!

Application Domain Knowledge..general knowledge of the world

Application Solution Domain..Application of elementary compiler and DB approaches to data-processing? (does this exist?)

Page 28: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

28

Karl Reedu.karlsruhe.15. Solution-RG2..5. Solution-RG2..

To make it interesting…

£lll:ss:pp

Radix conversion problem….

Convert to pence,Convert to Euro-centsConvert to Euros,cents

We have 12 p to the shilling, and 20 shillingsTo the pound.. Therefore..…

No._pence=lll*20*12+ss*12+pp

Let C be conversion rate of £ to ¤ Then Cp=C/2.40 is the conversion rate from pence to ¤c, Euro-cents

So, Temp =int(No_pence*Cp); ¤=int(Temp,100); ¤c=mod(temp,100)ie. ¤, ¤c

RF

Group

RF Origin

6. Implement a currency converter

RG2 15. Translate kilometres to imperial

units

San Francisco Project

Component Suite,

Middlesex Univ.

Component Based

Process Project

Page 29: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

29

Karl Reedu.karlsruhe.15. Solution-RG2..5. Solution-RG2..

Consider the “core” equation.. No._pence=lll*20*12+ss*12+pp

More generally..Consider V=dn-1dn-2….d1d0

Such that radix for position i is ri, then, in “units” (the value of

position i=0), we have..V= di

n−1≥i≥0∑ rj

i≥j≥0∏

Looking at the procedure of obtaining the Euros and Cents, we see it is the case where V is converted to a new radix system, V= Dm-1 Dm-2....D1 D0 ,where m≠n, and the radices are Rl . We obtain the Dl as follows…

Temp=V;for k=1 to m-1 do begin Dk-1=rem(Temp,Rk);Temp=int(Temp/Rk) end

Page 30: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

30

Karl Reedu.karlsruhe.1

Simply the conversion of V to a new radix system as before!

RF

Group

RF Origin

6. Implement a currency converter

RG2 15. Translate kilometres to imperial

units

San Francisco Project

Component Suite,

Middlesex Univ.

Component Based

Process Project

5. Solution-RG2...5. Solution-RG2...

Interesting…12 inches to the foot.3 feet to the yard,1760 yards to the mile1mm= 0.393701 inchSo, Cm-imp =0.393701Input.. km,m,mm

1000 metres to kilometre,1000 mm to metre..Output m,y,f,I

V= din−1≥i≥0∑ rj

i≥j≥0∏

No_mm=km*1000*1000+m*1000+mm

Temp=int(No_mm* Cm-imp )

No_inches=rem(Temp,12);Temp=int(Temp/12);No-feet =rem(Temp,3);Temp=int(Temp/3);No-Yards =rem(Temp,1760);Miles=int(Temp/1760)

Page 31: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

31

Karl Reedu.karlsruhe.15. Solution-RG2...5. Solution-RG2...

Result of analysis…

A single (primitive) module could be produced that requires the radix specifications as a (value) parameters, the positional values as input and output parameters, and the conversion factor, and the radix position it applies to.

Special versions can be (trivially) produced in almost any programming language-programming paradigm (with varying ease) by “wrapping” the primitive with the required radix sets

“Rounding” in the smallest position can also be dealt with,( the SFO Suite does this for currencies)

RF

Group

RF Origin

6. Implement a currency converter

RG2 15. Translate kilometres to imperial

units

San Francisco Project

Component Suite,

Middlesex Univ.

Component Based

Process Project

Page 32: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

32

Karl Reedu.karlsruhe.15. Solution-RG2...5. Solution-RG2...

Application Domain knowledge required…

Knowledge of natural structure of unit-systems as radix systems

Application-Solution Domain knowledge required…

High degree of a familiarity with radix arithmetic systems and conversion (I taught this in computer architecture classes for ten years…)

RF

Group

RF Origin

6. Implement a currency converter

RG2 15. Translate kilometres to imperial

units

San Francisco Project

Component Suite,

Middlesex Univ.

Component Based

Process Project

Page 33: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

33

Karl Reedu.karlsruhe.15. Solution-RG3..5. Solution-RG3..

RF

Group

RF Origin

7. design a “tickler” system, which tells

you that you should look at a file at

some future date and time

RG3

12. Design an email system which sends

a message to a particular user

RMIT PEOSK Software

Engineering team project

1981 (Reed)

Tickler system….“Remind me to look at a file/message at some date in the future.. What a great idea!”

Module interface….

tellme (message,date)

Email system….“Send a particular user a file/message”

We know this one…

sendmail(userid,message)

Are these different? Or are they the same!

Page 34: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

34

Karl Reedu.karlsruhe.1

RF

Group

RF Origin

7. design a “tickler” system, which tells

you that you should look at a file at

some future date and time

RG3

12. Design an email system which sends

a message to a particular user

RMIT PEOSK Software

Engineering team project

1981 (Reed)

5. Solution-RG3..5. Solution-RG3..

tellme (message,date)

What is implied in this case?

The address, the userid is me, or “owner”

sendmail(userid,message)

What is implied in this case?

The time when the message is to be delivered-the time is “now”

Both modules send a message..

Each is missing some item of spec. that the other has.

implies------------

sendmessage(userid,message,date ),mess_type

Page 35: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

35

Karl Reedu.karlsruhe.15. Solution-RG3..5. Solution-RG3..

RF

Group

RF Origin

7. design a “tickler” system, which tells

you that you should look at a file at

some future date and time

RG3

12. Design an email system which sends

a message to a particular user

RMIT PEOSK Software

Engineering team project

1981 (Reed)

Appl. Dom. knowledge..

Applic. Solution Domain…Designing Office Automation Systems for a while, experience with real refer again system Knowledge the functional requirements

Development Domain Experience with modular design strategies over 15 years… malleable component reuse… lateral thinking

Page 36: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

36

Karl Reedu.karlsruhe.1

Take two (coins) “things” , which are identical, except that they can be (tossed) “stimulated” simultaneously, and that when “stimulated”, assume one of two values…Stimulate the things. if the values are the same , the players wins,else, the player looses

Take n (dice) “things”, which are identical, except that they can be (rolled) “stimulated” simultaneously, and that when “stimulated”, assume one of six numeric values…Stimulate the things. if the sum of the values is even, the players wins,else, the player looses

RF

Group

RF Origin

13. A dice game in which players

choose a number of dice to roll. They

win if the sum of the faces is even, else

they loose.

RG4

9. A player flips two coins. If the coins

have the same face, the player wins

other wise they loose.

Example by Cybulski,

requirements re-use

~1996

5. Solution-RG4..5. Solution-RG4..

This suite of problems is best understood best by a (semi-)formal statement:-

Page 37: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

37

Karl Reedu.karlsruhe.15. Solution-RG4..5. Solution-RG4..

This suite of problems is best understood best by a (semi-)formal statement:-

“The game uses n tokens, each of which can be stimulated in such away (that) the value displayed by a particular token upon examination is chosen randomly from a set of (different) outcomes whose size is m” (Cybulski 2001). A win is defined by a function over the m outcomes which has the range {win,loose} For coins.. n=2,m={head,tail} WIN(t1,t2)=win if t1=t2 else looseFor dice, n=r,m={1,2,3,4,5,6},WIN=win if ∑1≤ j ≤mtj = even else loose

Take n (dice) “things”, which are identical, except that they can be (rolled) “stimulated” simultaneously, and that when “stimulated”, assume one of six numeric values…Stimulate the things. if the sum of the values is even, the players wins,else, the player looses

Page 38: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

38

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

11. Design a program to control avending machine dispensing drinks of

different price

RG5

3. Design an ATM controller

Example from

Benediktsson, 2001

Vending machine…

Customer selects item, as a result, item_value;L1:Advise customer of item_value;Customer inserts payment|more_coins;if payment≥item_value then {compute_change(change_value); issue(change_value)} else if no._tries <4 then go to L1:

5. Solution-RG5..5. Solution-RG5..

ATM…..

L1:Obtain Customer Credit Card No. and Pin;Obtain cash withdrawl size, Euros;Check authorization;if authorized then dispense (Euros) else {reject_transaction; if no._tries < 3 then go to L1};

proc. Dispense(Euros);*/split amount into available note-sizes; dispense*/c

proc. Issue(change_value);*/split amount into available coin-sizes; dispense*/c

Same algorithm

Page 39: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

39

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

11. Design a program to control avending machine dispensing drinks of

different price

RG5

3. Design an ATM controller

Example from

Benediktsson, 2001

5. Solution-RG5..5. Solution-RG5..

Extent of similarity.. (and this is the re-use problem)

Overall similarity seems initially to be rather weak.. A common algorithm (dispensing), and an overall pattern…In fact, the ATM and the vending machine should have slightly different patterns, but need not! (neither are generally very user friendly)

ASSERTION.. It is possible to create an (FSM-based) algorithm that will work for both, by recognising that some methods may be nullIt may be too complex to produce something so general that the HCI is perfect in both cases...

Page 40: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

40

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002*

4. Solution-RG6..4. Solution-RG6..

These four cases have a simple common model.. Starting with the Banking System...

create_an_account-->> an account is a list of transactions, and has a number of attributes, including account-id, set at creation time. Creation Authorisation! deposit_amount(account_id,amount) withdraw_amount(account_id,amount)--> there maybe rules here, balance must>over-draw_limit,amount<less_than_notification_limitclose_account(account_id)-->balance must be zerotransfer(account_id_source,account_id_destination,amount)--> rules may apply herecheck_balance(account_id, balance)

These two are redundant if account_id_source includes teller, temp,atm,eftpos

Only transfer needed as primitive

*See Mckeeman, 1975

Page 41: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

41

Karl Reedu.karlsruhe.14. Solution-RG6..4. Solution-RG6..

May have interest credited at regular intervals, calc on this acct. balanceMay have interest debited at regular intervals, calc. on this acct. balanceMay have interest credited at regular intervals, calc on other acct. balanceMay have interest debited at regular intervals, calc. on other acct. balanceMay have amount credited at regular intervals, from some sourceMay have amount debited at regular intervals, to some destination

Some abstractions already suggest themselves….

Starting with the Banking System… Other properties/Operations of an account..

Page 42: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

42

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002

The basic way it works is…1. Orders are taken. 2. Completed orders are filled. 3. At the “bin” level…

3.1 The quantity in a bin is decremented by a step in the order-filling process (if the quantity is large-enough)3.2 The quantity in a bin is increased (replenished) when the stock drops below a specified level3.3 The quantity in a bin may be replenished periodically3.4 The quantity in a bin may be different from the quantity available to be ordered

4. Special Conditions4.1 Increments/decrements and balances are usually (but NOT always) integer quantities (e.g. a bin containing wheat, etc.)4.2 Order-creation can be treated a separate problem4.3 Order-filling is a separate process-may involve optimisation techniques4.4 Bin-creation is an uncommon event (but it happens)4.5 Special discount systems affecting product, customer, stock-level and all of these

4. Solution-RG6..4. Solution-RG6..

In principle, this system consists of a set of “bins”, each with some location attributes...

Is this different from a bank account? Need for two records

and synchronisation?

Page 43: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

43

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002

4. Solution-RG6..4. Solution-RG6..

Video store..create_an_account-->> an account is a list of transactions, and has a number of attributes, including account-id, set at creation time. Creation Authorisationlend_video(account_id,video)--> there maybe rules here, no._videos_on_loan<less_than_max_allowedreturn_video(account_id,amount) close_account(account_id)-->No. videos on loan must be zeroVideo-requested(loaned_to_account_id, wanted_by_account_id_destination,video) check_balance(account_id, balance)

See Mckeeman, 1975

A list

Page 44: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

44

Karl Reedu.karlsruhe.14. Solution-RG6..4. Solution-RG6..

May request video return specific intervals, based on a lending transaction on this acct (in effect, a regular debit)May be notified requested video available at reg. intervals, based on other acct. returning requested video (in effect, a transfer, but triggered by some event)May be notify return of video requested by another acct. (in effect, a transfer, but triggered by some event)

The similarity with the banking system is high! A difference is that entries in accounts have properties that can trigger events.

Two mechanisms… A/ include this property in the type-declaration for the account entryB/ have an external “filter” which has a list of “requested videos”, and which is used to check all returns

Video System… Other properties/Operations of an account..

Page 45: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

45

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002

4. Solution-RG6..4. Solution-RG6..

Library lending systemcreate_an_account-->> an account is a list of transactions, and has a number of attributes, including account-id, set at creation time. Creation Authorisationlend_book(account_id,book)--> there maybe rules here, no._videos_on_loan<less_than_max_allowed, for more than one category of bookreturn_book(account_id,amount) close_account(account_id)-->No. book on loan must be zerobook-requested(loaned_to_account_id, wanted_by_account_id_destination,book) check_books_on_loan(account_id, books_on_loan)

See Mckeeman, 1975

A list

Page 46: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

46

Karl Reedu.karlsruhe.1

May request book return specific intervals, based on a lending transaction on this acct (in effect, a regular debit)May be notified requested book available at reg. intervals, based on other acct. returning requested book (in effect, a transfer, but triggered by some event)May be notify return of book requested by another acct. (in effect, a transfer, but triggered by some event)

The similarity with the banking system/library system is high! A difference is that entries in accounts have properties that can trigger events.

Two mechanisms… A/ include this property in the type-declaration for the account entryB/ have an external “filter” which has a list of “requested videos”, and which is used to check all returnsBut banks in Australia have notification requirements. Must notify authorities of cash transactions above a certain size + transactions have types anyway!

This means different types of “money” in transactions

4. Solution-RG6..4. Solution-RG6..Library Book Lending System… Other properties/Operations of an account..

Hence entries in a bank account have attributes.. like videos, books

Page 47: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

47

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

2. A simple banking system

5. A system for controlling stock in a

warehouse

10. A system for handling video store

lending

RG6

14. A Library lending system

Reed 2002

4. Solution-RG6..4. Solution-RG6..Similarity…….far more than appears at first glance…

the group (sbs,vsl,lls) are so similar that:-A/ a common component base can probably be developedB/ a common set of ‘patterns’ can definitely be developedC/ this seems to be a universal “analog”D/ some other possible systems of this type..

D.1/ Car-rentalD.2/ Equipment hireD.3/ Property rental (?)

E/ the warehouse systems seems to be something of an out-lyer, HOWEVER!E.1/ The basic operations are the sameE.2/ The “synchronisation” is in fact a transaction posting requirement. This exists

in banking systems (we did not discuss this)E.3/ The existence of async. Processes should not obscure the similarities

Page 48: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

48

Karl Reedu.karlsruhe.14. Solution-RG6..4. Solution-RG6..

Synchro-Synchro-nistation nistation problemproblem

Tranfser into account

Note transfer NOT completed until next working day!

Balance in Account

Actual Actual bank bank account account example.example.

Page 49: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

49

Karl Reedu.karlsruhe.14. Solution-RG6..4. Solution-RG6..

Actual Actual bank bank account account example.example.

Needed in all cases-date of transaction

Needed in all cases-description of transaction

May have different meaning, a field is needed

May have different meaning, a field is needed

Could be a tuple, for lending systems(or balance could be dynamically determined)

Page 50: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

50

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)3. Un-grouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?5. Solutions to the Ungrouped list

6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 51: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

51

Karl Reedu.karlsruhe.1

You must implement a linked list whose records have a key k, and the list is to be implemented on a random access file. The record are ordered under . The functions are..

• Add a record,• Print a record given a key k• Delete a record, “ “ “ “• Change the data in a record given its key• Change the key of a record with key k* to k**

• Print all records in key order…

• How many different functions are there here?• How would you discover them? (Reed 1980)

Examples of Re-Use etc.

Page 52: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

52

Karl Reedu.karlsruhe.1

You must implement a linked list whose records have a key k, and the list is to be implemented on a random access file. The record are ordered under . The functions are..

• Add a record,• Print a record given a key k• Delete a record, “ “ “ “• Change the data in a record given its key• Change the key of a record with key k* to

k**

• Print all records in key order…

How many different functions are there here?How would you discover them? (Reed 1980)

Examples of Re-Use etc.-linked listAll of these have a common

elements…

• Locate position for insertion (LPI)• Locate record to be printed (LPP)

• Locate record to be deleted (LPD)

• Locate the record to be changed (LPC)• LPD,LPI

• Interesting...

Page 53: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

53

Karl Reedu.karlsruhe.1

{ merge f and g into h }

begin reset (f) ; reset (g) ; rewrite (h); endfg := eof(f) or eof(g);

while not endfg do begin if f< g then begin get (f);endfg := eof(f) end

else begin h :=g ;get(g) end; put(h)

end; while not eof(g) do begin h:= g ;put (h); get (g) end while not eof(f) do begin h:= f ;put (h); get (f) end end

Extend to n-way merge...

Merge Routine From Jensen and Wirth.

Page 54: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

54

Karl Reedu.karlsruhe.1

You have received a large number of emails, and you are using the unix mailer pine…

PROBLEM create an email-alias list including all those who contacted you..

WHAT WE KNOW….

1. Folders of emails are simply files in the directory ~Mail/2. The function “take” will extract all email addresses from an email and present them to you as a list. It has a selection function which allows you to select which ones you want in an alias list3. It is possible to read a file as text into any email you wish to send

THERE ARE ENOUGH COMPONENTS HERE TO SOLVE THE PROBLEM-WHAT DO I DO?.

Examples of Re-Use etc.

Page 55: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

55

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)3. Un-grouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?5. Solutions to the Ungrouped list6. Some further examples

7. Conjectures on why progress is hard8. Where to from here?

Page 56: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

56

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

7. Conjectures on why progress is hard7.1 The emphasis in much research is “formal” and the results are hard to use7.2 The subject matter is inherently difficult to study

7.2.1 Hard to find examples7.2.2 Study is not glamorous7.2.3 Need experienced researchers

7.3 Not easy to get funding for the kind of studies that are needed.. Within-domain studies, and cross domain studies7.4 Expectations on outcomes may be wrong. The results are not silver bullets. (See Baragry 2000 on Cruise Control). They are, however, complete design “models”, sometimes involving high levels of code reuse7.5 S/W development is not taught in a way the trains people to seek isomorphisms. E.G. engineers and the linear decay problem7.6 Students are not taught cross-domain models, and how to use them. They can’t be we don’t have them7.7 THE SKILL OF DEVELOPERS AND POWER OF SYSTEMS HAS OUTSTRIPPED THE APPARENT NEED!

Page 57: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

57

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

8.Where to from here?8.1 Document isomorphisms and teach them!8.2 Study those environments where they are assumed to exist, and identify the

operational approaches used8.3 Develop appropriate formalisms, usable by practioners

In summary set specific agendas and go out and look

Danke schön

Page 58: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

58

Karl Reedu.karlsruhe.1Seminar AgendaSeminar Agenda

1. Simple Examples from Physical Sciences2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990)3. Un-grouped list from IT areas4. What do we want to be able to do with CBSE, and where are we at?5. Solutions to the Ungrouped list6. Some further examples7. Conjectures on why progress is hard8. Where to from here?

Page 59: Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

59

Karl Reedu.karlsruhe.1

RFGroup

RF Origin

11. Design a program to control avending machine dispensing drinks of

different price

RG5

3. Design an ATM controller

Example from

Benediktsson, 2001

5. Solution-RG5..5. Solution-RG5..

NEEDS KABASPP ANALYSIS