2
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.2Agenda 1. Introduction-the starting point for systems development- understandability vs precision 2. Re-use and component-based design-what we want and where we would like to have it 3. A view of “language” in technical environments-controlled languages 4. Some examples of re-use based upon language 5. Compilable Restricted Natural Language (CRNLP) as a solution-The Amdahl Project 6. Uses for CRNLP 7. Progress or the lack of it.. 8. Conclusions

3
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.3

4
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.4 1. Introduction-the starting point for systems development- understandability vs precision This talk is about work in progress..  Ideas that seem to be a useful way of looking at a set of problems  How established technology may be used to improve our results  Some results that are somewhat un-expected Our starting point is…. Mostly, we begin our development by gathering data, in some form of natural language…. So, if we can find ways of using this fact, we may:- 1. Reduce the errors due to mis-matches between specifications and user “needs” 2. Develop means of uncovering various kinds of commonality during all phases of implementation

5
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.5 1. Introduction-the starting point for systems development- understandability vs precision (cont’d) An interesting example…  An automotive ABS system has a (conceptually) simple goal statement. “If a wheel begins to lock under braking, then release the brakes, and when the wheel rotates, reapply the brakes. Do this in a manner which reduces the slip between the wheel and the road according to some algorithm”* Now consider a simplistic statement of traction control.. “If a wheel begins to rotate more rapidly than the vehicle speed requires, then apply the brake, and when this is not happening, then release the brake. Do this until the wheel is rotating at a rate required by the road-speed” THESE SEEM TO BE DIFFERENT PROBLEMS… and they are, however, if we state them appropriately, we see that they share common components and functions *Of course, its more complex than that, but it will do..See Kachroo and Tomizuka [1]for a detailed analysis, and for something lighter

6
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.6 1. Introduction-the starting point for systems development- understandability vs precision (cont’d) “If a wheel begins to lock under braking, then release the brakes, and when the wheel rotates, reapply the brakes. Do this in a manner which reduces the slip between the wheel and the road according to some algorithm”* Now consider a simplistic statement of traction control.. “If a wheel begins to rotate more rapidly than the vehicle speed requires, then apply the brake, and when this is not happening, then release the brake. Do this until the wheel is rotating at a rate required by the road-speed” By modifying the statement, to reduce the number of terms used (may be using an ontology, or constructing one as we go), we can change both specifications so that:- 1.The same terms are used with qualifiers, (may be logical, NOT) 2.The two statements expose their similarity* * The history suggests that traction control was always considered as part of the ABS problem, but that it was too expensive for some time. slip cease to rotate slip

7
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.7 1. Introduction-the starting point for systems development-understandability vs precision (cont’d) Rewritten…  Modifying the two statements we get… For the ABS... “If a wheel begins to cease to rotate, then release the brakes, and thenif wheel rotates,apply the brakes. Do this in a manner which reduces the slip between the wheel and the road according to some algorithm”* For the traction control.. “If a wheel begins wheel rotation not equal f(vehicle speed), then apply the brake, and when wheel rotation is equal f(vehicle speed), then release the brake. Do this until the wheel is rotating at a rate required by the road-speed according to some algorithm” We can now see that there are common functions and common components.. A1.ABS has a wheel rotation sensing system.. A2.ABS has electronic control of brakes A3.ABS needs speed sensors* A4.Modern ABS may have a slip detection T1.Traction Control needs a wheel rotation sensing system T2.Traction Control needs electronic control of brakes T3.Traction Control needs speed sensors T4.Modern Traction Control must have a slip detection * Actually, initially they were more These may be quite different Note restricted Language set used here Allows for identification of reuse..

8
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.8 1. Re-use and component-based design-what we want and where we would like to have it From Rosenbluth, W. (2001). Chapter 4 A Review of Antilock Braking and Traction Control Systems. Investigation and Interpretation of Black Box Data in Automobiles: A Guide to the Concepts and Formats of Computer Data in Vehicle Safety and Control Systems, ASTM/SAE.

