6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08 July, 008 Outlie Task Scearios Scearios i kowledge extractio Proposed framework Sceario geeratio Sceario decompositio Desig costructio Fast-food restaurat case-study Coclusios Task scearios Scearios i Kowledge Extractio We defie a sceario as a structured arrative text describig a system s requiremets i terms of system-eviromet iteractios at busiess rule level. Differet sceario represetatios: Simple text Graphical represetatio Relatioal algebra, etc. Commo applicatios of scearios: Requiremet elicitatio ad aalysis, Desig represetatio, Testig Maiteace Ehacemet of sceario geeratio by usig sceario schemas Formal represetatio of scearios usig tabular expressio is itroduced i order to simplify the tasks of sceario verificatio, validatio ad itegratio Schema defiitio for sematic model of scearios to help requiremet refiemets Modular represetatio of the scearios to support the reusability of the scearios i differet desig cotexts Proposed Framework for Sceario to Desig Diagram Trasformatio Proposed Framework Properties: Trasforms a set of text-based scearios ito two types of desig diagrams, as: Data ad Fuctio. Uses a sceario sytax that allows us to defie well-structured scearios. Uses a sceario schema to parse the scearios ad populate a object base of actors, actios, ad depedecies. Uses Guidelies for trasformig the elemets i the object base ito desig diagrams. Stage (Sceario geeratio) Stage (Sceario decompositio) Stage (Desig costructio) 5 6
6-0-0 Sceario Sytax Physical view Stage : Sceario Geeratio Sceario : {Actor + {Costraits} 0..M }..N + {Actio + {Costraits} 0..M }..N + {Workig Iformatio + {Costraits} 0..M }..N Example sceario: Order taker adds a meu item to a icomplete order. 7 Sample Sceario Template Form Proposed Sceario Schema Stage : Sceario Geeratio A sceario template forms the kowledge- base of a fast-food restaurat system Stage : Sceario Decompositio 9 0 Example of Sceario Decompositio: Oe of the Scearios Objectbase Created from 0 Scearios Stage : Sceario Decompositio Sample Fast-food sceario: Decomposed sceario: Stage : Sceario Decompositio
6-0-0 Desig Costructio Guidelies: Data View Geerated E-R Diagram Stage : Desig Costructio Step : Extract all istaces of Actor, Workig iformatio, ad Data depedecy classes from the object base ad apply the followig rules o them:. Istaces of Actor ad Workig iformatio are cadidate etities/attributes.. Istaces of Is depedecy imply geeralizatio ad iheritace relatioships, i.e., A Is B, meas A is sub-etity of B, or B is super-etity of A.. Cadidate etities/attributes that appear o either side of a Is, Is-associated-with, or Is-part-of relatioship are cosidered as etities.. Istaces of Has ad Belog-to depedecies are used to idetify the attributes of the etities, i.e., A Has B (or B Belogs-to A) meas B is a attribute of etity A. 5. Istaces of Is-associated-with depedecy imply cadidate associatio relatioships. Stage : Desig Costructio 6. Istaces of Is-part-of depedecy imply cadidate decompositio relatioships. Step : Depict every etity by a rectagle, every attribute of a etity as a bubble coected to it ad label them by their ames. Every relatioship betwee two etities ca be represeted by a lie coectig them. Label every relatioship accordig to the type of depedecy it came from, e.g., is, is-part-of, etc. Decomposed sceario Part of geerated ER diagram for fast-food restaurat Desig Costructio Guidelies: Fuctio view List of Actios i Order Takig Compoet ad the Follows Relatio Stage : Desig Costructio Step : Extract all istaces of Actio, Actio depedecy, ad Costrait classes from the object base ad apply the followig rules o them:. Istaces of Actio class are the fuctios.. Istaces of the Follow ad Precede depedecies determie the time-order of executio of the fuctios. To simplify the diagram geeratio, trasform all the Precede depedecies to Follow, i.e., for all fuctios f ad f, chage fprecede f to f Follow f. The participats of a Is-parallel-with depedecy must be executed cocurretly.. The coditios for a fuctio to follow aother is determied by the Costraits related to the fuctio, actor, ad workig iformatio i the correspodig sceario that the followig appears. Step: Geerate Follow+ relatioship (the trasitive-closure of the Follow). Step : Sort the fuctios i ascedig order based o the umber of the fuctios they follow, i.e., based o the umber of times they appear o the left had side of a Follow relatioship. Step : Startig from the first of the list, depict the fuctio (ame A) with a square ad label it by its ame. List all the fuctios that Follow A. Use AND ad OR coectors whe ecessary. Next, all arrows are labeled with the triggerig coditios obtaied i rule above. Fially, remove A from the list ad repeat Step, util the list is empty. 6 Geerated Fuctio Diagram Coclusio Stage : Desig Costructio Part of geerated Fuctio diagram for fast-food restaurat Task scearios: are used to geerate the igrediets of the desig diagrams. Sceario geeratio: geeratig a set of structured text-based scearios that coform with a regular expressio sytax. Sceario decompositio: mappig geerated scearios oto sceario schema which allows parsig the structured scearios ad geeratig istaces of schema classes. Desig costructio: geeratig desig diagrams i Data ad Fuctio views usig the decomposed scearios ad based o a set of guidelies. 7 8
6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Request For Proposal (RFP) Ma cf o o d r e s t a u ra t s ys tem Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca M ac F o o d is a ew restaurat chai which offers fast food to the customers. It uses a i-store computer system to assist order-takig ad paymet, food preparatio, delivery, ad ivetory. Orders ad paymets are take by staff usig touch-scree'' displays. Kitche ad delivery staff view orders o displays, ad register the status of orders by pressig buttos of the keypads. Ivetory of the food ad supplies is tracked by the computer system. The restaurat maager is able to cofigure the system to set meu items, igrediets, prices, ivetory levels, ad store setup. The followig sectio briefly itroduces the various uits of the M ac F o o d System. Departmet of Computig ad Software McMaster Uiversity CANADA The followig slides discuss the produced SRS after requiremet aalysis phase SEKE 08 July, 008 9 Physical view Order-Takig Uit This uit sets up customer orders ad hadles paymet. Meu items are selected from the restaurat-meu by touchig buttos o the touch-scree. Selectio of a item causes it to be added to the curret order (which is displayed i a scrollable widow o the scree), ad the subtotals / tax of the order are displayed. A order ca be paid aytime betwee its set-up ad delivery to the customer. The system keeps the cash balace of each order-takig statio ad has facilities for supportig cash float (i.e., a specified amout of cash i the order-takig statio at the begiig) ad skim (i.e., a threshold amout of cash, which oce exceeded, must be trasferred to the cash balace) of each statio. Each order is hadled by oly oe order-taker; however, the orders could be stored i a list ad each order-taker i the system ca access this list to service the stored orders. Assembly Uit Food Preparatio Uit Whe a order is set up, the kitche should be iformed to prepare the orderitems. I order to prepare a order, the system distributes order-items amog preparatio statios, equipped to prepare certai items of the restaurat-meu. Whe the computer system determies that all items of a order are available i the chutes, the order ca be assembled. I geeral, more tha oe statio is capable of makig a particular item. Each statio has a scree ad a keypad. Similar items of differet orders are grouped together. Each available assembly-statio picks the order ad displays it o its scree. The assembly-statios use scree ad keypad for iteractio with the staff. The staff assemble the orders, ad usig keypads iform the system. If the order is paid, the system allows the delivery of the order to the customer, otherwise, the delivery will be postpoed to the time that the order is paid. If the system idicates that a order ca be filled, but the chutes do ot cotai a sufficiet quatity of some order's item, the staff report the shortage to the system to be prepared. Cosiderig the umber of items assiged to each statio ad its curret load of work, the system decides whether to sed the items to that statio or ot. The scree of the preparatio-statio displays a list of items ad their quatities. Kitche staff prepare the required quatity of a item, put them i the chute, ad usig the keypad iform the system. There is oe chute for each meu item. Meu items are prepared i respose to real ad aticipatory demads. Aticipatory demads are set up by the maager to shorte the average time of waitig for food.
6-0-0 Ivetory Uit Maagemet Uit The maagemet-uit of the restaurat system is resposible for settig up: The ivetory uit i the system keeps track of the cosumptio of all materials used for preparatio ad packagig of the order-items. Active statios i order-takig, preparatio, ad assembly uits. We refer to these materials as raw-materials. This uit has a very close iteractio with the preparatio uit. System tables such as restaurat-meu, recipes, aticipated demads, miimum umber of meu-items, ad raw-materials i stock. The system keeps stock, ad the ivetory of raw materials is updated dyamically. List of meu-items to be prepared by each preparatio statio. Cash skim ad float. The arrival of ew materials ito storage is etered ito the system by the staff, ad the cosumptio of the materials is dictated by the recipes of food-items. Differet applicable taxes. To preserve stock itegrity, the system assumes a miimum threshold for usage of each meu-item i the system. If the umber of a certai meu-item drops below this threshold, it is cosidered uavailable ad the ivetory uit alerts the ordertakig uit to ihibit takig that item. System time ad date. E-R diagram of the Restaurat System 5