1 / 59

Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

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

dusty
Download Presentation

Karl Reed Visiting Scientist Fraunhofer IESE Kaiserslautern

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 (using suggestions and results from Jacob Cybulski, Oddur Benediktsson and Mark Woodman)

  2. 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 About This Seminar

  3. My beliefs… B1. Without techniques for composition (functional and otherwise), CBSE will progress slowly, if at all B2. 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 The Presenter’s Views

  4. Experienced researchers who already know how important CBSE is… So, we skip 6-7 slides motivating CBSE, and so-on.. The Audience?

  5. 1. Simple Examples from Physical Sciences 2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990) 3. Ungrouped 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 list 6. Some further examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

  6. 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 1. Simple Examples from Phyiscal Sciences There are many more...

  7. 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.. 1. Simple Examples from Physical Sciences(cont’d)

  8. 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 areas 4. 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 examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

  9. 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. 2. 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

  10. 2. 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 • CURRENTLYcomputer 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

  11. 1. Simple Examples from Physical Sciences 2. The Knowledge Based Approach to Software Project Planning.. (an idea Reed 1990) 3. Ungrouped 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 list 6. Some further examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

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

  13. 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 Arrange these in groups which are either isomorphic, or, can be built from the same component kit. (1-9)

  14. 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 Arrange these in groups which are either isomorphic, or, can be built from the same component kit. (10-15)

  15. Grouping the Examples..

  16. 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 areas 4. 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 examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

  17. 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... 4. What do we want to be able to do with CBSE, and where are we at?

  18. 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? 4. What do we want to be able to do with CBSE, and where are we at?

  19. 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) 4. What do we want to be able to do with CBSE, and where are we at?

  20. 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 areas 4. 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 examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

  21. 5. Solutions to the Ungrouped list Approach 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 cases 5.3 Canonical representations used in others, 5.4 “formal” approach taken in only ONE 5.5 The presentation in two cases is “work in progress”.. Note that there is iteration across the problems in different domains to be completed.. Convert some of these to “formal” notation. 5.6 Some of these have been implemented, some are examples stimulated by existing components 5.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 Seminar Agenda

  22. 5. Solution-RG1..

  23. 5. Solutions-RG1-S1 1. 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”. Alpha char string delimited by blanks or specials Persistant DS for result Returns string of chars, delimited by blanks/specials with a “type” Tool ? Table-handler or DB Lexical analyser

  24. 5. Solutions-RG1-S1 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 . SAMPLE INPUT approach-how would you do this with paper and pencil, and the APO Post-code list Melbourne∆∆3000 Eltham∆3095 Bundoora∆∆3083 Persistent DS Table of valid suburb-postcode pairs Alpha char string delimited by blanks or specials Returns string of chars, delimited by blanks/specials with a “type” Tool ? Table-handler or DB Lexical analyser

  25. 5. Solutions-RG1-S1 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 SAMPLE INPUT DB123,30 XY459,2 DB123,50 UZV1234-56,50 Alpha char string delimited by blanks or specials Persistent DS for result Returns string of chars, delimited by blanks/specials with a “type” Tool ? Table-handler or DB Lexical analyser

  26. 5. Solutions-RG1-S1 SAMPLE INPUT DB123,30 XY459,2 DB123,50 UZV1234-56,50 Alpha char string delimited by blanks or specials Persistant DS for result Returns string of chars, delimited by blanks/specials with a “type” Tool ? Table-handler or DB Lexical analyser COMMON COMPONENTS… -lexical analyser, -table-handler/DB

  27. 5. 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?)

  28. 5. Solution-RG2.. We have 12 p to the shilling, and 20 shillings To 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 To make it interesting… £lll:ss:pp Radix conversion problem…. Convert to pence, Convert to Euro-cents Convert to Euros,cents

  29. 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.. 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 . Weobtain the Dl as follows… Temp=V; for k=1 to m-1 do begin Dk-1=rem(Temp,Rk);Temp=int(Temp/Rk)end

  30. Simply the conversion of V to a new radix system as before! 5. Solution-RG2... Interesting… 12 inches to the foot. 3 feet to the yard, 1760 yards to the mile 1mm= 0.393701 inch So, Cm-imp =0.393701 Input.. km,m,mm 1000 metres to kilometre, 1000 mm to metre.. Output m,y,f,I 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)

  31. 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)

  32. 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…)

  33. 5. Solution-RG3.. 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!

  34. 5. Solution-RG3.. sendmail(userid,message) What is implied in this case? The time when the message is to be delivered-the time is “now” tellme (message,date) What is implied in this case? The address, the userid is me, or “owner” Both modules send a message.. Each is missing some item of spec. that the other has. implies ------------ sendmessage(userid,message,date ) ,mess_type

  35. 5. Solution-RG3.. • 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

  36. 5. Solution-RG4.. This suite of problems is best understood best by a (semi-)formal statement:- • 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

  37. 5. Solution-RG4.. This suite of problems is best understood best by a (semi-)formal statement:- • 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 • “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=t2else loose • For dice, n=r,m={1,2,3,4,5,6},WIN=win if ∑1≤ j ≤mtj = even else loose

  38. Same algorithm 5. Solution-RG5.. 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: 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

  39. 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 null • It may be too complex to produce something so general that the HCI is perfect in both cases...

  40. These two are redundant if account_id_source includes teller, temp,atm,eftpos 4. Solution-RG6.. Only transfer needed as primitive 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_limit • close_account(account_id)-->balance must be zero • transfer(account_id_source,account_id_destination,amount)--> rules may apply here • check_balance(account_id, balance) *See Mckeeman, 1975

  41. 4. Solution-RG6.. Starting with the Banking System… Other properties/Operations of an account.. • May have interest credited at regular intervals, calc on this acct. balance • May have interest debited at regular intervals, calc. on this acct. balance • May have interest credited at regular intervals, calc on other acct. balance • May have interest debited at regular intervals, calc. on other acct. balance • May have amount credited at regular intervals, from some source • May have amount debited at regular intervals, to some destination • Some abstractions already suggest themselves….

  42. 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? • 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 level • 3.3 The quantity in a bin may be replenished periodically • 3.4 The quantity in a bin may be different from the quantity available to be ordered • 4. Special Conditions • 4.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 problem • 4.3 Order-filling is a separate process-may involve optimisation techniques • 4.4 Bin-creation is an uncommon event (but it happens) • 4.5 Special discount systems affecting product, customer, stock-level and all of these Need for two records and synchronisation?

  43. 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 Authorisation • lend_video(account_id,video)--> there maybe rules here, no._videos_on_loan<less_than_max_allowed • return_video(account_id,amount) • close_account(account_id)-->No. videos on loan must be zero • Video-requested(loaned_to_account_id, wanted_by_account_id_destination,video) • check_balance(account_id, balance) A list See Mckeeman, 1975

  44. 4. Solution-RG6.. Video System… Other properties/Operations of an account.. • 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 entry B/ have an external “filter” which has a list of “requested videos”, and which is used to check all returns

  45. 4. Solution-RG6.. Library lending 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 • lend_book(account_id,book)--> there maybe rules here, no._videos_on_loan<less_than_max_allowed, for more than one category of book • return_book(account_id,amount) • close_account(account_id)-->No. book on loan must be zero • book-requested(loaned_to_account_id, wanted_by_account_id_destination,book) • check_books_on_loan(account_id, books_on_loan) A list See Mckeeman, 1975

  46. This means different types of “money” in transactions Hence entries in a bank account have attributes.. like videos, books 4. Solution-RG6.. Library Book Lending System… Other properties/Operations of an account.. • 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 entry B/ have an external “filter” which has a list of “requested videos”, and which is used to check all returns But banks in Australia have notification requirements. Must notify authorities of cash transactions above a certain size+ transactions have types anyway!

  47. 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 developed B/ a common set of ‘patterns’ can definitely be developed C/ this seems to be a universal “analog” D/ some other possible systems of this type.. D.1/ Car-rental D.2/ Equipment hire D.3/ Property rental (?) E/ the warehouse systems seems to be something of an out-lyer, HOWEVER! E.1/ The basic operations are the same E.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

  48. 4. Solution-RG6.. Actual bank account example. Balance in Account Tranfser into account Synchro-nistation problem Note transfer NOT completed until next working day!

  49. 4. Solution-RG6.. Needed in all cases-date of transaction Actual bank account example. 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)

  50. 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 areas 4. 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 examples 7. Conjectures on why progress is hard 8. Where to from here? Seminar Agenda

More Related