9
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.9 1. Understandability vs precision Property of Requirements/ Specification For The user/clientDeveloper Formality-natural languageEasy to follow, may not be unambiguous for user May be very ambiguous and incomplete, obscure re-use opportunities Formality-formal specifications Almost impossible for users to follow May be incomplete, had to work with Diagrams (use-cases, FSM’s, logic tables, etc) Can be followed (reports of success by Leveson and Parnas with logic tables) May also be incomplete, but easy to work with for designers, re-use may be obscured Business Process ModelsMay be easier for usersAs above Test CasesMay be missleadingTest case design can be used to verify spec. during design, and development

10
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Re-use and component-based design-what we want and where we would like to have it Reuse… the real objectives are.. 1. Be able to recognise that ANY artifact, (design element, requirement,subsystem, code-fragment) is sufficiently identical to some other that the former may be used in place of the latter with or without modification 2. In the case where modification is needed to have prescriptive methods for making such modifications, and verifying their “fit” 3. To be able to assess the COST of such modification (or even the learning associated with re-using) so that a decision can be made. 4. To provide project process models which are both re-use generating and re-use intensive, with acceptable cost AND 5. To be able to derive required functionality from a set of re-useable “artifacts”

11
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Re-use and component-based design-what we want and where we would like to have it (Cont’d) So, what if we could show that the following two problems are the same? 1. Design a “tickler” system, which tells you that you should look at file on a particular date and time. 2. Design an system which sends a message to a particular user, OR a bit more interesting.. 1. A simple banking system, AND 2. A stock control system

12
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.12 3.A view of “language” in technical environments-controlled languages In the ABS system description, we restricted our form of language We suggest that humans, describing elements of a large system, tend to naturally restrict their language.. However, we can do this intentionally.. Young*, in 1992 studies a number of examples of this… *Yong, M. and Reed, K (1992). Identifying Reusable Components in Software Requirements Specifications to Develop a Natural Language-like SRS Language with a CRNLP Amdahl Australian Intelligent Tool Program (AAITP) Technical Report TR005, La Trobe University, Bundoora 3083, Vic. Australia.

13
Karl Reed Uni de Milano,Crema 21/5/08 R2 p A view of “language” in technical environments-controlled languages(cont’d) Yong took the following was taken from specification some Fortran Mathematical Library Routines* *Control Data Corporation, (1964) 31/32/3300 Computer System (Fortran) Library Routines, USA ABS: to compute the floating point absolute value for a floating point number. 2. ALOG: to compute the natural algorithm of a floating point argument. 3. ATAN: to compute the floating point arctangent in radians of a floating point number. 4.AND: to find the logical product of the integer operands, A and B. 5.ITOX: to compute the result of an integer raised to a floating point power. 1. ABS: to compute the floating point absolute value for a floating point number. 2. ALOG: to compute the natural algorithm of a floating point argument. 3. ATAN: to compute the floating point arctangent in radians of a floating point number. 4.AND: to find the logical product of the integer operands, A and B. 5.ITOX: to compute the result of an integer raised to a floating point power. Transform for consistency 1. ABS takes a floating point number and returns floating point absolute value. 2. ALOG takes a floating point number and returns natural algorithm. 3. ATAN takes a floating point number and returns floating point arctangent in radians. 4. AND takes integer, integer and returns logical product. 5. ITOX takes integer, floating point number returns floating point number raised to power.

14
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.14 3.A view of “language” in technical environments-controlled languages (cont’d) 3. Young considered the SRS for Tame#, which motivated the CRNLP concept… # Rombach, H D, Turner, J, Reed, K, (1986) "Requirements Document for TAME (Tools for an ADA Measurement Environment)", University of Maryland, USA, to produce intermediate output capable of being processed by gqma to evaluate model. 2. to produce output which can be stored in tame dbs with appropriate links to current source code so that suitable configuration management can be achieved. 3. to produce output in a form that can be used by the report generator. 4. to place result in dbs in a form suitable for used by other tools and report generator. 5. to present data in a form that can be used by gqma. 6. to produce output capable of being presented to gqm subsystem for display and for further analysis. Rewritten manually to give this consistent form from varied SRS fragments

15
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.15 Young produced simple grammars for all the cases he studied,and wrote a prolog parser for them.. Sentence-->to Allow Agent to Actions Object Actions-->Action {, Action} |Action {and Action} Optional-->which will be held in Place Allow -->allow |... Agent --> user |operator |... Action --> create | edit | maintain | display |... Object --> evaluation_model | result_of_analysis |scheduling_information |security_profiles |forms |... Place --> tame_dbs |... Acceptable sentences are: 1. to allow user to create, edit, maintain and display evaluation_models which will be held in tame_dbs. 2. to allow user to create, edit, maintain and display result of analysis which will be held in tame_dbs. 3. to allow user to create, edit, maintain and display scheduling information which will be held in tame_dbs. 4. to allow user to create, edit, maintain and display security_profiles which will be held in tame_dbs.

16
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.16 3.A view of “language” in technical environments-controlled languages (cont’d) More evidence of the editorial tendency to used “limited’ langauge Analysis of the US regulations supporting the Health Insurance Portability and Accountability Act. from Travis Breaux and Annie Antón (2008). "Analyzing Regulatory Rules for Privacy and Security Requirements." IEEE Transactions on Software Engineering vol. 34, no. 1: pp. 5-20,. This analysis transcribes the rules into semi-controlled language. Its not clear from the paper -KR

17
Karl Reed Uni de Milano,Crema 21/5/08 R2 p A view of “language” in technical environments-controlled languages (cont’d) The idea of controlled languages is not new… Important examples..

19
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Some examples of re-use based upon language - ASD-STE Chracteristics.. ASD-STE100 Simplified Technical English 1. No English auxiliary verbs, might, should or may. Do not exist in other languages. 2. Valid part names (may be globally registered?) and terms basic words 4. An average STE vocabulary can reach 8,500 to 12,500 terms writing rules. See Smart [2006]

20
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Some examples of re-use based upon language - ASD-STE Chracteristics.. ASD-STE100 Simplified Technical English The ASD-STE 100 dictionary defines the verb "to tap" as "to hit lightly and quickly". All other uses of "tap" are ambiguous and not compliant. Example: The use of tap as both a verb and noun. Tap (n) A tool to cut internal screw threads. Tap (v) To cut an internal thread. (technical) Tap (v) To cut, enter, supply, etc. Tapping (adj.) When you hear the tapping sound. Wrong STE: Tap the hydraulic line fitting thread. (Cut a thread.) Correct STE: Use a rubber hammer to tap the rotor surface. (Hit) From

22
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Some examples of re-use based upon language ASD-STE100 OMG Semantics of Business Vocabulary and Business Rules Specification (SBVR) Very major effort into controlled language with goal of automatic translation and semantics checking… (Reed, language too large and may defeat the goal of Controlled Language, may be uncompilable.. Cf with ASD-STE)

25
02/06/97 R.1 p25 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) system…. “Send a particular user a file/message” We know this one… sendmail(userid,message) Are these different? Or are they the same! R.1 p25

26
02/06/97 R.1 p26 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

28
02/06/97 R.1 p28 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,amountbalance must be zero  transfer(account_id_source,account_id_destination,amount)--> rules may apply here  check_balance(account_id, balance) These two are redundant if account_id_source incl teller, temp, atm, eftpos Only transfer needed as primitive *See Mckeeman, 1975

29
02/06/97 R.1 p29 4. Solution-RG6..  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…. Starting with the Banking System… Other properties/Operations of an account..

30
02/06/97 R.1 p30 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 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?

31
02/06/97 R.1 p31 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_loanNo. videos on loan must be zero  Video-requested(loaned_to_account_id, wanted_by_account_id_destination,video)  check_balance(account_id, balance) See Mckeeman, 1975 A list

32
02/06/97 R.1 p32 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 entry B/ 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..

33
02/06/97 R.1 p33 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_loanNo. 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) See Mckeeman, 1975 A list

34
02/06/97 R.1 p34  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! This means different types of “money” in transactions 4. Solution-RG6.. Library Book Lending System… Other properties/Operations of an account.. Hence entries in a bank account have attributes.. like videos, books

35
02/06/97 R.1 p35 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

37
02/06/97 R.1 p37 4. Solution-RG6.. Actual bank account example. Needed in all cases-date of transaction Needed in all cases- description of transaction May have different meaning, a field is needed Could be a tuple, for lending systems (or balance could be dynamically determined)

38
Karl Reed Uni de Milano,Crema 21/5/08 R2 p Some other “language based” possibilities Records of patient treatments for a vetinary doctor 1.2Records of repairs carried out expensive tyres for big trucks and aircraft* 2.1 Asset Management system for recording furniture, equipment in a business, and tracking its location/maintenance 2.2 Customer relationship system 3. Booking system lending system banking system ?? * Robert Hilton, 2006, actual systems

42
02/06/97 R.1 p42 AAITP Example.. (cont’d) Goal.. To prevent confusion when the following has been written §1 Add the customer_name to the customer list ….. §1023 Insert customer_id in the customer table …. §1592 Copy customer_id to customer_list …. §2437 Put the customer in customer file … These three are probably the same, so MAKE them the same! Insert This might be new, so, add it to thesaurus,else change it!

43
02/06/97 R.1 p43 Example of CRNLP Grammar for DETRACT (TR040, Torab, 1996) 4.2 Issue An Issue or Problem is a statement describing the design problem raised during some stage of the design. An example for an issue could be “How should HyperEdit and Link Server be integrated?”. ::= 'be' ‘?’ ::= {how, which way} ::= {should, could, would, can} ::= {implemented, designed,...} { This is a list of verbs which can grow, see comments for goal} examples: How should HyperEdit and Link Server be integrated? Which way should Links in HyperText be added? How should user-interface of DETRACT be implemented?

44
02/06/97 R.1 p44 Example of CRNLP Grammar for DETRACT (TR040, Torab, 1996) 4.3 Alternatives Once an issue is raised during the design, designers may propose different alternatives which they believe could resolve the issue. The objective is to choose the best alternative from all those proposed which would resolve the issue, and would satisfy the design goals. ::= ‘.’ ::='to' ::={use, have, select,...} { This is a list of verbs which can grow, see comment for goal} ::={specify, implement,...} { This is a list of verbs which can grow, see comment for goal} examples: Have menu to Specify Link in a tool. select document to specify link. use dialog-box to specify link. Use TCL/Tk to implement user-interface of DETRACT.

45
02/06/97 R.1 p45 Example of CRNLP Grammar for DETRACT (TR040, Torab, 1996) 4.4 Argument With respect to each alternative people may raise arguments, statements, facts, and speculations pro or against the alternative. An example of such an argument would be a screen in HyperEdit has an attribute. ::= ‘.’ ::= ::={is, has,...} { This is list of verbs which can grow, see comment for goal} examples: Target of Link is difficult. Source of link is not difficult. a screen in HyperEdit has an attribute. An argument may support or deny an alternative.

46
02/06/97 R.1 p46 Example of CRNLP Grammar for DETRACT (TR040, Torab, 1996) 4.5 Constraint Constraint is a statement specifying the restriction should be considered during the design. It again specifies attributes or features of the system which must met during the design. ::= '.' ::= ::= 'be' ::={in, using, by} ::={should, must} ::={implemented, specified,...} { This is a list of verbs which can grow, see comment for goal} examples: HyperEdit must be implemented in tcl/tk. Links in HyperEdit should be specified by dialog-box..

47
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.47 6.Uses for CRNLP Writing government regulations.. At icse last week in Leipzig * Storey et al TODO or To Bug: Exploring How Task Annotations Play a Role in the Work Practices of Software Developers *Wang et al. An Approach to Detecting Duplicate Bug Reports Using Natural Language and Execution Information * Help-desk recording of faults *Domain specific requirements gathering *Note should be part of a general ontology generation and use strategy..

49
Karl Reed Uni de Milano,Crema 21/5/08 R2 p.49 8.Conclusions Controlled languages provide a basis for recovering specifications for potential reuse Need to integrated with ontologies, but, seem to be working at a simpler level Controlled languages (CL’s) can be simple (STE,CFE) or complex (SBVR) Compilable Restricted NLP (or Compilable Restricted Controlled Language-CRCL) is relatively under developed, and a good space for applied research Converting simple specification statements to a CL seems to be a good way for identifying cross-domain isomorphisms Work has been done on constructing CL’s for requirements.. See Stephen Boyd, Didar Zowghi, Alia Farroukh, "Measuring the Expressiveness of a Constrained Natural Language: An Empirical Study," re, pp , 13th IEEE International Conference on Requirements Engineering (RE'05), 2005