Home
MSE Portfolio - Kansas State University
Contents
1. e type ACHIEVED implies e specEventID ACHIEVED and gmods specTree goal exists sg sg id e specGoalID and Sg isLeaf true A FAILED event will access the special FAILED event of GMoDS and must apply to a leaf specification goal pre ValidFailedEvent e type FAILED implies e specEventID FAILED and gmods specTree goal exists sg sg id e specGoalID and Sg isLeaf true If the type is 4POSITIVE TRIGGER or NEGATIVE TRIGGER the added event refers to a SpecificationEvent that exists in GMoDS Specification tree the event s specification goal is a leaf goal the event s Specification event s declared goal exists and the event s specification goal is either the goal on which the event was declared or a descendant of the declared goal pre ValidSpecEvent e type 4POSITIVE TRIGGER or e type NEGATIVE TRIGGER implies gmods specTree event exists se se id e specEventID and gmods specTree goal exists sg dg Sg isLeaf true and sg id e specGoalID and dg id se declaredGoalID and dg descendantsAndSelf includes sg 66 if the type is POSITIVE_TRIGGER or NEGATIVE_TRIGGER then it must provide the parameters
2. Instanc eGoalUl 1 canvas x assessState void InstanceTreeCanvas detem ineFinalTreeSize Dimension goalUIR egistry Instance GoalUIR egistry deter ineM inTreeSize graphics2D Graphics2D Dimension assessGoals void determine ToggleO ffset s graphics2D Graphics2D void createGoalUl goal InstanceGoal InstanceP arameters depth int void deter ineTreeT oggle Offsets graphics2D Graphics2D void l createG oalUIs void h dra wSelf graphics2D Graphics2D originX int originY int void ledetermineSize Dimension instT reeCan vas drawT ree graphics2D Graphics2D originX int origin Y int maxP eerHeight int void draw void IX resto boolean initialize void hasP arameters boolean LinitializeGoalsQ void initialized void orderGoals void resetF lashC ount void ishowAlIP arameters sho wParameters boolean void HsetShowParameters showParameters boolean void to ggleP arameters void toggleSubtree void Daemon AbstractCanv as fashers image Bufferedlmage graphics2D Graphics2D model GMoDSM odel testDriver TestDriver 1 goalUIR e gistry Instanc eGoalUIR egistry put goalUl InstanceGoalUl void CanvasGoalUls get identifier Uniqueldentifier InstanceGoalUl addc hil dUIs identifier Uniqueldentifier orderedC hildren List InstanceGoalUI void getRootUI InstanceGoalUl l ge
3. 150 Manual or Input Action to Date Test Case Simulation Set Status Reasons For Failure Resolve TC GV 3 S 0 FAIL Specification tree right Set preferred cutoff when zoomed in size and revalidate after zoom TC GV 9 S 0 PASS 3 15 2011 TC GV 6 S 0 PASS TC GV 7 S 0 PASS 9 4 Problems Encountered Table 65 Problems Encountered Test Case Failure Action to Resolve TC GTD 2 Event Script Operation Failed to catch an Deferred and accumulated IllegalGoalEventException IllegalGoalEventExceptions thrown when an invalid while it is unsafe to throw GoalEvent is encountered them Added try catch during event script play surrounding applicable code in the play pause and hasNext methods Added throw of the cumulative IllegalGoalEventException when it becomes safe to do so TC GV 1 Display Specification Tree Rightmost specification goal Add margins to the image on cutoff in drawing the right and bottom TC GV 3 Zooming Specification tree The content of the JScrollPane right bottom cutoff when the AbstractCanvas resets its zoomed in preferred size and then calls the method revalidate after a zoom TC GV 5 Show Hide AII Specification tree trigger Added a flag to Specification Goal Parameters parameters not hidden AbstractTriggerUI to prevent drawing parameters when hidden 9 5 Summary All manual and simulation test
4. 177 11 2 3 Lessons Learned 11 2 3 1 Writing a Valid Scrolling Client The Java Swing JScrollPane requires that any client update its preferred size and call revalidate prior to calling repaint This change fixed a bug with scrolling a zoomed image 11 2 3 2 The Rational Unified Process Works I learned that executing the Rational Unified Process indeed increases the confidence one should place in plans as the project unfolds The highly uncertain first phase gave way to confident execution of phases two and three 11 3Products This section reviews the products of the project for quality and for possible improvements in the future 11 3 1 Quality 11 3 1 1 Rework Ratio The rework ratio defined is as RW Epefects Epevelopment where Epefeects is the effort spent fixing defects and Epevelopment is the effort spent developing code Figure 118 below shows the plot of Rework Ratio over time throughout this project As expected since the majority of testing occurred at the end of the project the ratio increases as the majority of defects are found I believe that continued use of the GMoDS Test Driver and Visualizer would lead to a Rework Ratio that declines to near zero over time 178 Rework Ratio 0 0500 0 0450 0 0400 0 0350 0 0300 0 0250 0 0200 0 0150 Rework Ratio 0 0100 0 0050 0 0000 Figure 118 Rework Ratio 11 3 1 2 Mean Time between Failures 8 defines Mea
5. Component Responsibilities EditPreferencesPart Control the view for editing preferences SpecificationTreePart Control the zooming of the view for the specification tree InstanceTreePart Control the zooming of the view for the instance tree InstanceGoalPart Control the view for a instance goal 7 2 2 5 2 GMoDS Visualizer Controller Local Module Interface Specifications Table 48 AbstractPart Interface Specifications Respond to menu items and button clicks Respond to mouse clicks Syntax actionPerformed e ActionEvent void Pre none Post Necessary actions in response to menu items and button clicks have been performed Syntax mouseClicked e MouseEvent void Pre none Post Necessary actions in response to mouse clicks have been performed 7 2 2 5 3 GMoDS Visualizer Controller Design Rationale As described above the Model View Controller architecture separates the business rules for interacting with the user away from the presentation of the interface allowing for maximum flexibility I used this flexibility to enforce constraints on the FlashParameters flash cycle and period and RandomEventParameters minimum and maximum delay time to assure that flashing will appear reasonable 121 7 2 2 6 GMoDS Visualizer Controller Behavior self GMoDSVisualizerP art e ActionE vent view GMoDSVisualizerUI testDriver TestDriver actionCmd get amp di
6. Figure 96 Required Project Selection 158 10 2 2 Usage To use the GMoDS Visualizer in an application one must construct GMoDS VisualizerImpl and then call its initialize method GMoDsSVisualizerImpl takes 3 parameters 1 SpecificationTree 2 InstanceTree and 3 Test Driver An application that uses GMoDS should have no trouble identifying objects that implement parameters 1 and 2 above The InstanceTree object must have its initialize method called before being passed to the GMoDSVisualizerImpl constructor or an IllegalArgumentException will be thrown The application should send in null for the Test Driver To use the GMoDS Visualizer with the GMoDS Test Driver see 10 3 below 10 2 3 Common Commands GMoDS Visualizer Preferences nts Play Pause Specification Goals Instance Goals Zoom Reset Zoom Zoom Zoom G Reset Zoom lt lt and gt gt Figure 97 Edit Preferences Figure 97 above shows sample specification and instance trees for the goal diagram VisionDocument2 goal One can zoom the specification or instance tree using the applicable buttons Figure 97 shows that one can Edit Preferences Figure 98 below shows that one 159 can Edit Preferences States for the GMoDS Visualizer This allows one to pick the total time a changed goal will flash the time for a single flash and select colors for any goal s
7. GoalE ventimp lt lt instantiate gt gt testdriver ester Se AI E E pinnae String Interfac e EventScript testdriver play void pause void next void hasNext boolean addObserver o Observer void addEvent e GoalEvent vod wrteXML String isPlaying boolean issueNotification To Observers void i I EventScriptimp testdriver gmods Interfac e gt gt index int 1 GoalTree i 5 model Events incrementindex void nextE ventlssued void getNextE vent GoalE vent Random vertScriptimp getNextE vent GoalE vent createR andomE vent GoalEvent l nextE ventlssued void jenextint n int int AbstractEventGenerator AchievedEventGenerator goal InstanceGoal InstanceP arameters type EventT ype generateE vent gmods GoalTree GoalE vent getRandomDelayTime int HtgetEventident ierQ Uniqueldent fier FailedEventGenerator WcreateEventParameters gmods GoalTree Map Uniqueldentifier Object ModifiedE ventG enerator T lt q OOO 1j AbstractTriggerEventGenerator amp specE vent SpecificationE vent PositiveTriggerEv entG enerator fgetE ventIdentifier Uniqueldentifier g enerateE vent gmods GoalTree GoalEvent NegativeTriggerEventGenerator createE ventParameters gm ods GoalTree Map lt Uniqueldentifie
8. Reset Zoom Zoom lt lt and gt gt Figure 102 Valid events executed Figure 102 above shows the same specification and instance trees after the script shown in Figure 112 below is executed Compare Figure 103 and Figure 104 below to this figure To collapse all child goals of a particular instance goal click the rectangle containing the minus sign below the instance goal To expand the child goals click the rectangle containing plus sign To hide the parameters of a particular instance goal click the rectangle containing H To show the parameters click the rectangle containing S 164 B GMoDs Visualizer File Edit View Issue Random Events play W Pause F Next Specification Goals j Instance Goals _ Zoom Reset Zoom Zoom _ Zoom Reset Zoom Zoom Figure 103 Collapse sub goals 165 GMobs Visualizer issue Random Events Play Pause Specification Goals Instance Goals Zoom Reset Zoom Zoom Reset Zoom Zoom lt lt and gt gt af 9611 kM Figure 104 Hide parameters 10 3GMoDS Test Driver The GMoDS Test Driver can be used to test GMoDS or the GMoDS Visualizer using scripts or random events in manual or automatic mode 10 3 1 Installation 10 3 1 1 Install the GMoDS Visualizer Follow the steps in section 10 2 1 above skipping section 10 2
9. e ee SEE ee ee i atte Figure 68 FlashDaemon run Figure 68 above shows the FlashDaemon run method The daemon polls its queue for changed InstanceGoalUlIs If none are present it waits If at least one is present that has not finished flashing it waits for a half flashing cycle and then toggles each changed InstanceGoalUI recording whether that UI is finished Finally the daemon asks the InstanceTreeUI to draw and then removes the finished UIs This loop repeats indefinitely until the visualizer exits Figure 69 below shows the InstanceTreeUI draw method Holds canvas in a JScrollPane D canvas Instance TreeC anvas P draw Instance TreeC anvas draw repaint Figure 69 InstanceTreeUI draw 118 self InstanceTreeUl canvas Instance TreeCanvas ui InstanceGoalUl changedGoals ConcurrentLink edQueue InstanceG oalUI FlashDaemon model GMoDSModel T T i create GoalUls Instance TreeCanvas createG oalUIs ui get Uniqueldentifieryarg T modified isinstanceGoalOrAnoestorModified Uniqueldentifier arg ANNE modifie d resetF lashC ount ui null add ui a a a et EY re qp 4 H Instance TreeCanvas dra w synchronized LX Figure 70 InstanceTreeULupdate o Observable arg Object Figure 70 above shows the InstanceTreeUI update method This method im
10. get nstanceGoallD Uniqueldentifier InstanceGoalU sInstanceTreeCanvas model GMoDSModel testDriver TestDriver instTreeUl InstanceTreeU showAllP arameters sho wParameters boolean void jsstartThread void jtrun void AbstractCam as fimage Bufferedimage faraphics2D Graphics2D fmodel GMoDSM odel tresize void draw void paintCom ponent g Graphics void fdetemineSize Dimension eintializeQ void rzoomin void eresetZoom void rzoomOut void Figure 49 GMoDS Visualizer View Architecture 96 AbstractUl J controller AbstractPart model GMoDSM odel testDriver TestDriver initialized boolean createUl void SpecificationTreeUI getComponent Component laraw void makeController AbstractPart H update o Observable arg Object void x registerWithModel void initialize void A SpecificationG oalU Raining AbstractRelation Ui goalUIR e gistry SpecificationG oalUIR egistry tone fgoalUIRegistry SpecificationGoalUiRegistry cleterm ineM inTreeSize graphics2D Graphics2D Dimension dest determineRouting void determ ineTreeR elationO ffsets graphics2D Graphics2D void 1 X de
11. parameterLabels List lt String gt new ArrayList lt String gt 0 i A assessState void 4 RelationsTo flash boolean 1 drawTree graphics2D Graphics2D origin int origin Y int maxPeerHeight int void SpecificationGoalUI Je y AbstractRelation UI goal ParameterizedSpecificationGoal dest depth int A goalName String sc o LparameterNames List String new ArrayList String 1 relation Sith ee Loffset int UlConstants getMinHorizGoalP ad RelationsF rom krawrree graphics2D Graphics2D originX int origin Y int maxPeerHeight int void instancelresil changedGoals Queue InstanceGoalUl newConcurrentLinkedQueue InstanceGoalUl eupdate o Observable arg Object void edraw void Y RelationRegister ameU 1 Y containerFor A Flashes 1 canvas 1 canvas 1 canvas 1 flashDaem on SpecificationTreeCanvas InstanceTreeCanvas FlashDaemon goalUIRegistry SpecificationG oalUIRegistry relations List AbstradRelationUl new ArrayListe AbstractR elationUl work Queue Queue InstanceGoalUl null lashers Set lt InstanceGoalUl gt newHashSet lt InstanceG oalUI goalUIRegistry Instance GoalUlRegistry createGoalUls void addReelationUl relationUl AbstractRelationUI void drawRelations void get instanceGoallD Un
12. The index of the event script initially points to just before the first event In Java this is 1 USE 2 6 2 does not support this legal OCL syntax context EventScriptImpl index init 0 65 context EventScriptImpl addEvent e GoalEventImpl Th vent does not already exist in the script pre NotInScript event excludes e The added event s type is valid pre ValidType e type ACHIEVED or e type FAILED or e type POSITIVE_TRIGGER or e type NEGATIVE_TRIGGER or e type MODIFIED At least one parameter must be provided if type is MODIFIED pre ModifiedReqParam e type MODIFIED implies e param gt size gt 0 A MODIFIED event s parameter names must match specification goal s parameter names pre ValidModifiedParamNames e type MODIFIED and e param gt size gt 0 implies e param forAll ep gmods specTree goal exists sg sg id e specGoalID and Sg param exists sgp sgp id ep id The added event refers to a ParameterizedSpecificationGoal that exists in GMoDS specification tree pre ValidSpecGoal gmods specTree goal exists sg sg id e specGoalID An ACHIEVED event will access the special ACHIEVED event of GMoDS and must apply to a leaf specification goal pre ValidAchievedEvent
13. CLASSES class GoalEventImpl attributes type EventType specEventID String specGoalID String instGoalID Integer end class GoalEventParameter attributes id String value String end class EventScriptImpl attributes index Integer operations addEvent e GoalEventImpl next end class GoalTreeImpl operations event ig InstanceGoalImpl event SpecificationEvent param InstanceParameters modifyInstanceGoal specID String instID Integer param InstanceParameters end class SpecificationTreeImpl end 62 class SpecificationEvent attributes id String declaredGoalID String end class ParameterizedSpecificationGoal attributes id String isLeaf Boolean operations closureChildren s Set ParameterizedSpecificationGoal Set ParameterizedSpecificationGoal if s includesAll s child asSet then s else closureChildren s union s child asSet endif descendantsAndSelf Set ParameterizedSpecificationGoal closureChildren Set self end class SpecificationParameter attributes id String end class InstanceTreeImpl end class InstanceGoalImpl attributes instID Integer SpecID String state GoalState end class InstanceParameters end class InstanceParameter attributes id String value S
14. void they don t exist already Pre none Post An InstanceGoalUI is created for each goal in GMoDS if it does not already exist and is recorded in the InstanceGoalUIRegistry Determine the dimensions of Syntax determineSize Dimension the instance tree image Pre none Post Result the total size of the instance tree image is returned Draw the instance tree on the Syntax draw void canvas Pre none Post The instance tree is drawn on the canvas Initialize the canvas Syntax initialize void Pre none Post The canvas is initialized Initialize all instance goal Syntax initializeGoals void views Pre none Post All specification goal views are initialized Order the goals at each level Syntax orderGoals void of the instance tree Pre none alphabetically Post The goals at each level of the instance tree are ordered alphabetically 105 Record whether all parameters should be shown in the instance tree Syntax showAllParameters showParameters boolean void Pre none Post Recorded whether all parameters should be shown Table 45 InstanceGoalUI Interface Specifications Assess the GoalState of the InstanceGoalUI in the instance tree Determine the final dimensions of the instance tree rooted at this InstanceGoalUI Determine the minimum dimensions of the instance tree rooted at this
15. Edit Preferences command Figure 77 below shows the GMoDSVisualizerPart responding to the View Specification Goals Parameters command initialize createUl Figure 77 GMoDSVisualizerPart viewSpecParams 124 self GMoDSVisualizerPart l show shownstanceG oalP arameters showa amp llP arameters show drawnstanceTree Figure 78 GMoDSVisualizerPart viewInstParams Figure 78 above shows the GMoDS VisualizerPart responding to the View Instance Goals Parameters command Figure 79 below shows the GMoDSVisualizerPart responding to the View Instance Goals Goal Types command view GMoDSvVisualizerUl instTrUl InstanceTreeUl amp AdionEvent menultem GoalT ypeCheckBoxMenultem model GMoDSModel view GMoDSVisualizerUI self GMoDSVisualizerPart T menultem GoalT ypeCheckBoxMenultem getSource i goalT ype getGoalT ype isSelected isSelected isSelected makeVisible goalType mak elnvisible goalT ype T l l l t l drawnstanceTree 4 4 4 l Figure 79 GMoDSVisualizerPart viewGoalTypes 125 self E ditP referenceP art e AdionEvent actionCmd getAdionCommand actionC m d equals E ditP reference sUl OK EditPrefencesP art OK actionC m d equals EditP r
16. Unqueldentfier issueRando mEvents void issueToGMoDS gmods GoalTree void playQ void getParameters Map lt Uniqueldentifier Object pause void getDelay Time int Interfac e next void GoalTree hasNext boolean edu k su cis macr goal m odel a Interfac e EventScript O Kl GMoDS TestDriverlmpl driver 1 isPlaying boolean issueNotification To Obseivers void Figure 37 GMoDS Test Driver Architecture Figure 37 above shows the GMoDS Test Driver architecture described in detail in 4 3 1 Figure 38 below shows the component classes that implement random events for the GMoDS Test Driver 82 lt lt Enunp gt EventType GoalE vent lt lt Constant gt gt ACHIEVE D lt lt Constant gt gt FAILED lt lt Constant gt gt P OSITI VE_TRIGGER lt lt Constant gt gt NE GATIVE_TRIGGER l lt lt Constant gt gt MODIFIED A lt lt Interfac e GoalE vent testdriver getType EventType getSpecticationGoallde ntfierQ Uniqueldentifier g etinsta nce Goalidentiier Uniqueldentifier g etEventidentifier Uniqueldentiier issueTo GMoDS gmods GoalTree void checkSp ecification TreeVa ld ty gmods GoalTree voii checkinstance TreeV alidty g mods GoalTree voit getParameters Map lt Uniqueldentifier Object getDelay Time int event
17. precedes 1 3 2 1 2 3 SR GV 1 3 Non critical Requirement The system shall use the current Specification Tree Show Hide Parameters setting to decide whether to display the parameter name for goals or events 1 3 2 1 2 4 SR GV 1 4 Critical Requirement The system shall show all parent child precedes positive trigger and negative trigger relations as lines connecting two specification goals 1 3 2 1 2 5 SR GV 1 5 Critical Requirement The lines connecting the source specification goal to the destination specification goal for positive trigger negative trigger and precedes relations shall have an arrow head pointing to the destination goal 1 3 2 1 2 6 SR GV 1 6 Critical Requirement Parent child precedes and trigger relation lines shall be solid 1 3 2 1 2 7 SR GV 1 7 Critical Requirement Negative trigger relation lines shall be dashed 1 3 2 1 2 8 SR GV 1 8 Non critical Requirement The system shall separate specification goal names from parameters using a horizontal line if parameters are displayed If parameters are not displayed no such horizontal line shall be shown 1 3 2 1 2 9 SR GV 1 9 Non critical Requirement The system shall show for each specification goal each parameter name on its own single separate line 1 3 2 1 2 10 SR GV 1 10 Non critical Requirement 19 The system shall show all event parameters on a single line between the opening parenthesis and closing parenthesis separated by ac
18. 8 4 2 33 TF GV 7 3 SR GV 7 3 the system shall not change the expand collapse state of any instance goal whose expand collapse control was not directly clicked 8 5 Features not to be tested 8 5 1 GMoDS Test Driver e SR GID 1 3 the GMoDS Test Driver shall cause GMoDS to populate its specification goal tree e SR GTD 1 4 the GMoDS Test Driver shall cause GMoDS to initialize its instance goal tree e SR GTD 2 1 1 the GMoDS Test Driver shall treat all parameter types as if they were String 8 5 2 GMoDS Visualizer All features are to be tested as specified in 8 4 2 above 8 6 Approach This test plan addresses the testing of the GMoDS Visualizer and Test Driver using automated unit white box testing using JUnit 3 8 and manual black box testing The GMoDS Visualizer will be manually tested while stimulated by the GMoDS Test Driver and sample client simulations 137 8 6 1 GMoDS Test Driver The GMoDS Test Driver module GoalEventImpl will be unit tested Table 49 below lists the GMOoDS Test Driver unit tested features In addition manual tests will exercise all tested GMoDS Test Driver features Table 49 GMoDS Test Driver unit tested features Unit tested feature TF GTD 1 2 1 8 6 2 GMOoDS Visualizer The GMoDS Visualizer modules will not be unit tested manual tests will exercise all features with the GMoDS Visualizer stimulated by a simulation or by the GMoDS Test Driver 8 7 ltem Pass Fail Cr
19. GV 2 Display Instance Tree Features Tested TF GV 2 10 Goal Diagrams 1 Any goal diagram Required Event 1 A compatible event script Scripts 144 Procedure 1 Start the GMoDS Test Driver 2 File Load Event Script and select the compatible script 3 Click Play and allow the script to end 4 Select View Instance Goal Goal Types uncheck a box Click OK 5 Select View Instance Goal Goal Types recheck the box Click OK Expected Results 1 When a goal type is unchecked all instance goals of that specification goal type and their descendant instance goals are not visible 2 When a goal type is rechecked all instance goals of that specification goal type and their descendant instance goals are visible again 8 10 2 1 5 Test Case TC GV 5 Show Hide All Specification Goal Parameters Table 58 Test Case TC GV 5 Show Hide All Specification Goal Parameters Use Cases Tested GV 4 Change Specification Tree View Features Tested TF GV 4 1 Goal Diagrams 1 Any goal diagram with a goal and an event that have parameters Required Event 1 None Scripts Procedure 1 Start the GMoDS Test Driver 2 Select View Specification Goal Parameters uncheck the box 3 Select View Specification Goal Parameters recheck the box Expected Results 1 When View Specification Goal Parameters is unchecked all specification goals and events parameters are not visible The
20. Let script finish Repeat this test using Next only Change Random Event parameters using Edit Preferences on the visualizer menu bar and repeat this testing 9o Qv Re ha E 141 Expected Results For Each Required Event Script Ne 1S Debug log records that every event is valid and issued to GMoDS successfully The Test Driver stops issuing events upon Pause and enters manual mode Examination of the debug log confirms no event is issued while paused In manual mode events are issued only after Next is selected Selecting Play enters automatic mode Time stamps in the debug log confirm that the Test Driver is sleeping an appropriate time between issuing events Appropriate changes to the instance tree are displayed depending on the event issued These changes include addition and coloring of goals and flashing 8 10 1 2 4 Test Case TC GTD 4 Save Event Script Table 53 Test Case TC GTD 4 Save Event Script Use Cases Tested GTD 2 Issue Random Events GTD 3 Save Event Script Features Tested TF GTD 2 3 TF GTD 3 1 TF GTD 3 2 TF GTD 3 2 1 TF GTD 3 2 2 Goal Diagrams A goal diagram compatible with the event scripts Required Event 1 No inputs Scripts 2 An event script file that lists a valid event of every type repeat procedure 3 An event script file with events that are invalid with respect to the specification for each script tree faults goal name parameter
21. NotinScript is true UalidType is true ModifiedReqParam is true ValidModif iedParamNames UalidSpecGoal is true ValidfAchievedEvent is true UValidFailedEvent is true ValidSpecEvent is true is 81 7 Chapter 7 Component Design 7 1 Introduction This is the component design for the GMoDS Visualizer and Test Driver Masters of Software Engineering final project 7 2 Component Design This section documents the detailed design of each system component 7 2 1 GMoDS Test Driver Component Design This section documents the detailed static and behavioral design of the GMoDS Test Driver component 7 2 1 1 GMoDS Test Driver Static Structure Launcher GoalE ventimp edu k su cis macr goal m odel testdriver launcher m ain args Strin void Enume EvertType edu k su cis macr goal m odel testdriver GoalE vent lt lt Constant gt gt ACHIEVED lt lt Constant gt gt FAILED aos lt lt Constant gt gt POSITIVE TRIGGER ao os COO os oe ay lt lt Constant gt gt NEGATIVE TRIGGER edu k su cis macr goal m odel visualizer getType EventType lt lt Constant gt gt MODIFIED addObserver o Observer void getSpecficationGoallde ntfier Uniqueldentifer loadEventScrpt eventScrpt File void getinsta nceGoalldentitier Uniqueidentfier save ventScript eventScrpt File vod g etEventidentifier
22. haveSameParents identifier Uniquelde ntfier dentifier2 Uniqueldentifier boolean a ssessState identifier Unique identifier GoalState Figure 16 GMoDS Visualizer controller modules 4 4 10 GMOoDS Visualizer Controller Module Responsibilities Table 24 GMoDS Visualizer controller module responsibilities Component Responsibilities AbstractPart Define basic methods for setting up a controller associated with its view model and TestDriver 4 4 11 GMoDS Visualizer Controller Interface Specifications Table 25 GMoDS Visualizer AbstractPart interface specifications AbstractPart Syntax initialize model GMoDSModel testDriver intialize TestDriver abstractUI AbstractUD void Pre None Post This controller is initialized with references to the model view and TestDriver 56 AbstractPart Syntax registerWithModel void register WithModel Pre None Post If this controller needs to receive updates from the model it registers as an Observer with it or the TestDriver 4 4 12 GMoDS Visualizer Controller Design Rationale I selected the MVC design pattern to support unit testing of controller behaviors 4 5 System Startup Behavior Figure 17 through Figure 23 illustrate the system startup behavior Figure 17 shows the steps taken by the GMoDS Test Driver Launcher main program to make use of the GMoDS Visualizer Sim
23. GMoDSModel testDriver TestDriver specTreeUl SpedficationTreeUl instTreeUl InstanceTreeUl 58 initialize in vok eLater r createUl createUl Abstractul initialize 0 initialize initialize Figure 22 GMoDSVisualizerUI initialize self GMoDSVisualizerlmpl view GMoDSVisualizerUl SwingUtilities Class 29 self AbstractUl lal registerVVithM odel pi controller makeC ontroller controller null initalize self model selftestDriver self controller AbstractP art Fi selfinitialized true Figure 23 AbstractUI initialized 60 4 6 GMoDS Architecture Figure 24 below documents selected GMoDS and GMoDS Test Driver classes for the sole purpose of supporting USE OCL modeling of invariants on EventScriptImpl a GMoDS Test Driver class This diagram should not be taken for official GMoDS documentation The diagram is an abstraction of the real architecture designed to make it easier to perform USE OCL modeling In particular I replaced use of Uniqueldentifier with the equivalent primitive data types used for specification and instance goal identifiers Also GoalEventParameter SpecificationParameter and InstanceParameter were created to replace the use of Map data structures mapping from a parameter Uniqueldentifier to an arbitrary value Object I omitted the SpecificationParameters class since it was not needed in any OCL invariants Finally
24. InstanceGoalUI Determine the horizontal offset required to accommodate parameter toggles for the InstanceGoalUIs in the tree rooted at this InstanceGoalUI Draw this InstanceGoalUI on the canvas Syntax assessState void Pre none Post The GoalState of the InstanceGoalUI is recorded Syntax determineFinalTreeSize Dimension Pre none Post Result the total size of the instance tree rooted at this InstanceGoalUI is returned Syntax determineMinTreeSize Dimension Pre none Post Result the minimum size of the instance tree rooted at this InstanceGoalUI is returned Syntax determineTreeToggleOffsets Dimension Pre none Post The horizontal offset required to accommodate parameter toggles for the InstanceGoalUIs in the tree rooted at this InstanceGoalUI are recorded with each InstanceGoalUI Syntax drawSelf graphics2D Graphics2D originX int originY int void Pre none Post This InstanceGoalUI is drawn on the canvas 106 Draw the instance tree rooted Syntax drawTree graphics2D Graphics2D originX int at this InstanceGoalUI on the originY int maxPeerHeight int void canvas Pre none Post The instance tree rooted at this InstanceGoalUI is drawn on the canvas Invert the colors for this Syntax flash boolean InstanceGoalUI to repres
25. Syntax getInstanceGoalldentifier Uniqueldentifier Pre None Post Result this instanceGoalID Syntax getEventGoalldentifier Uniqueldentifier Pre this eventType EventType POSITIVE TRIGGER or this eventType EventType NEGATIVE TRIGGER Post Result this eventID 44 Table 12 GMoDS Test Driver EventScript interface specifications Add an event valid with Syntax addEvent e GoalEvent void respect to the GMoDS Pre e null specification tree to the end Pre e is not already included in the script of the script Pre e type is valid Pre if e type MODIFIED then at least one parameter must be provided for the event Pre e getSpecificationGoalldentifier refers to a specification goal that exists in the specification tree Pre if e type ACHIEVED then e getSpecificationGoalldentifier ACHIEVED and the specification goal is a leaf Pre if e type FAILED then e getSpecificationGoalldentifier FAILED and the specification goal is a leaf Pre if e type MODIFIED then e getSpecificationEventIdentiifer refers to an specification event defined in the specification tree Post events events pre gt size 1 Post events includes e Post events last e Place the EventScript in Syntax play void automatic mode Pre EventScript is in manual mode Pre EventScript has a next GoalEven
26. UalidSpecGoal is true UalidfachievedEvent is true ValidFailedEvent is true ValidSpecEvent is true recondition recondition recondition Call stack is empty Figure 28 above shows that executing addEvent twice for the same event violates the NotInScript precondition cx Shortcut to USE 2 6 gmods gtd invalid speceut cmd tinsert g3 g3p gt into SpecGoalParams eas gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt InstTrees instTree gt into InstTrees gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt gmods gtd invalid specevt cmd gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt gmods gtd invalid speceut cmd gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt finsert Cgmods Impl InstGoals tinsert CinstTree tinsert CinstTree tinsert CinstTree InstGoals InstGoals InstGoals q01 into gii gt into g21 gt into InstGoalParams finsert Cg i g 1iP gt finsert gil giiP gt finsert g21 g21P gt into InstGoalParams into InstGoalParams into InstGoalParams gnods gtd invalid specevt cmd gt gnods gtd invalid specevt cmd gt mse gt topenter si addEvent lt gei gt precond
27. Uniqueldentifier identifier2 Uniqueldentifier boolean Pre identifier null Pre identifier2 null Post Result true if the two specified specification goals do not have the same parents Syntax haveSameParents identifier Uniqueldentifier identifier2 Uniqueldentifier boolean Pre identifier null Pre identifier2 null Post Result true if the two specified specification goals have the same parents Syntax assessState identifier Uniqueldentifier GoalState Pre identifier null Post Result the GoalState of the specified instance goal 4 4 4 GMoDS Visualizer Model Design Rationale The GMoDS component is encapsulated behind a GMoDSModel interface within the GMoDS Visualizer component to allow custom methods to support GMoDS Visualizer requirements 49 4 4 5 GMoDS Visualizer View Decomposition GMoDS VisualizerUl AbstractUI Instanc eGoalUI Hrame JFrame specTreeUl AbstractUI instTreeUl AbstractUI SpecificationTreeUl T sereateUIQ void finitialized boolean l goal InstanceGoal InstanceP arameters gt state GoalState GoalState TRIGGERED fash boolean false Fem ainingF lashes Atomidinteger new Atomicinteger 0 LshowChildren boolean true goalName String makeController AbstractPart rupdate o Observable arg Object void eregisterWithModel void initialized void
28. as in the Observer Pre o null design pattern Post An Observer o is recorded and will be notified whenever the state of GMoDS changes Determine if any ancestor of the Syntax isAncestorPrecededSpecificationGoal identifier specified specification goal is the Uniqueldentifier boolean target of a precedes relation Pre identifier null Post Result true if any ancestor of the specified specification goal is the target of a precedes relation Determine if any ancestor of the Syntax isAncestorPositiveTriggeredSpecificationGoal specified specification goal is the identifier Uniqueldentifier boolean target of a positive trigger Pre identifier null Post Result true if any ancestor of the specified specification goal is the target of a positive trigger Determine if any ancestor of the Syntax isAncestorNegativeTriggeredSpecificationGoal specified specification goal is the identifier Uniqueldentifier boolean target of a negative trigger Pre identifier null Post Result true if any ancestor of the specified specification goal is the target of a negative trigger 48 Determine if the two specified specification goals do not have the same parents Determine if the two specified specification goals have the same parents Evaluate the GoalState of the specified instance goal Syntax isCrossTreeLink identifier
29. e Application environment o JDK 1 6 or higher available at http www sun com java e Development environment o Eclipse IDE for Java Developers 1 2 1 20090918 0703 e GMoDS Version 2 o The GMoDS component is the GoalModel2 module in the CVS repository Cvs projects cis ksu edu at the repository path cvsroot gmods 8 11 1 Automated Unit Testing The following software will be used to unit test the GMoDS Test Driver and Visualizer e JUnit 3 8 8 11 2 Manual Testing 8 11 2 1 GMOoDS Test Driver The GMoDS Test Driver will be manually tested by having it stimulate the GMoDS Visualizer See 8 11 3 below 8 11 2 2 GMoDS Visualizer Manual test cases identified in 8 10 2 1 above for the GMoDS Visualizer will be performed while the Visualizer is stimulated by the GMoDS Test Driver and by at least one agent simulation 8 11 3 Stimulation by GMoDS Test Driver e GMoDS Test Driver main program launches the GMoDS Visualizer 8 11 3 1 Stimulation by agent simulation e The agent simulation component that populates GMoDS launches the GMoDS Visualizer 147 9 Chapter 9 Assessment Evaluation 9 1 Introduction This document presents the results of testing the GMoDS Visualizer and Test Driver components 9 2 Test Case Result Summary Table 63 Test Case Result Summary Test Case ID Test Case Title Tested Results Features TC GTD 1 Load Event Script TF GTD 1 1 Pass TF GTD 1 2 TF GTD 1 2 1 TF GTD 1 2 2 TF GTD 1 2 3 TC
30. goal e Parameter value origin the means by which the parameter value was established in GMoDS one of inherited trigger or modification An inherited value comes from its parent goal A value with origin trigger comes from the triggering event The origin modification indicates the parameter value was modified 1 2 Project Overview 1 2 1 Project Goal The goal of this project is to provide an optional GMoDS run time information visualizer that can be tested by multiple means An additional project goal is to provide a GMoDS test driver component that can test the visualizer by directly stimulating GMoDS substituting for a simulation application component 1 2 2 System Context Simulated Agent Component Pushes instance tree changes Sends goal events GMoDS Provides a a specification tree Visualizer Provides initial instance tree i Sends goal events GMoDS i p Provides possible Test Driver goal events Displays Displays i Parses specification tree i C Specification Instance Goal Goal Goal Tree Tree Diagram Figure 3 GMoDS Visualization Project System Context Figure 3 above shows the system context for the components developed in this project The project goal is to develop the GMoDS Test Driver and GMoDS Visualizer components shown shaded in light blue in this figure The figure shows that either the GMoDs Test Driver or a simulat
31. makelnvisible spec GoallD Uniqueide ntifier void g etParameters identifier Uniqueldentifier Modifiableinstance Parameters GoalState lt lt Constant gt gt TRIGGERED lt lt Constant gt gt ACTIVE I lt lt Constant gt gt ACHIEVE D lt lt Constant gt gt FAILED lt lt Constant gt gt REMOVED lt lt Constant gt gt OBVIATED lt lt Interfac e gt gt GMoDS Model hasAncestor goa identifier Uniquelde ntfier ancestoridentifier Uniqueldentifier boolean Interfac e gt InstanceTree edu k su cis macr goal m odel Interfac e SpecificationTree edu ksu cis macr goal m odel Interfac e GoalTree edu ksu cis macr goal m odel GMoD S Modell mpi Figure 45 GMoDS Visualizer Model Architecture Interfac e GMoDSModel RandomEvertParameters minStringLength int 1 addObserver o Observer void maxStringLength int 10 isA ncestorPrece dedSpeciication Goat identifier Uniqueldentifier boolean isA ncestorPostiveTriggeredSpecification Goa identifier Uniquelde ntiier boolean isA ncestorNegative TrggeredSpecificationGoal dentifier Uniqueldentiier boo ean minDelayTime int FlashP aram eters getF lashP eriod 1000 maxDelayTime int 2 FlashParameters getF lashP eriod numE vents int 25 a ssessState identiier Unique Identifier GoalState intialize Visibility void isVi
32. registerRelations void ereset void SpecificationG oalU Registry nS GoalUis l putigoalUl SpecificationGoall l void image Bufferedimage get identifier Uniqueldentifier SpedificationGoalU karen RA ob CanvasGoalUis getRoctUI SpecificationGoalUI RelationGoalUls RIDGE es meen Oey l getGoalUls Iterator lt SpedificationGoalUI gt jftestDriver TestDriver getChildUIs identifier Uniqueldentifier Iterator SpecificationG oalUI gt paintC om ponent g Graphics void jehasChildren identifier Uniqueldentifier boolean eresize void jresetGoalUls void dete mineSize Dimension l draw void ingialize void zoomin void eresetZoom void zoomOut void Figure 50 GMoDS Visualizer Specification Tree View Component Classes Figure 50 above shows the component design of the specification tree view Figure 51 below shows the component design of the instance tree view 97 Instanc eTreeUI AbstractUl controller AbstractPart model GMoDSM odel testDriver TestDriver initialized boolean resetZoom void zoomOut void show llP arameters sho we arameters boolean void treeUl createUl void getComponent Component makeController AbstractPart update o Observable arg Object void registerWithModel void initializeQ void instTreeUl 1 instTreeUl 1 ContainerFor
33. y i ERES i q H E E i po a la Figure 43 RandomEventScriptImpl createRandomEvent GoalEvent Part 2 Figure 43 above shows the second half of the process of creating a random GoalEvent AII triggered and active instance goals may be modified if their specification goal defines parameters If so a ModifiedEventGenerator is added to possible If there is at least one possible GoalEvent an AbstractsEventGenerator is randomly selected from possible and it generates a random GoalEvent which is returned 88 issueRandomE vents loadE ventScript Manual Mode do hasNext hasNext Automatic Mode do hasNext hasNext do hasN ext issueNextE ventToGMoDS playfhasNext next hasN ext issueNextE ventT oGMoDS pause hasNe t hasNe false hasNe t false Figure 44 GMoDS Test Driver UI Controls State Diagram Figure 44 above shows the states of the GMoDS Test Driver in response to the toolbar buttons and menu items that control it This diagram suppresses differences between random and file based events incremental event generation versus a complete script load The Test Driver starts with an empty script If the user selects load event script or issue random events the Test Driver moves to Manual Mode Clicking next issues the next event to GMoDS if valid and returns to Manual Mode if there is a next event possible Clicking play whil
34. 1 1 the GMoDS Visualizer on behalf of the GMoDS Test Driver shall prompt the user for a goal event script etc 8 4 1 2 TF GTD 1 2 SR GTD 1 2 the GMoDS Test Driver shall parse the goal event script to generate goal events 8 4 1 2 1 TF GTD 1 2 1 SR GTD 1 2 1 the GMoDS Test Driver shall log errors and drop invalid goal events from the script In addition the GMoDS Visualizer on behalf of the GMoDS Test Driver shall visually inform the user of these errors 8 4 1 2 2 TF GTD 1 2 2 SR GTD 1 2 2 the GMoDS Test Driver shall support a scripted events language with the following event types ACHIEVED FAILED and MODIFIED events for each active instance goal and positive and negative trigger events defined by the specification goal corresponding to any active instance goal 8 4 1 2 3 TF GTD 1 2 3 SR GTD 1 2 3 the GMoDS Test Driver Event Script Language GTD ESL shall include the XML elements and attributes defined in all sub requirements labeled SR GTD 1 2 3 X where X ranges from to 8 8 4 1 3 TF GTD 1 5 SR GTD 1 5 the GMoDS Test Driver shall issue each goal event defined in the event script to GMoDS after the specified delay time milliseconds relative to the previously issued goal event automatic mode or after the user selects Next manual mode 8 4 1 4 TF GTD 1 6 SR GTD 1 6 upon initialization of the GMoDS Test Driver in this use case the GMoDS Test Driver shall enter manual mode and await user inter
35. 2 2 System Component Responsibilities Table 6 System component responsibilities Component Responsibilities GMoDS Provide the core objects and behaviors to be visualized Provide pull and push access to these core objects GMoDS Provide the user interface for visualizing GMoDS object behaviors Visualizer Provide the user interface controls for the GMoDS Test Driver if configured GMoDS Test Provide the capability to test the GMoDS Visualizer in manual and automatic Driver mode 4 2 3 System Interface Specifications All interfaces throw an IllegalArgumentException if their preconditions are violated except for the GMoDS Test Driver Launcher main program which prints an error message to the console and exits if its preconditions are not met 39 Table 7 GMoDS Test Driver Launcher interface specifications Launch the GMoDS Test Driver for a specific goal diagram Syntax main args string void Pre args length 1 Pre args 0 is the goal diagram file name Pre args 0 is a file that exists and is readable Post The GMoDS component is created initialized and passed to the GMoDSTestDriverImpl and GMoDSVisualizerImpl Post The GMoDSTestDriverImpl is created and passed to the GMoD Visualizer component Post The GMoDsSVisualizerImpl is created and initialized The user interface is created initialized and made visible Table 8 GMoDS Visualizer interf
36. 71 6 Chapter 6 USE OCL Modeling of the Formal Specification 6 1 Introduction This documents the validation of the formal specification of the method EventScriptImpl addEvent with USE version 2 6 2 6 2 USE Modeling An action item from MSE presentation 2 was e Perform USE OCL modeling of state snapshots to validate the pre and post conditions of the EventScriptImpl next method in the formal specification I performed this modeling using USE 2 6 2 6 3 Limitations of USE 2 6 2 USE 2 6 2 does not support the OCL isSent operator denoted necessary for the most important post conditions of the EventScriptImpl next method A MODIFIED event type causes the next method to send the message modifyInstanceGoal to GMoDS and all other event types cause the next method to send the message event In addition USE 2 6 2 does not support the init constraint on a class attribute Finally I was unable to get USE 2 6 2 to allow more than 1 local variable to be defined in a let expression As a result of these limitations I requested and was granted permission to model the EventScriptImpl addEvent method 6 4 Modeling EventScriptlmpl addEvent in USE Table 27 below lists the scripts contained in 10 that I used to model the formal specification of the method EventScriptImpl addEvent Table 27 USE scripts modeling EventScriptImpl addEvent Script Comment Figure GTD use OSE class associ
37. Access all children UIs of the specified InstanceGoalUI Syntax toggleParameters void Pre none Post Toggled whether this InstanceGoalUI should show its parameters Syntax toggleSubtree void Pre none Post Toggled whether this InstanceGoalUI should show its children Syntax put goalUI InstanceGoalUI void Pre goalUI null Post Recorded the InstanceGoalUI Syntax get identifier Uniqueldentifier InstanceGoalUI Pre identifier null Post Result the InstanceGoalUI Syntax getRootUI InstanceGoalUI Pre none Post Result the root InstanceGoalUI Syntax getGoalUIs Iterator lt InstanceGoalUI gt Pre none Post Result all InstanceGoalUIs Syntax getChildUIs identifier Uniqueldentifier Iterator lt InstanceGoalUI gt Pre identifier null Post Result all children UIs of the specified InstanceGoalUI 108 Query whether an InstanceGoalUI has children Syntax hasChildren identifier Uniqueldentifier boolean Pre identifier null Post Result true if the InstanceGoalUI has children Table 47 FlashDaemon Interface Specifications Start the thread for the FlashDaemon run method false otherwise Flash all changed InstanceGoalUIs Wait until a changed InstanceGoalUI is added to the daemon Syntax startThread void
38. GMoDS with minimum acceptable value of 1 and name whose value is the user defined event name if the type is POSITIVE_TRIGGER or NEGATIVE_TRIGGER If type is MODIFIED instGoal is the goal whose parameters are modified 1 3 1 1 2 5 3 SR GTD 1 2 3 3 Critical Requirement The GTD ESL Event element attributes type specGoal instGoal and delay must be provided 1 3 1 1 2 5 4 SR GTD 1 2 3 4 Critical Requirement The GTD ESL Event element attribute name must be provided if type has value POSITIVE_TRIGGER or NEGATIVE_TRIGGER 1 3 1 1 2 5 5 SR GTD 1 2 3 5 Critical Requirement The GTD ESL Event element shall contain 0 or more Parameter element children 1 3 1 1 2 5 6 SR GTD 1 2 3 6 Critical Requirement The GTD ESL Parameter element shall represent the parameters of a positive or negative trigger or modifyInstanceGoal event and have the following attributes name whose value is the parameter name and value whose value is the parameter value 1 3 1 1 2 5 7 SR GTD 1 2 3 7 Critical Requirement The GTD ESL Parameter element value attribute shall be treated as if the parameter s data type is a Java String 1 3 1 1 2 5 8 SR GTD 1 2 3 8 Critical Requirement At least one GTD ESL Parameter element must be provided if type is MODIFIED 1 3 1 1 2 6 SR GTD 1 3 Critical Requirement The GMoDS Test Driver shall c
39. IDE mainly source code configuration files and tests will be kept under version control using a Multiagent and Cooperative Robotics MACR Laboratory CVS repository and accessed remotely Project artifacts produced using other tools see Table 5 above will be kept under version control in a local CVS repository on the development machine and backed up at least weekly Supplier control is not applicable to this project 36 3 10Records collection maintenance and retention All project documentation see 3 3 2 Minimum Documentation Requirements above will be available at http people cis ksu edu mfraka FrakaMSE html when completed For access to the most current version of GMoDS Visualizer and Test Driver artifacts contact Dr Scott DeLoach 3 11 Risk management The developer and major professor share responsibility for identifying project risks and communicating them to each other via email or phone 37 4 Chapter 4 Architectural Design 4 1 Introduction 4 2 System Architecture This section documents the system architecture in a component diagram lists module responsibilities and interface specifications and describes the design rationale 4 2 1 System Components Controller A Model IN 1 H com ponent 8 i component I a GMoDS Test Driver i GMoDS Visualizer t i i Q C i com ponent gt gt 8 a GMoDS Test riverimp GMoDS Visualizer i i L 1 GoalTree Q Tes
40. L At run time Background Active Goal Foreground An active goal s foreground color At run time Active Goal Flash An active goal s background color At run time Background during a flash Active Goal Flash An active goal s foreground color H At run time Foreground during a flash Achieved Goal An achieved goal s background color L At run time Background Achieved Goal An achieved goal s foreground color NH At run time Foreground Achieved Goal Flash An achieved goal s background color L At run time Background during a flash Achieved Goal Flash An achieved goal s foreground color B At run time Foreground during a flash Failed Goal Background A failed goal s background color At run time Failed Goal Foreground A failed goal s foreground color At run time Failed Goal Flash A failed goal s background color during L At run time Background a flash Failed Goal Flash A failed goal s foreground color during NH At run time Foreground a flash Removed Goal A removed goal s background color Hl At run time Background Removed Goal A removed goal s foreground color L At run time Foreground 17 Option Definition Default Modified Removed Goal Flash A removed goal s background color L At run time Background during a flash Removed Goal Flash A removed goal s foreground color Hl At run time Foreground during a flash Obviated Goal An obviated goal s background color L At run
41. Pre GoalEvent that can be generated by this generator is applicable to the current state of GMoDS Post Result new random GoalEvent of the type represented by this generator Syntax getRandomDelayTime int Pre none Post Result 2 new random integer in the range defined by the GMoDS Visualizer s RandomEventParameters Syntax getEventlIdentifier Uniqueldentifier Pre none Post Result the Uniqueldentifier of the generated GoalEvent that identifies it to GMoDS Syntax createEventParameters gmods GoalTree Map Uniqueldentifier Object Pre none Post Result a new Map Uniqueldentifier Object containing the applicable parameter names and their random values 7 2 1 1 3 GMoDS Test Driver Design Rationale 84 I chose event generators to compactly represent each potential GoalEvent available in the current state of GMoDS delaying expansion until after the potential event is randomly selected This increases the efficiency of incremental event generation 7 2 1 2 GMoDS Test Driver Behavior Figure 39 below shows the EventScriptImpl addEvent method Each GoalEvent added to the script must first pass all validity checks with respect to the specification tree If an event fails an IllegalGoalEventException is thrown logged and presented to the user the event is not added If the event passes the validity checks it is added to the script and all observers of notified of the change se
42. addEvent gel gt recondition NotInScript is true precondition ValidType is true precondition ModifiedReqParam is true precondition ValidSpecGoal is false recondition Ualidf chievedEuvent is true precondition UalidFailedEvent is true precondition ValidSpecEvent is false TELDA gt g 1P gt into InstGoalParams giiP gt into InstGoalParams g21P gt into InstGoalParams Figure 30 above shows the script gtd invalid specgoal cmd violates the ValidSpecGoal and ValidSpecEvent pre conditions 6 4 2 Modeling an ACHIEVED event gmods gtd invalid achieuved cmd gmods qgtd inuvalid achieuved cmd gmods gtd invalid achieved cmd gmods qgtd inuvalid achieued cmd mods gtd invalid achieuved cmd mods gtd invalid achieued cmd gnods gtd invalid achieved cmd gt gnods gtd invalid achieved cmd gt gnods gtd invalid achieved cmd gt qgmods gtd invalid achieved cmd gt finsert g3 InstTrees InstGoals finsert CqmodsImpl tinsert CinstTree finsert CinstTree finsert CinstTree Zu g3p gt into SpecGoalParams instTree into InstTrees InstGoals InstGoals InstGoals g 1 gt into gii gt into g21 gt into gmnods gtd invalid achieved cmd gt InstGoalParams gmods gtd invalid achieved cmd gt tinsert g l 7 gmods gtd invalid achieved cmd insert gil gmods qgtd inu
43. added to the list of relationUIs drawn on the canvas Syntax drawRelations void Pre None Post All AbstractRelationUIs are drawn on the canvas Table 19 GMoDS Visualizer SpecificationGoalUI interface specifications Draw the SpecificationGoalUI and its descendants on the image Syntax drawTree graphics2D Graphics2D void Pre None Post This SpecificationGoalUI and its descendants are drawn on the Java 2D image Table 20 GMoDS Visualizer InstanceTreeUI interface specifications Begin flashing added or changed InstanceGoalUIs Draw and repaint the canvas Syntax update o Observable arg Object void Pre The Observable o the model has changed state Post Added or changed InstanceGoalUIs begin to flash Syntax draw void Pre None Post The canvas held by this view is redrawn and repainted to allow dynamic changes to appear 53 Table 21 GMoDS Visualizer InstanceTreeCanvas interface specifications Create all added InstanceGoalUIs Get the specified InstanceGoalUI Syntax createGoalUIs void Pre None Post This canvas creates all added InstanceGoalUIs and assures they are ordered assessed and registered for later display Syntax get instanceGoalID Uniqueldentifier InstanceGoalUI Pre None Post Result the InstanceGoalUI specified
44. available at http www sun com java Development environment o Eclipse IDE for Java Developers 1 2 1 20090918 0703 GMoDS Version 2 o The GMoDS component is the GoalModel2 module in the CVS repository Cvs projects cis ksu edu at the repository path cvsroot gmods 27 2 Chapter 2 Project Plan 2 1 Introduction This is the final project plan for the GMoDS Visualizer and Test Driver Masters of Software Engineering final project 2 1 1 Terms e KSLOC The size of source code in units of thousands of lines 2 2 Project Phases 2 2 1 Inception Phase The inception phase includes tasks to prepare a vision document project plan software quality assurance plan develop an initial prototype and present the inception phase products to the project supervisory committee The prototype will demonstrate a user interface for the GMoDS Visualizer that partially implements the use cases GV 1 Display Specification Tree GV 2 Display Instance Tree and GV 3 Update Instance Tree The UI will also demonstrate the manual mode for the GMoDS Test Driver using a hardwired event script The inception phase will conclude upon approval of the supervisory committee 2 2 2 Elaboration Phase The elaboration phase includes tasks to revise the vision and project plan documents develop a formal specification of one aspect of the software prepare the architectural design document prepare a test plan implement an executable architecture prot
45. by the instanceGoalID Table 22 GMoDS Visualizer InstanceGoalUI interface specifications Assess and record the GoalState of this InstanceGoalUI Invert the flash property calculate the remaining number of flashes and return false when there are no remaining flashes Draw this InstanceGoalUI and its descendants on the image Syntax assessState void Pre None Post this state model assessState goal getIdentifier Syntax flash boolean Pre None Post flash flash Post if flash remainingFlashes remainingFlashes pre 1 Post Result remainingFlashes gt 0 Syntax drawTree graphics2D Graphics2D void Pre None Post This InstanceGoalUI and its descendants are drawn on the Java 2D image 54 Table 23 GMoDS Visualizer FlashDaemon interface specifications Start the Thread executing the run method of the FlashDaemon The asynchronous process that signals added changed InstanceGoalUIs to invert their flash property and redraws the instance tree Syntax startThread void Pre The thread is not running Post The thread calling FlashDaemon run is started Syntax run void Pre The thread is running Body The FlashDaemon polls for and adds all InstanceGoalUIs in its workQueue to the set of flashing goals flashers Body If there are no flas
46. cases were performed as planned and passed Therefore the GMoDS Test Driver and Visualizer are ready for production use 151 10 Chapter 10 User Manual 10 1Introduction 10 2GMoDS Visualizer The GMoDS Visualizer can be used as an optional visualization tool with any application using GMoDS or will be used in the GMoDS Test Driver application 10 2 1 Installation The GMoDS Visualizer is available as an Eclipse project via the Kansas State University Multiagent amp Cooperative Robotics Laboratory MACR CVS repositories This section describes how to install the GMoDS Visualizer as an Eclipse project from this source and assumes you have gained permission to do so 10 2 1 1 Check out the GMoDS Visualizer The first step is to open the CVS Repository Exploring perspective Figure 89 below shows how to open an Other perspective Select the CVS Repository Exploring perspective as shown in Figure 90 below f Java Eclipse File Edit Source Refactor Navigate Search Project Run Window Help New Window rie Ov a 8 G J amp o te Eerarcny Bu SS n pn iem 50 T spen 3 Debug Ar entTool3 E a i Show View gt 2 Java Browsing Ej at3 GoalDiagramPlugin b Er 3 CollectiveBuilding Simulation cvs projects cis ksu edu Customize Perspective Qe i Core Save Perspective As i a Reset Perspective P ty DEMIR CF Share cvs projects cis ksu edu Close Perspective 4 Docu
47. goal may be ACHIEVED or FAILED so event generators of these types are added to the list possible Then every specification event of each active goal is obtained from GMoDS The method loops on each specification event and determines whether it defines a positive trigger or a negative trigger If it is a negative trigger an instance goal pointed to by the negative trigger must exist and an instance of a leaf specification goal descended from the specification goal that declared the trigger must exist If these conditions are met a NegativeTriggerGenerator is added to possible representing the specification event If it is a positive trigger an instance of a leaf specification goal descended from the specification goal that declared the trigger must exist If this condition is met a PositiveTriggerGenerator is added to possible representing the specification event 87 selected Abarade ventGenerator l pepp i E ees gb tp tt i H 3 i i oo P A OSA nM H E H i H i i sa a i slab i i ia iia iif j i H s 0 i Bd Toor TT Te hl Tee amp LLL oe ee MS an BE E Hepe H amp 1 a0 a O O i sl ls lll HILL BN S d j i4 ini Halla i 8 i E ialz 3 H eee EE a C UE a Bu BIB g a 1i H te i Pod i 1 I i73 HJ dii P DP uio uL
48. gt at index 1 in nextEvt type lt gt MODIFIED implies gmods instTree goal exists ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID and ig state ACTIVE If the next event type is NEGATIVE_TRIGGER then all of its parameter values must match an existing instance goal s parameter values pre ValidNegativeTrigger let nextEvt GoalEventImpl event gt at index 1 in nextEvt type 4NEGATIVE TRIGGER and nextEvt param size gt 0 implies gmods instTree goal gt exists ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID and nextEvt param forAll nep ig paramCollctn param exists igp igp id nep id and igp value nep value Advance the script index post ScriptIndexAdvanced index index pre 1 If preconditions met and the next event is not MODIFIED then the event message is sent to GMoDS with appropriate parameter values post NotModifiedSendsEvent let nextEvt GoalEventImpl event gt at index pre 1 in nextEvt type lt gt MODIFIED implies 67 let instParams InstanceParameters gmods instTree goal any ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID paramCollctn USE 2 6 2 would not accept these additional local variable declarations needed
49. name missing parameter extra parameter listed here Procedure 1 For the no input case click Issue Random Events and Play and allow the event script to end Then select File Save Event Script Restart the GMoDS Test Driver and select File Load Event Script and choose the previously saved random event script file Click Play and let the script end 2 For the other input cases load the event script and then select File Save Event Script saving to a new script name Compare the input script with the saved script Expected Results 1 For the no input case the two runs should have exactly the same debug logs For Each Required except for actual time stamps Event Scripts 2 For the event script with all valid events the saved script should match the input script 3 For the event script with invalid events the saved script should contain only valid events 142 8 10 2 GMoDS Visualizer 8 10 2 1 Manual Tests Manual test cases listed in this section for the GMoDS Visualizer will be performed while the Visualizer is stimulated by the GMoDS Test Driver and by at least one agent simulation if that simulation s goal diagram is compatible with the test 8 10 2 1 1 Test Case TC GV 1 Display Specification Tree Table 54 Test Case TC GV 1 Display Specification Tree Use Cases Tested GV 1 Display Specification Tree Features Tested TF GV 1 1 TF GV 1 2 TF GV 1 3 TF GV 1 4 TF GV 1 5 TF GV
50. name of all specification goals parent child connectives and and or trigger events negative trigger events and precedes relations precedes 8 4 2 3 TF GV 1 3 SR GV 1 3 the system shall use the current Specification Tree Show Hide Parameters setting to decide whether to display the parameter name for goals or events 8 4 2 4 TF GV 1 4 SR GV 1 4 the system shall show all parent child precedes positive trigger and negative trigger relations as lines connecting two specification goals 8 4 2 5 TF GV 1 5 SR GV 1 5 the lines connecting the source specification goal to the destination specification goal for positive trigger negative trigger and precedes relations shall have an arrow head pointing to the destination goal 8 4 2 6 TF GV 1 6 SR GV 1 6 parent child precedes and trigger relation lines shall be solid 8 4 2 7 TF GV 1 7 SR GV 1 7 negative trigger relation lines shall be dashed 134 8 4 2 8 TF GV 1 8 SR GV 1 8 the system shall separate specification goal names from parameters using a horizontal line if parameters are displayed If parameters are not displayed no such horizontal line shall be shown 8 4 2 9 TF GV 1 9 SR GV 1 9 the system shall show for each specification goal each parameter name on its own single separate line 8 4 2 10 TF GV 1 10 SR GV 1 10 the system shall show all event parameters on a single line between the opening parenthesis and closing parenthesis s
51. next void hasNext boolean g script Enume EvertType edu k su cis macr goal m odel testdriver GoalE vent lt lt Constant gt gt ACHIEVED lt lt Constant gt gt FAILED lt lt Constant gt gt POSITIVE TRIGGER Constant NEGATIVE TRIGGER lt lt Constant gt gt MODIFIED GoalE ventimp getType EventType getSpecficationGoallde ntifier Uniqueldentifier getinstance Goalidentiier Uniqueldentfie r getEventidentifier Uniqueidentiier issue To GMoDS gmods GoalTree void Interfac e gt gt GoalTree edu ksu cis macr goal m odel Interfac e EventScript play void pause void EvertScriptimp GMoDSTestDriverlmpl 1 driver Script next void hasNext boolean addObserver o Observer void addEvent e GoalEvent void RandomEventScriptlmpl Figure 13 GMoDS Test Driver architectural modules Figure 13 above shows the GMoDS Test Driver component architecture Since this is a small component and since it is used in the formal specification all GMoDS Test Driver modules are shown in the diagram 4 3 2 GMoDS Test Driver Module Responsibilities Table 10 GMoDS Test Driver module responsibilities Component Responsibilities Launcher Configure GMoDS GMoDSTestDriverImpl and the GMoDSVisualizerImpl Initialize GMo
52. of M modified 174 11 2 2 Estimates This section compares cost estimates for source lines of code and project duration estimated in phases 1 and 2 to the final totals 11 2 2 1 Source Lines of Code Table 68 Estimates of SLOC by phase Phase SLOC Estimate Phasel 4K Phase2 7K Phase 3 8 3K Actual Table 68 above shows the estimated number of source lines of code by phase of this project This table shows that the estimate improved with feedback through the process and came within 1300 lines of the actual value 11 2 2 2 Project Duration Table 69 Comparing estimated and actual durations Phase Estimated End Date Actual End Date Phasel 11 10 2010 11 22 2010 Phase 2 2 14 2011 1 13 2011 Phase 3 4 14 2011 3 16 2011 Table 69 above shows that I underestimated the time required for phase 1 but overestimated the time for the final 2 phases Figure 114 below shows the percentage of time spent in each phase Phase 1 took the most time as understanding of the project and Java 2D was a time intensive process Phases 1 and 2 were less demanding B Phase 1 B Phase 2 E Phase 3 Figure 113 Percent of time spent in each phase 175 E Coding B Designing E Documenting E Email E Modeling E Presenting E Reading E Resolving Defect Rework E Testing Figure 114 Percent of time for each task for the project Figure 114 above shows
53. parent goal Child goals connected via OR require only one child to be achieved for the parent goal to be achieved The specification tree goals can be parameterized and are a template for goals created at run time such run time goals are called instance goals Relationships between specification goals represent causal events triggers that create instance goals negating events negative triggers that cancel instance goals and ordering relations precedes relations that force certain goals to be achieved before others lt lt and gt gt 1 is lt lt or gt gt eX Figure 1 GMoDS Specification Goal Tree 1 The GMoDS instance goal tree represents run time instances of the specification goal templates with any template parameters instantiated with values See Figure 2 2 below Instance goals are created in response to events that occur during execution of tasks that fulfill goals and as a result of the relationships specified in the goal specification tree A special init event bootstraps the system creating the initial instance goals that have no other trigger specified An instance goal tree represents parent child relationships and can be color coded to represent the status of a goal triggered active achieved failed removed or obviated see 0 below terms and definitions for explanation of these statuses Figure 2 GMoDS Instance Goal Tree 1 1 1 3 Terms and Definitions e Instance goal state
54. relation will be directly or indirectly routed Determine the horizontal Syntax determineOffsets graphics2D Graphics2D void offset required for the Pre graphics2D null destination Post The destination SpecificationGoalUI has recorded SpecificationGoalUI the horizontal offset required for this AbstractRelationUI Query the required label for Syntax getLabel String the relation Pre none Post Result the required label for the relation Draw the relation on the Syntax draw graphics2D Graphics2D void canvas Pre graphics2D null Post The relation is drawn on the canvas Table 41 SpecificationGoalUIRegistry Interface Specifications Record a Syntax put goalUI SpecificationGoalUI void SpecificationGoalUI Pre goalUI null Post Recorded the SpecificationGoalUI Access a Syntax get identifier Uniqueldentifier SpecificationGoalUI SpecificationGoalUI Pre identifier null Post Result the SpecificationGoalUI Access the root Syntax getRootUI SpecificationGoalUI SpecificationGoalUI Pre none Post Result the root SpecificationGoalUI 102 Access all Syntax getGoalUIs Iterator lt SpecificationGoalUI gt SpecificationGoalUlIs Pre none Post Result all SpecificationGoalUIs Access all children UIs of the Syntax get
55. shown or hidden 8 4 2 25 TF GV 3 1 SR GV 3 1 the system shall flash all instance goals for which it has received a change for a pre defined period 8 4 2 26 TF GV 3 2 SR GV 3 2 the default flashing period shall be 2 seconds The default flashing cycle shall be 0 5 second Both the flashing period and flashing cycle shall be editable in manual mode 8 4 2 27 TF GV 3 3 SR GV 3 3 the system shall flash an instance goal by changing its background and foreground from its state color to its defined flash color and back once every flashing cycle etc 136 8 4 2 28 TF GV 4 1 SR GV 4 1 the system shall show or hide all specification goal and event parameters as specified by the user 8 4 2 29 TF GV 5 1 SR GV 5 1 the system shall show or hide all instance goal parameters as specified by the user 8 4 2 30 TF GV 6 1 SR GV 6 1 the system shall toggle the display of parameter names value and value origins for the specific instance goal whose parameter display toggle control has been clicked 8 4 2 31 TF GV 7 1 SR GV 7 1 the system shall collapse the specific instance goal sub tree hiding all descendant goals if the user clicks on the collapse toggle control of that instance goal 8 4 2 32 TF GV 7 2 SR GV 7 2 the system shall expand the specific instance goal sub tree showing all descendant goals whose parent goal has not been collapsed if the user clicks on the expand toggle control of that instance goal
56. the signature of modifyInstanceGoal was altered to include separate specification and instance goal IDs where the real signature uses a Uniqueldentifier that encapsulates both of these IDs lt lt Enunp gt GoalE ventimpl EvertType testdriver GoalE vent type EventType Constant ACHIEVED specificationE ventlD Uniqueldentifier event lt lt Constant gt gt FAILED specificationGoallD Uniquel dentifier 1 lt lt Constant gt gt P OSITI VE TRIGGER instanceGoallD Uniqueldentifier Constant NEGATIVE TRIGGER Constant MODIFIED 0 ordered event GoalE ventP arameters Events n Re GoalE ventP arameter 0 1 script testdriver lt lt Enunp gt l id String GoalState EventScriptimpl value String Constant TRIGGERED testdriver Constant ACTIVE index int 0 lt lt Constant gt gt ACHIEVED ae ventle Game vent id Constant FAILED ee area COREE vere woe Constant REMOVED eRe veld Constant OBVIATED 1 script GMoDSTree 1 gmods 1 GoalTreelmpl goalTree e vent triggeringlnstanceG oal InstanceG oal InstanceP arameters event SpecificationE vent parameter InstanceP arameters InstanceTree Changes m odifyInstanceGoal specID Str
57. the state of the instance goal within GMoDS one of triggered active achieved failed removed or obviated e Triggered a goal is triggered by the init event if it has no other trigger Otherwise the event associated with a triggers relation must occur while a task associated with the goal at the source of the triggers relation is being executed for the goal to become triggered e Active a goal becomes active if it is triggered and no precedes relation exists that points to the triggered goal or its ancestors from an unachieved goal e Achieved a leaf goal is achieved when the agent executing the goal notifies GMoDS of its achievement A parent of child goals joined by AND is achieved when all of its child goals are achieved A parent of child goals joined by OR is achieved if any of its child goals are achieved e Failed a leaf goal enters the failed status if the agent executing it notifies GMoDS of failure to fulfill it e Removed a goal is removed from the instance tree as if it never existed if the event associated with a negative trigger occurs during the execution of the goal that is the source of the negative trigger and that trigger points to the specification goal that is the template for the removed instance goal e Obviated a goal is obviated made unnecessary to successful completion of its parent goal if a sibling goal is achieved when those siblings are connected by OR to their parent
58. time Background Obviated Goal A removed goal s foreground color L At run time Foreground Obviated Goal Flash A removed goal s background color L At run time Background during a flash Obviated Goal Flash A removed goal s foreground color O At run time Foreground during a flash 1 3 2 1 Use Case GV 1 Display Specification Tree 1 3 2 1 1 Description The GMoDS Visualizer displays the specification tree including all goals parent child relations positive trigger relations negative trigger relations and precedes relations with their string identifiers The system uses the current setting for Specification Tree Show Hide Parameters to decide whether goal positive trigger and negative trigger parameter names and types are shown The default setting causes the system to display these parameters and types See Figure 7 below lt lt and gt gt Figure 7 Use Case GV 1 1 3 2 1 2 Associated Functional Requirements 18 1 3 2 1 2 1 SR GV 1 1 Critical Requirement The system shall display the specification goal tree as a graphical tree using minimum white space padding between adjacent tree elements Each goal will have a white background and black foreground lines and characters 1 3 2 1 2 2 SR GV 1 2 Critical Requirement The system shall display the string name of all specification goals parent child connectives and and or trigger events negative trigger events and precedes relations
59. to Branch List T Configure Branches and Versions D Refresh View Figure 93 Check Out GMoDS Visualizer Click the arrows to open cvsroot gmodsvis and HEAD then right click on GMODSvVisualizer not GMODS Visualizer an empty project as shown in Figure 93 above Choose Check Out or Check Out As 10 2 1 2 Check out the projects the GMoDS Visualizer depends on The GMoDS Visualizer depends on two other Eclipse projects GMoDS and the Organization Model for Adaptive Complex Systems OMACS If you do not have these projects already checked out you must do so now 10 2 1 2 1 GMoDS Follow the steps above to define the repository location for cvsroot gmods and then check out GoalModel2 156 10 2 1 2 2 OMACS Follow the steps above to define the repository location for cvsroot omacs and then check out OrganizationModel 10 2 1 3 Make your Eclipse project depend on the GMoDS Visualizer f Java Eclipse ri gt xb Hur P Or D leg Ore b ty Ore ion n Wl Properties Ete File Edit Source Refactor Navigate Search Project Run Window Help Or Q amp G leeg jg Hierarchy E AgentTool3 E at3 GoalDiagramPlugin b E CollectiveBuilding Simulation cvs projects cis ksu edu Core b ey DEMIR CF Share cvs projects cis ksu edu Documentation b ey GMoDSTestDriver cvs projects cis ksu edu gt ty GMoDSVisualizer cvs projects cis ksu edu b x Goa
60. view toggle control a rectangle enclosing the letter S or H on a specific instance goal to toggle the display of parameters their values and the values origin The system minimizes the display area consumed by the tree at all times The system reduces the size of elements that include parameters when the parameters are hidden and expands the elements when parameters are shown See Figure 11 below where goal g5 2 s parameters have been hidden 25 1 3 2 6 2 Associated Functional Requirements 1 3 2 6 2 1 SR GV 6 1 Non critical Requirement The system shall toggle the display of parameter names value and value origins for the specific instance goal whose parameter display toggle control has been clicked 1 3 2 7 Use Case GV 7 Change Instance Sub tree View 1 3 2 7 1 Description The user collapses or expands a specific instance goal sub tree by clicking on its expand collapse toggle When the system collapses a sub tree it consumes less space in the display area The system redraws the instance tree with child elements of the specified goal removed if the instance goal sub tree is collapsed A collapsed sub tree draws its expand collapse toggle as An expanded sub tree draws its expand collapse toggle as A minimum white space pad surrounds each visible instance goal placing collapsed instance goal sub trees as near as possible to their peer instance goals See Figure 11 below where goal g5 2 s sub tree is colla
61. 1 3 Section 10 2 1 3 is skipped because the GMoDS Test Driver project already depends on the GMoDS Visualizer project 10 3 1 2 Install the GMoDS Test Driver Follow the steps in section 10 2 1 above except the CVS repository location cvsroot gmodsvis will already be defined and instead of GMoDSVisualizer check out GMoDSTestDriver 10 3 2 Usage The project GMoDSTestDriver includes the folders eventscripts and goalmodels for sample event scripts and GMoDS goal models The GMoDS Test Driver is launched using the class edu ksu cis macr goal model testdriver launcher Launcher To run the GMoDS Test Driver first define a run configuration as shown in Figure 105 Figure 106 and Figure 107 below Then click the Run button 166 Java File Edit Source Refactor Navigate Search Project GMoDSTestDriver eventscripts VisionDocument2 allValid xml Eclipse ri 0 Q e d G 6 Package Explore NT Ts Hierarchy B AgentTool3 I at3 GoalDiagramPlugin p G3 CollectiveBuilding Simulation cvs projects cis ksu e Core b ey DEMIR CF Share cvs projects cis ksu edu t Documentation Y Ej GMoDSTestDriver cvs projects cis ksu edu Vv S8src testdriver b Biedu ksu cis macr goal model testdriver V H edu ksu cis macr goal model testdriver launche QR Launcherjava 18 P H edu ksu cis macr goal model testdriver random P flogging 3j build xml 1 1 gt 98 src unittests P pA JR
62. 1 6 TF GV 1 7 TF GV 1 8 TF GV 1 9 TF GV 1 10 TF GV 1 11 TF GV 1 12 TF GV 1 13 Goal Diagrams 1 A goal diagram with a goal with no parameters a goal with at least 2 repeat procedure parameters a positive trigger with at least 2 parameters and a negative trigger for each diagram with at least 2 parameters and a precedes relation listed here 2 A goal diagram with non adjacent goals connected by positive or negative triggers 3 A goal diagram with more than one positive or negative trigger emanating from the same goal to a non adjacent goal Required Event None Scripts Procedure 1 Start the GMoDS Test Driver and visually examine the displayed specification tree Expected Results 1 No requirement from the Vision Document is violated For Each Required Goal Diagram 8 10 2 1 2 Test Case TC GV 2 Display Instance Tree Table 55 Test Case TC GV 2 Display Instance Tree Use Cases Tested GV 2 Display Instance Tree Features Tested TF GV 2 1 TF GV 2 2 TF GV 2 3 TF GV 2 4 TF GV 2 5 TF GV 2 6 143 TF GV 2 7 TF GV 2 8 Goal Diagrams repeat procedure for each diagram 1 A goal diagram with a goal with no parameters a goal with at least 2 parameters a positive trigger with at least 2 parameters and a negative trigger with at least 2 parameters and a precedes relation listed here 2 A goal diagram with non adjacent goals connected by positive or neg
63. 2 0 and Software Quality Assurance Plan 1 0 available at http people cis ksu edu mfraka FrakaMSE html 8 3 Test Items The requirement specifications for all features of each item to be tested can be found in Vision Document 2 0 at http people cis ksu edu mfraka FrakaMSE html The architectural design and formal specification for these items can be found at the same URL The following items will be tested e GMoDS Test Driver o GMoDSTestDriverImpl o EventScriptImpl o RandomEventScriptImpl o GoalEventImpl e GMOoDS Visualizer o GMoDSModellmpl GMoDS VisualizerUI1 AbstractUI AbstractCanvas SpecificationTreeUI SpecificationTreeCanvas SpecificationGoalUI InstanceTreeUI InstanceTreeCanvas InstanceGoalUI AbstractRelationUI AbstractTriggerUI PrecedesRelationUI PositiveTriggerUI NegativeTriggerUI FlashDaemon AbstractPart CO0O0 000000000000 131 GMoDSVisualizerPart SpecificationTreePart InstanceTreePart InstanceGoalPart O00 0 8 4 Features to be tested This section lists the system requirements that will be tested for the GMoDS Test Driver and GMoDS Visualizer For each component each feature to be tested is uniquely identified in its own sub section and associated with the specific system requirement s that define the feature This document uses these tested feature identifiers as a convenient cross reference to avoid repeating system requirement details 8 4 1 GMoDS Test Driver 8 4 1 1 TF GTD 1 1 SR GTD
64. 5 parameters will display the character H in the show hide parameter toggle An instance goal hiding its parameters will display the character S in the show hide parameter toggle 8 4 2 19 TF GV 2 5 SR GV 2 5 the system shall connect each parent instance goal to one of its child instance goals using a line with an arrow pointing to the child whose source is the collapse expand toggle control on the parent instance goal The arrow head shall be centered on the top edge of the child instance goal 8 4 2 20 TF GV 2 6 SR GV 2 6 the system shall separate instance goal names from parameters using a horizontal line if parameters are displayed If parameters are not displayed no such horizontal line shall be shown 8 4 2 21 TF GV 2 7 SR GV 2 7 the system shall show each instance goal parameter parameter value and parameter value origin combination on a single line separated by a space a semi colon and another space One line will be used for each combination of instance goal parameter parameter value and parameters value origin 8 4 2 22 TF GV 2 8 SR GV 2 8 the system shall abbreviate the parameter value origin values as I inherited T trigger and M modification 8 4 2 23 TF GV 2 9 SR GV 2 9 the system shall provide scrolling and zooming of the instance goal tree view 8 4 2 24 TF GV 2 10 SR GV 2 10 the system shall allow the user to specify that instance goals of particular specification goals be
65. 5 day Edit random event parameters Executable code 23 24 Feb 2 days Edit state parameters Executable code 25 28 Feb 2 days View specification tree parameters Executable code 1 Mar 0 5 day View instance tree parameters Executable code 1 Mar 0 25 day Expand collapse instance sub trees Executable code 2 Mar 1 day Show hide specific instance goal parameters Executable code 3 Mar 1 day Show hide all instances of particular specification goals and their descendants Executable code 4 7 Mar 2 days Component Design GMoDS Test Driver Component Design UML diagrams 8 9 Mar 1 5 days GMoDS Visualizer Component Design UML diagrams 9 10 Mar 1 5 days 31 Deliverable Task Completion Time Frame Time Criteria Testing Assessment Develop Unit Unit tests 11 17 Mar 5 days Evaluation Tests complete and passed Develop test case Inputs complete 18 22 Mar 3 days inputs Run manual test All test cases 23 30 Mar 6 days cases and resolve complete issues Evaluate quality Quality metric 31 Mar 1 day metrics graphs complete Document test All test case 1 4 Apr 2 days results documentation complete Action Items All action item All action items 5 Apr 0 5 day resolutions resolved and documented documented User Manual Installation
66. ChildUIs identifier Uniqueldentifier specified Iterator lt SpecificationGoalUI gt SpecificationGoalUI Pre identifier null Post Result all children UIs of the specified SpecificationGoalUI Query whether a Syntax hasChildren identifier Uniqueldentifier SpecificationGoalUI has boolean children Pre identifier null Post Result true if the SpecificationGoalUI has children false otherwise Reset all Syntax resetGoalUIs void SpecificationGoalUIs data Pre none structures that support Post All SpecificationGoalUIs data structures that drawing support drawing are reset to their default values Table 42 IndirectRelationUIRegistry Interface Specifications Record an indirectly routed AbstractRelationUI Draw the all indirectly routed AbstractRelationUIs on the canvas Syntax addRelationUl relationUI AbstractRelationUD void Pre relationUI null Post The indirectly routed AbstractRelationUI is recorded Syntax drawRelations graphics2D Graphics2D void Pre graphics2D null Post All indirectly routed AbstractRelationUIs are drawn on the canvas 103 Sort all indirectly routed Syntax sortRelations void AbstractRelationUIs into Pre none drawing order Post All indirectly routed AbstractRelationUIs are sorted into drawing order Calculate t
67. DS and the GMoDSVisualizerImpl GMoDTestDriverImpl Hold an EventScript Implement loadEventScript and issueRandomEvents to create and install EventScriptImpl and RandomEventScriptImpl respectively EventScript Define the behaviors of any EventScript EventScriptImpl Hold the list of GoalEvents defining the script and provide default implementations of the EventScript interface 43 Component Responsibilities RandomEventScriptImpl Override the EventScriptImpl to create and issue random GoalEvents based on the RandomEventParameters configured by the user and the events defined by the goal diagram GoalEvent Define the behaviors of a GoalEvent EventType Define the possible types of any event in a goal diagram GoalEventImpl Implement the GoalEvent interface 4 3 3 GMoDS Test Driver Interface Specifications Table 11 GMoDS Test Driver GoalEvent interface specifications Access the EventType of a GoalEvent Access the Uniqueldentifier of the specification goal referenced by a GoalEvent Access the Uniquieldentifier of the instance goal referenced by a GoalEvent Access the Uniqueldentifier of the SpecificationEvent referenced by a GoalEvent Syntax getType EventType Pre None Post Result this eventType Syntax getSpecificationGoalldentifier Uniqueldentifier Pre None Post Result this specificationGoalID
68. Dr David Gustafson o Dr Robby e Technical Inspectors o Shylaja Chippa o KyleHill 3 2 2 Tasks See Chapter 2 Project Plan for a discussion of all project tasks 3 2 3 Responsibilities 3 2 3 1 Developer The developer must produce all artifacts mentioned in 3 3 2 Minimum Documentation Requirements as well as any additional documentation that may be required by the major professor or supervisory committee The developer must notify the major professor of any technical risks found during conduct of the project 3 2 3 2 Major Professor The major professor must monitor the developer s progress and provide guidance as needed The major professor is considered the primary user for the product 3 2 3 3 Supervisory Committee The supervisory committee must review and approve or provide necessary actions to remediate all artifacts presented at the end of each phase of the project 34 3 2 3 4 Technical Inspectors The technical inspectors must inspect the architectural design document using the provided checklist and provide the completed checklist and letter of inspection to the major professor and a copy to the developer 3 3 Documentation All project documentation will be available at http people cis ksu edu mfraka FrakaMSE html 3 3 1 Purpose The purpose of the documentation is to provide a reference to the state of the project and the engineering activities performed by the developer to date 3 3 2 Minimum Documentation Requi
69. Driver relies on the GMoDS component to discover the possible goal events based on the events that have been issued to GMoDS The init event provides the initial set of active instance goals The GMoDS Test Driver generates a random event as specified in the random event configuration based on the current active instance goals and appends this event to the currently executing event script The GMoDS Test Driver issues the last generated event to GMoDS according to 1 3 1 1 2 8 and 1 3 1 1 2 9 described above after a random delay time if GMoDS Test Driver is in automatic mode or immediately if in manual mode Upon execution of that event the Use Case GTD 2 Issue Random Goal Events resumes event generation until the final random event is issued The GMoDS Test Driver keeps the currently executing goal event script which can be saved using the Use Case GTD 3 Save Goal Event Script described below Each active instance goal s specification goal defines the positive and negative trigger events that can be executed from that goal In addition the GMoDS Test Driver can issue an ACHIEVED FAILED or MODIFIED event for each active instance goal The union of all positive and negative trigger ACHIEVED FAILED and MODIFIED events defined by all active instance goals and their corresponding specification goals defines the possible random events at any time 1 3 1 2 2 Associated Functional Requirements 1 3 1 2 2 1 SR GTD 1 1 See 1 3 1 1 2 1 abov
70. E System Library jdk1 6 0 12 D wa JUnit 3 7 Gy eventscripts W ArchPrototypeEventScript xml 1 1 4 InitialPrototypeEventScript random1 xml 1 1 Y InitialPrototypeEventScript saved xml 1 1 4 InitialPrototypeEventScript xml 1 3 y Modified random1 xml 1 1 D TestModifiedChild xml 11 H TestModifiedParent xml 11 Xj VisionDocument2 2faults xml 1 1 4 VisionDocument2 allValid xml 1 1 Figure 105 Run Configurations Window Help Run Debug Ctri F11 F11 Run History gt Run As Debug History Debug As Debug Configurations C Skip All Breakpoints e Remove All Breakpoints 49 Add Java Exception Breakpoint 9 Add Class Load Breakpoint Gj Q External Tools F 8 R specGoal g4 insti e 6 gt gt R specGoal g4 instt e 9 gt Oal g5 instGoal 1 e 3 gt Oal g6 instGoal 1 R specGoal g4 instt e 9 gt lz g2 instGoal 1 de E Problems B Declaration E Console 3 c Call Hierarchy 4 Se 167 Run Configurations Create manage and run configurations Run a Java application S gx 5si Java Applet v 31 Java Application E Environment TestObjectMoving D HuRT IED Launcher Launcher Environment fF Launcher Environment 1Agent Launcher Environment 2Agents O Launcher ObjectConstruction g Hi Launcher ObjectConstructionNe Launcher VisionDocument goal Launcher Visi
71. EventImpl gt Set Cself event gt asSet self event pre gt asSet gt Set CGoalEventImpl gt Set lt gt Cself event gt asSet self event pre gt asSet gt gt size Integer 1 Integer i CCself event gt asSet self event pre gt asSet gt gt size 1 gt Boolean ostcondition Appended is false evaluation results self EventScriptImpl si self event OrderedSet GoalEventImpl gt OrderedSet lt gt self event gt last OclUoid Undefined e GoalEventImpl gelt Cself eyent gt last e Boolean false gnods gtd invalid post cmd gt TET 75 Figure 27 above shows that the post conditions are violated in the above snapshot if the script gtd invalid post cmd is executed fc Shortcut to USE 6 2 use bat gmods qgtd valid cmd gt se topenter si addEvent lt qgel gt recondition NotInScript is true recondition UalidType is true recondition ModifiedReqParam is true recondition UalidSpecGoal is true recondition ValidfchievedEvent is true recondition UalidFailedEuent is true recondition UalidSpecEuent is true ise tinsert sl se gt topexit ostcondition ostcondition stcondition ise gt fopenter recondition gei into Events true true NowInScript is OneMoreEvent is Appended is true si addEvent lt gel gt NotInScript is false UalidT ype is true ModifiedReqParam is true
72. GTD 1 6 3 Critical Requirement If the user clicks Pause in automatic mode the GMoDS Test Driver enters manual mode and waits for the next user interaction 1 3 1 1 2 13 SR GTD 1 6 4 Critical Requirement If there are no more pre defined events remaining or the specified number of random events have been issued the GMoDS Test Driver disables the Play and Next controls 12 1 3 1 2 Use Case GTD 2 Issue Random Goal Events Table 1 below shows GMoDS Test Driver options to configure random events Table 1 GMoDS Test Driver Random Event Options Option Definition Default Modified Min String Length Minimum length for a 1 While paused or in String representing a manual mode parameter value Max String Length Maximum length for a 10 While paused or in String representing a manual mode parameter value Min Delay Time Minimum delay time Flash Period While paused or in between events 1000 milliseconds see manual mode Table 2 page 17 Max Delay Time Maximum delay time Flash Period x2 While paused or in between events milliseconds see Table manual mode 2 page 17 Number of Random The total number of 25 While paused or in Events random events to issue manual mode 1 3 1 2 1 Description The user selects Issue Random Events The GMoDS Test Driver replaces the currently loaded event script with an empty script and begins random goal event generation The GMoDS Test
73. GTD 1 M 1 PASS TC GTD 1 M 2 PASS TC GTD 1 M 3 PASS TC GTD 1 M 4 PASS TC GTD 1 M 5 PASS TC GTD 1 M 6 PASS TC GTD 1 M 7 PASS TC GTD 2 M 1 PASS 149 Manual or Input Action to Date Test Case Simulation Set Status Reasons For Failure Resolve TC GTD 2 M 2 FAIL Uncaught Deferred IllegalGoalEventException Exceptions Add during play Throw and Catches TC GTD 2 M 2 PASS TC GTD 2 M 3 PASS TC GTD 2 M 4 PASS TC GTD 3 M 0 PASS TC GTD 4 M 1 PASS TC GTD 4 M 2 PASS TC GTD 4 M 3 PASS TC GTD 4 M 4 PASS TC GTD 4 M 5 PASS TC GTD 4 M 6 PASS 3 10 2011 TC GV 1 M 1 FAIL Rightmost specification Add margins to goal cutoff in drawing the image on the right and bottom TC GV 1 M 1 PASS TC GV 1 M 2 PASS TC GV 1 M 3 PASS TC GV 2 M 1 PASS TC GV 2 M 2 PASS TC GV 2 M 3 PASS TC GV 3 M 1 FAIL Specification tree Set preferred right bottom cutoff when size and zoomed in revalidate after zoom TC GV 3 M 1 PASS TC GV 4 M 1 PASS TC GV 5 M 1 FAIL Specification tree relation Add flag to parameters not hidden prevent drawing parameters TC GV 6 M 1 PASS TC GV 7 M 1 PASS TC GV 8 M 1 PASS TC GV 9 M 1 PASS 3 11 2011 TC GV 1 S 0 PASS TC GV 2 S 0 PASS TC GV 5 S 0 FAIL Specification tree relation Add flag to parameters not hidden prevent drawing parameters TC GV 5 M 1 PASS TC GV 4 S 0 PASS TC GV 8 S 0 PASS
74. GTD 2 Event Script Operation TF GTD 1 5 Pass TF GTD 1 6 TF GTD 1 6 1 TF GTD 1 6 2 TF GTD 1 6 3 TF GTD 1 6 4 TF GV 3 1 TF GV 3 2 TF GV 3 3 TC GTD 3 Random Event Script Operation TF GTD 2 1 2 Pass TF GTD 2 1 3 TF GTD 2 1 4 TF GTD 2 2 TF GTD 2 3 TF GV 3 1 TF GV 3 2 TF GV 3 3 TC GTD 4 Save Event Script TF GTD 2 3 Pass TF GTD 3 1 TF GTD 3 2 TF GTD 3 2 1 TF GTD 3 2 2 148 Test Case ID Test Case Title Tested Results Features TC GV 1 Display Specification Tree TF GV 1 1 Pass TF GV 1 2 TF GV 1 3 TF GV 1 4 TF GV 1 5 TF GV 1 6 TF GV 1 7 TF GV 1 8 TF GV 1 9 TF GV 1 10 TF GV 1 11 TF GV 1 12 TF GV 1 13 TC GV 2 Display Instance Tree TF GV 2 1 Pass TF GV 2 2 TF GV 2 3 TF GV 2 4 TF GV 2 5 TF GV 2 6 TF GV 2 7 TF GV 2 8 TC GV 3 Zooming TF GV 1 14 Pass TF GV 2 9 TC GV 4 Show Hide Instance Goals of Specific Types TF GV 2 10 Pass TC GV 5 Show Hide All Specification Goal Parameters TF GV 4 1 Pass TC GV 6 Show Hide All Instance Goal Parameters TF GV 5 1 Pass TC GV 7 Show Hide Specific Instance Goal Parameters TF GV 6 1 Pass TC GV 8 Collapse Expand Instance Goal Sub tree TF GV 7 1 Pass TF GV 7 2 TF GV 7 3 TC GV 9 Change Instance Goal State Colors TF GV 3 3 Pass 9 3 Test Case Result Details Table 64 Test Case Result Details Manual or Input Action to Date Test Case Simulation Set Status Reasons For Failure Resolve 3 9 2011 TC
75. Hide Specific Instance Goal Parameters Use Cases Tested GV 6 Change Instance Goal View Features Tested TF GV 6 1 Goal Diagrams 1 Any goal diagram with a goal that has parameters Required Event 1 Any compatible event script with valid events Scripts Procedure 1 Start the GMoDS Test Driver 2 File Load Event Script and select the compatible script 3 Click Play and allow the script to end 4 Click the Hide toggle for an instance goal with parameters 5 Click the Show toggle for that instance goal Expected Results 1 When the Hide toggle is clicked that instance goal s parameters are not visible The horizontal line separating the goal parameters from the goal name is not visible 2 When the Show toggle is clicked that instance goal s parameters are visible The horizontal line separating the goal parameters from the goal name is visible 8 10 2 1 8 Test Case TC GV 8 Collapse Expand Instance Goal Sub tree Table 61 Test Case TC GV 8 Collapse Expand Instance Goal Sub tree Use Cases Tested GV 7 Change Instance Sub tree View Features Tested TF GV 7 1 TF GV 7 2 TF GV 7 3 Goal Diagrams 1 Any goal diagram Required Event 1 Any compatible event script with valid events Scripts Procedure 1 Start the GMoDS Test Driver 2 Filel Load Event Script and select the compatible script 3 Click Play and allow the script to end 4 Click the Collapse toggle for an ins
76. M_OUT zoomOut Figure 87 InstanceTreePart actionPerformed e ActionEvent 129 e MouseE vent goalUl InstanceGoalUl instTrUl InstanceTreeUl self InstanceGoalPart subtreeToggle Rectangle2D ich T x getX0 i y getY0 subtreeToggle getSubtre eToggle t subtreeTo ggle null and subCont ains toggleSubtree j T subC ontains contpins x y t T l i T t draw I Instance TreeUI draw param T oggle null and paramC ontains toggleP arameters draw Z Instance TreeUI draw Figure 88 InstanceGoalPart mouseClicked e MouseEvent Figure 88 above shows the InstanceGoalPart mouseClicked method 130 8 Chapter 8 Test Plan 8 1 Test Plan Identifier GMoDS Visualizer TestDriver TestPlan 2 0 8 2 Introduction This document describes the testing to be performed on the GMoDS Visualizer and Test Driver components The GMoDS Visualizer component allows visualization of the specification tree and instance tree goals within the Goal Model for Dynamic Systems GMoDS The GMoDS Test Driver is a component that allows scripted events from a file or generated randomly to be send to GMoDS to test the GMoDS Visualizer This testing will be performed in accordance with the Project Plan
77. Master of Software Engineering Portfolio By Michael L Fraka B S University of Nebraska 1982 MSE Kansas State University 2011 A PORTFOLIO submitted in partial fulfillment of the requirements for the degree MASTER OF SOFTWARE ENGINEERING Department of Computing and Information Sciences College of Engineering KANSAS STATE UNIVERSITY Manhattan KS 2011 Approved by Major Professor Dr Scott DeLoach 0 Abstract The Goal Model for Dynamic Systems GMoDS is a means for specifying system requirements for agent oriented software at design time and tracking their achievement at run time The specification goal tree represents the specified requirements at design time The instance goal tree represents the run time achievement profile of the specified goals The GMoDS Visualizer is an optional graphical display of both the specification and instance goal trees and all appropriate relations between the goals In addition the visualizer displays goal parameters in both the specification and instance trees and the status and parameter values of instance goals The GMoDS Test Driver tests either GMoDS or the GMoDS Visualizer The Test Driver executes event scripts from a file or by random generation compatible with the GMoDS model being used The Test Driver operates in automated or manual mode ii oo 10 un fk Ww NY S pd m m N S Table of Contents ABSTRACT ccccsscsscsssscssscsssccsessnssseseseeees CHA
78. MoDS Test Driver When invoking the GMoDS Test Driver the user specifies the goal diagram that will be passed to GMoDS to build the specification goal tree The GMoDS Test Driver instantiates the GMoDS component populates the specification tree and initializes the instance goal tree The GMoDS Test Driver then constructs the GMoDS Visualizer passing in a reference to the GMoDS component and to itself The reference to the GMoDS Test Driver causes the GMoDS Visualizer to add UI components to control the GMoDS Test Driver 1 3 1 1 Use Case GTD 1 Issue Scripted Goal Events 1 3 1 1 1 Description The user selects Load Event Script The GMoDS Test Driver prompts the user to provide a goal event script that defines the goal events that will be issued to GMoDS and the delay time between these events It is the user s responsibility to assure that the goal events are consistent with the goal diagram but the GMoDS Test Driver will check the script for correct event and parameter names Upon initialization the GMoDS Test Driver enters manual mode and waits for user interaction If the user clicks Play the GMoDS Test Driver enters automatic mode and executes the goal event script pausing for the specified delay time between events If the user clicks Pause in automatic mode the GMoDS Test Driver event execution pauses and the GMoDS Test Driver enters manual mode If the user clicks Next in manual mode the next event is executed The go
79. PTER 1 VISION DOCUMENT CHAPTER 2 PROJECT PLAN ccccscsssccscssssssscsssssecscsssssessssssnsecssssessesssesensecssessessessessnseeeses CHAPTER 3 SOFTWARE QUALITY ASSURANCE PLAN eeeeeeeee ee tntn eene tntn senatus CHAPTER 4 ARCHITECTURAL DESIGN eese eee eee en senses tns tn sits tn sensn tassa testa sensn CHAPTER 5 TECHNICAL INSPECTION CHECK LIST eese eese eee esee tn sensns en statu sense ta sunu CHAPTER 6 USE OCL MODELING OF THE FORMAL SPECIFICATION eerte entente 72 CHAPTER 7 COMPONENT DESIQGN eese eee eee ee sensn esta sinn neta statu sesta sn ses sensn senses enses sensn ses osi nen 82 CHAPTER 8 TEST PLAN a 131 CHAPTER 9 ASSESSMENT EVALUATION csccsscsssssssscsssssecsssssssscssssessessssssssssssssssecsssssessessessesseeees 148 CHAPTER 10 USER MANUAL csssscsscssssescssessecscsssssesscsssssessssssnsecsssssnsesssssessesssesensesssesessesssessessesees 152 CHAPTER 11 PROJECT EVALUATION cccssssssssssssssssscsesssscssssessecsssssssecssssssssessssssseesseeseseessesseseesoes 174 REFERENCES 181 iii 1 Chapter 1 Vision Document 1 1 Introduction This paper provides the background motivation and specific system requirements for a graphical visualization tool employable by software incorporating the Goal Model for Dynamic Systems GMoDS 2 component In
80. Pre none Post The thread for the FlashDaemon run method is started Syntax run void Pre none Post Flashed all changed InstanceGoalUIs for the total times implied by FlashParameters at the time the goal changed Syntax waitWhileEmpty void Pre none Post A changed InstanceGoalUI has been added to the daemon 7 2 2 3 3 GMoDS Visualizer View Design Rationale The Model View Controller architecture separates the business rules for interacting with the user away from the presentation of the interface This will allow for maximum flexibility in designing new visual representations 7 2 2 4 GMoDS Visualizer View Behavior Figure 52 below shows the SpecificationTreeUl initialize method 109 self SpecificationTreeuUl SpedficationTreeC anvas n super initialize initialize SpedficationTreeC anvas initialize SpedficationTreeC anvas drawf Figure 53 SpecificationTreeCanvas initialize Figure 53 above shows the SpecificationTreeCanvas initialize method Figure 54 below shows the SpecificationTreeCanvas initializeGoals method 110 self SpedficationTreeC anvas SpedficationG oalUIR egistry goalUl SpecificationGoalUl goalUls getGoalUls next goalUl in goalUls SpedficationG oalUl initialized initialize Figure 54 SpecificationTreeCanvas initializeGoals self SpedficationGoalUl super initialize create Labels createR elationUls
81. RIGGER goal event s name attribute does not refer to a positive trigger in the specification tree for specGoal 6s instance goal s not defined The instance goal referenced by specGoal and instGoal does not exist in the instance tree yet s instance goal 96s not active The instance goal referenced by specGoal and instGoal is not an active goal for an event type other than MODIFIED s instance goal s s negative trigger parameter values 96s do not match any instance goal No instance goal exists in the instance tree that is negatively triggered by the negative trigger referenced by name on specGoal with instance parameter names that match the Parameter name attributes in the goal event 96s unspecified triggering instance goal 96s The instance goal referenced by the goal event was not found during issueToGMoDS 173 11 Chapter 11 Project Evaluation 11 1Introduction This document is the evaluation of the GMoDS Test Driver and Visualizer project and product 11 2Process 11 2 1 Problems Encountered This section lists problems encountered on the project 11 2 1 1 Drawing with Java 2D I had little experience drawing with Java 2D prior to the project It so happened that in parallel with this project I was assigned a project at work that also required I use this capability The two efforts were mutually beneficial 11 2 1 2 Scrolling
82. Register direct relations with self and indirect relations with SpecificationTreeCanvas IndirectRelationRegistry Record exiting and entering indirect relations with self Figure 55 SpecificationGoalUL initialize Figure 55 above shows the SpecificationGoalUlL initialize method Figure 56 below shows the SpecificationTreeCanvas registerRelations method This method prepares for drawing relations by recording the relations with the object responsible for drawing them and sorting them in drawing order 111 self SpecificationTreeC anvas SpedificationG oalU Registry goalUl SpecificationG oalUIl IndiredRelationRegistry goalUls getGoalUls next goalUl in goalUls registerR elations sortRelations goalUls getGoalUls next goalUl in goalUls sortindiredR elations Figure 56 SpecificationTreeCanvas registerRelations self SpedificationTreeC anvas SpedficationG oalUIR egistry rootUl SpedficationG oalUIl IndirectRelationRegistry reset resetGoalUls PE determineSize SpecificationT reeC anvas detem ineSize Dimension rootUI getRootUI drawTree drawDirectR elations drawinidiredR elations Figure 57 SpecificationTreeCanvas draw Figure 57 above shows the SpecificationTreeCanvas draw method First all SpecificationGoalUIs and AbstractRelationUIs data structures that are dynamically calculated 112 during
83. UIs Used for positive and negative triggers and precedes relations InstanceTreeUI Define the UI for the instance tree Provide zoom and scroll controls for the instance tree InstanceTreeCanvas Draw the instance tree InstanceGoalUI Define the UI for an instance goal FlashDaemon Flash added and changed instance goal UIs for the desired rate and duration 4 4 7 GMoDS Visualizer View Interface Specifications Table 16 GMoDS Visualizer AbstractUI interface specifications Create this view and all subordinate Syntax createUI void views Pre None Post This view and all subordinate views are created Create the appropriate controller for Syntax makeController AbstractPart this view Pre None Post Result The appropriate controller for this view is created Respond to notification of a change Syntax update o Observable arg Object void in the model Pre The Observable o the model has changed state Post This view makes appropriate changes to the view based on changes in the Observable Register with the model if this view Syntax registerWithModel void needs to do so Pre None Post If this view needs to receive updates from the model it registers as an Observer with it 51 Initialize this view Syntax initialize void Pre None Post This view and all s
84. UlColors Define the colors used when drawing an InstanceGoalUI for the combination of GoalState FlashContext and ImageContext GoalState Enumerate the possible goal states FlashContext Enumerate the possible states of a flash ImageContext Enumerate the portions of an image requiring colors 7 2 2 1 2 GMoDS Visualizer Model Local Module Interface Specifications Table 31 ModifiableInstanceParameters Interface Specifications Query the inherited property of a specific parameter Syntax isInherited uniqueldentifier Uniqueldentifier Query the modified property of a specific parameter boolean Pre uniqueldentifier null Post Result true if the specified parameter s value is inherited Syntax isModified uniqueldentifier Uniqueldentifier boolean Pre uniqueldentifier null Post Result true if the specified parameter s value has changed 91 Set the value of a specific parameter Get the value of a specific parameter Syntax setValue uniqueldentifier Uniqueldentifier inherited boolean value Object boolean Pre uniqueldentifier null Pre value null Post Result true if the specified parameter s value has changed Syntax getValue uniqueldentifier Uniqueldentifier Object Pre uniqueldentifier null Post Result the value of the parameter Table 32 ValueContain
85. a Zoomed Drawing I had no appreciation for the requirements of placing a customized Component that changes size in a JScrollPane and no experience with zoom on an image 11 2 1 3 Designing an Indirect Routing Algorithm for Relations The projects top technical challenge was the algorithm for routing indirect relations avoiding intersections with goals and minimizing crossing of relations 11 2 1 4 Supporting the Modification Parameter Origin Value GMoDS does not directly support the Modification parameter origin value My simple solution was to revise a copy of InstanceParameters called ModifiableInstanceParameters to persistently track the value of each parameter Any time a parameter value changes the Modification parameter value origin could be attributed to it GMoDS has an unresolved issue regarding the behavior of the InstanceTree method modifyInstanceGoal with respect to generating a proper parameter origin value for child goals when their parent is directly modified In my opinion the parameter origin value displayed for these child goals parameters that match the modified parameter in the parent should be Inherited I However GMoDS sends the value of the inherited property for these parameters as false when it calls the ChangeManager method notifyInstanceGoalModified for the child goals If GMoDS sent the value of inherited as true the GMoDS Visualizer would display a parameter value origin of T instead
86. ace specifications Initialize the GMoDS Visualizer resulting in a visible ready user interface Table 9 Test Driver interface specifications Add an Observer of the event script as in the Observer design pattern Syntax initialize void Pre GMoDS GoalTree implementation null Pre GMoDS GoalTree implementation is initialized Post The GMoDsSVisualizerImpl is initialized The user interface is created initialized and made visible Syntax addObserver o Observer void Pre o null Post An Observer o is recorded and will be notified whenever the state of the EventScript changes 40 Load an event script XML file into the TestDriver Save the current event script as an XML file Begin issuing random events using the current random event configuration parameters Syntax loadEventScript eventScript File void Pre eventScript null Pre eventScript File exists is a File and can be read Post An EventScriptImpl is created from the eventScript File Post All valid GoalEvents specified in eventScript are included in the EventScriptImpl Post The TestDriver enters manual mode Post All invalid GoalEvents are discarded and the user is notified visually and in a log file of discarded GoalEvents Syntax saveEventScript eventScr
87. action 132 8 4 1 4 1 TF GTD 1 6 1 SR GTD 1 6 1 If the user clicks Play in manual mode the GMoDS Test Driver enters automatic mode and begins to execute each event etc 8 4 1 4 2 TF GTD 1 6 2 SR GTD 1 6 2 if the user clicks Next in manual mode the GMoDS Test Driver issues the next unexecuted goal event and waits for the next user interaction etc 8 4 1 4 3 TF GTD 1 6 3 SR GTD 1 6 3 if the user clicks Pause in automatic mode the GMoDS Test Driver enters manual mode and waits for the next user interaction 8 4 1 4 4 TF GTD 1 6 4 SR GTD 1 6 4 if there are no more pre defined events remaining or the specified number of random events have been issued the GMoDS Test Driver disables the Play and Next controls 8 4 1 4 5 TF GTD 2 1 2 SR GTD 2 1 2 the GMoDS Test Driver may be configured with the minimum and maximum string lengths for randomly generated strings The system shall default to a minimum string length of 1 and a maximum string length of 10 8 4 1 4 6 TF GTD 2 1 3 SR GTD 2 1 3 the GMoDS Test Driver may be configured with the minimum and maximum delay time in milliseconds between randomly issued goal events The system shall default to a minimum delay time of 100 milliseconds and maximum delay time of 5000 milliseconds The system shall not accept a minimum delay time of less than millisecond 8 4 1 4 7 TF GTD 2 1 4 SR GTD 2 1 4 the GMoDS Test Driver may be configure
88. addition the paper specifies requirements for a test driver for GMoDS that can substitute for simulation components as a client of GMoDS Finally the paper concludes with assumptions constraints and the proposed development environment 1 1 1 Motivation Several simulations of agent oriented systems using the GMoDS system exist but users of these simulations have limited access to the state of GMoDS at run time Developers of these simulations would find GMoDS run time information invaluable as a debugging tool but should not be required to use this tool The GMoDS Visualizer will provide a graphical representation of GMoDS specification goals and run time instance goals with loose coupling to GMoDS allowing for optional use Running an agent simulation is more complex and computationally expensive than is necessary to test the Visualizer The GMoDS Test Driver will test the GMoDS Visualizer by stimulating GMoDS to in turn stimulate the Visualizer thus allowing an alternative to simulation clients as test mechanisms 1 1 2 GMoDS The GMoDS system represents system requirements as goals and their relationships using an a priori i e prior to run time specification tree See Figure 1 2 below Higher level goals can be decomposed into lower level goals using a parent child relation forming the tree Parent goals are related to child goals using either an AND or OR connective Child goals connected via AND must all be achieved to achieve the
89. al events are issued to the GMoDS component which alters the instance tree based on the event and specification tree definition and informs the GMoDS Visualizer 1 3 1 1 2 Associated Functional Requirements 1 3 1 1 2 1 SR GTD 1 1 Non critical Requirement The GMoDS Test Driver shall prompt the user for a goal event script if the user selects Load Event Script and if such a script is provided the GMoDS Test Driver shall enter scripted event mode Use Case GTD 1 Issue Scripted Goal Events 1 3 1 1 2 2 SR GTD 1 2 Critical Requirement The GMoDS Test Driver shall parse the goal event script to generate goal events their parameters and the time delay relative to the previous goal event 1 3 1 1 2 3 SR GTD 1 2 1 Non critical Requirement The GMoDS Test Driver shall log errors and drop the corresponding goal event from the script if a goal event or parameter name does not match a legal name defined in the goal diagram In addition the GMoDS Test Driver shall visually inform the user of these errors 1 3 1 1 2 4 SR GTD 1 2 2 Critical Requirement The GMoDS Test Driver shall support a scripted events language with the following event types ACHIEVED FAILED and MODIFIED events for each active instance goal and positive and negative trigger events defined by the specification goal corresponding to any active instance goal 1 3 1 1 2 5 SR GTD 1 2 3 Critical Requirement The GMoDS Test Driver Event Script Language GTD ESL sh
90. all include the following XML elements and attributes as shown in Figure 5 below and defined in the following requirements E attributes One iof ACHIE FAILED POSITIVE_TRIGGER NEGATIVE TRIGGER or MODIFIED 1 VED m positiy wr negative tnager emanates The uniq particular ins jecihication go 3 z A goal model event P IEGATIVE TRIGGER E attributes The parameter name The parameter value NOTE All parameters are treated as iF their data type Is Java String must b pre ded if ant type attribute is VODIFIED Figure 5 GMoDS Test Driver Event Script Language 1 3 1 1 2 5 1 SR GTD 1 2 3 1 Critical Requirement The GTD ESL shall have a top level Script element containing one or more Event element children 1 3 1 1 2 5 2 SR GTD 1 2 3 2 Critical Requirement The GTD ESL Event element shall represent a single goal model event and have the following attributes type whose possible values are ACHIEVED FAILED POSITIVE TRIGGER NEGATIVE TRIGGER or MODIFIED specGoal whose value is the unique identifier of the specification goal whose instance goal is achieved failed or from which the positive or negative trigger emanates instGoal whose value is the unique integer identifier of a particular instance 10 of the specification goal delay whose value is the delay in milliseconds prior to issuing this event to
91. ation and Figure 24 constraint model gtd valid pt cmd Snapshot of pre state adding a Figure 25 valid RPOSITIVE TRIGGER gtd valid post cmd Script to invoke pre post Figure 26 conditions valid post conditions gtd invalid post cmd Script that invokes pre post Figure 27 conditions invalid post conditions gtd invalid specevt cmd Snapshot of pre state adding an Figure 29 invalid ePOSITIVE TRIGGER due to an invalid SpecificationEvent ID 72 Script Comment Figure gtd invalid specgoal cmd Snapshot of pre state adding an Figure 30 invalid POSTIVE_TRIGGER due to an invalid ParamterizedSpecificationGoal ID gtd invalid achieved cmd Snapshot of pre state adding an Figure 31 invalid ACHIEVED event due to referencing a non leaf goal gtd invalid modified cmd Snapshot of pre state adding an Figure 32 invalid MODIFIED event due Figure 33 to no parameters specified gtd valid modified cmd Snapshot of pre state adding a Figure 34 valid MODIFIED event Figure 35 gtd invalid modified Snapshot of pre state adding an Figure 36 paramnames cmd invalid MODIFIED event due to mismatch on parameter names 6 4 4 Modeling a POSITIVE TRIGGER event Figure 25 below shows an object diagram of a pre state when adding a valid SPOSITIVE TRIGGER event 73 BO Object diagram 1 id g0 SpecEventParams e1 SpecificationEvent id se1 declaredGoallD g1 SpecHvents
92. ative triggers 3 A goal diagram with more than one positive or negative trigger emanating from the same goal to a non adjacent goal Required Event None Scripts Procedure 1 Start the GMoDS Test Driver and visually examine the displayed instance tree Expected Results 1 Norequirement from the Vision Document is violated For Each Required Goal Diagram 10 2 1 3 Test Case TC GV 3 Zooming Table 56 Test Case TC GV 3 Zooming Use Cases Tested GV 1 Display Specification Tree GV 2 Display Instance Tree Features Tested TF GV 1 14 TF GV 2 9 Goal Diagrams 1 Any goal diagram Required Event Scripts 1 A compatible event script Procedure Start the GMoDS Test Driver File Load Event Script and select the compatible script Click Play and allow the script to end Zoom in on the specification tree Zoom out on the specification tree Zoom in on the instance tree Zoom out on the instance tree Expected Results SOY tA Gd pO pO c When zooming in the affected tree gets proportionally larger in its pane and if large enough causes scroll bars to appear When zooming out the affected tree gets proportionally smaller and if small enough scroll bars disappear if previously present n 8 10 2 1 4 Test Case TC GV 4 Show Hide Instance Goals of Specific Types Table 57 Test Case TC GV 4 Show Hide Instance Goals of Specific Types Use Cases Tested
93. ause GMoDS to populate its specification goal tree 1 3 1 1 2 7 SR GTD 1 4 Critical Requirement The GMoDS Test Driver shall cause GMoDS to initialize its instance goal tree 1 3 1 1 2 8 SR GTD 1 5 Critical Requirement The GMoDS Test Driver shall issue each goal event defined in the event script to GMoDS after the specified delay time milliseconds relative to the previously issued goal event 11 1 3 1 1 2 9 SR GTD 1 6 Critical Requirement Upon initialization of the GMoDS Test Driver in this use case the GMoDS Test Driver shall enter manual mode and await user interaction 1 3 1 1 2 10 SR GTD 1 6 1 Critical Requirement If the user clicks Play in manual mode the GMoDS Test Driver enters automatic mode and begins to execute each event as defined in 1 3 1 1 2 8 above If GMoDS Test Driver is in random event operation GMoDS Test Driver automatically generates a new random event and executes it after the random delay time until the specified number of random events has been issued 1 3 1 1 2 11 SR GTD 1 6 2 Critical Requirement If the user clicks Next in manual mode the GMoDS Test Driver issues the next unexecuted goal event and waits for the next user interaction If GMoDS Test Driver is in random event operation and manual mode the GMoDS Test Driver generates the next random event appends it to the currently executing script issues the event to GMoDS and waits for the next user interaction 1 3 1 1 2 12 SR
94. c Structure Figure 49 below shows the architecture of the GMoDS Visualizer view package described in detail in 4 4 5 The EditPreferenceUI has been added as a new view not shown in the component class diagrams focused on the specification and instance tree views below 1 gmodsVisualizerUl EditPreferenc esl i GMoDS VisualizerUl AbstractUl tame JFrame specTreeUl AbstractUI LinstTreeU AbstractUI finitialized boolean D createUI void emakeController AbstractPart rupdate o Observable arg Object void eregisternWithModel void Instanc eGoalU SpecificationTreeUl p intializeo void A xK SpecificationG oalUI M6RelationsTo 1 AbstractRelation UI F dest sre 0 1 relation RelationsF rom ContainerFor Flashes InstanceTreeUl treeUl Y RelationRegister V ContainerFor 1 canvas 1 canvas 1 canvas 1 fashDaemon SpecificationTreeCanvas Instanc eTreeCanvas FlashD aemon goalUlRegistry SpecificationGoalUIRegistry LindirectRelationRe gistry IndirectRelationUIRegistry LinstTreeUI InstanceTreeUl goalUlRegistry InstanceGoalU IRegistry work Queue Queue lt InstanceGoalUI gt null fashers Set InstanceGoalUI newHashSet InstanceGoalUl l drawRelations void register elations void lrcreateGoalUIs void
95. cel Figure 110 Edit Preferences Random Events 170 10 3 4 Event Script Format samt CS ELT The top level event script 1 D element A goal model event Figure 111 GMoDS Test Driver Event Script XML Schema E attributes One of ACHIEVED FAILED POSITIVE_TRIGGER or NEGATIVE TRIGGER The unique identifier of the specification goal whose instance goal is achieved Failed or from which the positive or negative thgger emanates The unique identifier of a particular instance of the specification goal The user defined name of the event if type is POSITIVE TRIGGER or NEGATIVE TRIGGER E attributes The parameter name The parameter value NOTE All parameters are treated as if their data type is a java String An event parameter Figure 111 above shows the XML Schema defining legal XML format for event script files The GMoDS Test Driver does not validate event scripts using this schema so it is the user s responsibility to follow these formats The XML parser will notify the user of badly formed XML by throwing an exception halting the load of the script and requiring a restart of the GMoDS Test Driver Figure 112 below shows as a sample legal event script for the goal model VisionDocument2 goal using all event types 171 E 5 2 lt Script gt delay 3000 gt lt Event gt IoOuws delay 3000 gt 0 lt Event gt 13 lt Event gt 20 lt S
96. cript gt ail Figure 112 Sample Event Script 10 3 5 Log Messages 1 lt xml version 1 0 encoding UTF 8 gt 3 Event type POSITIVE TRIGGER Event type POSITIVE TRIGGER specGoal g4 instGoal 1 name el lt Parameter name x value 6 gt specGoal g4 instGoal 1 name el 9 Parameter name x value 9 gt 11 Event type MODIFIED specGoal g5 instGoal 1 delay 2100 gt 12 Parameter name x value 3 gt 14 Event type ACHIEVED specGoal g6 instGoal 1 delay 3000 5 Event type NEGATIVE TRIGGER specGoal g4 instGoal 1 name e2 16 delay 3000 gt 17 lt Parameter name x value 9 gt 18 lt Event gt 19 Event type FAILED specGoal g2 instGoal 1 delay 3000 gt Table 66 Log Messages Message Meaning addEvent addEvent A legal event was added to the current event script addEvent Exception An invalid event with respect to the SpecificationTree in GMoDS was not added to the current event script issueTOGMoDS event A legal event was issued to GMoDS issueToGMoDS modifyInstanceGoal A legal MODIFIED event was issued to GMoDS next Exception The next command found an invalid event with respect to the current InstanceTree in GMoDS 10 3 6 Error Messages Table 67 Error Messages Message Meaning s improper specification event id 96s The GMoDS Test Driver did not assign the correct internal specification ev
97. ctional Requirements 1 3 2 4 2 1 SR GV 4 1 Non critical Requirement The system shall show or hide all specification goal and event parameters as specified by the user 1 3 2 4 2 2 SR GV 1 8 See 1 3 2 1 2 8 above 1 3 2 4 3 3 SR GV 1 9 See 1 3 2 1 2 9 above 1 3 2 5 Use Case GV 5 Change Instance Tree View 1 3 2 5 1 Description The user changes the display of parameters their values and the values origin throughout the instance goal tree by selecting hide or show parameters from a menu bar menu item All instance goal parameters are hidden or shown as specified by the user The system minimizes the display area consumed by the tree at all times The system reduces the size of elements that include parameters when the parameters are hidden and expands the elements when parameters are shown See Figure 10 below and compare with Figure 8 above 24 Legend C Triggered Active Achieved E Failed B Removed E obviated Figure 10 Use Case GV 5 1 3 2 5 2 Associated Functional Requirements 1 3 2 5 2 1 SR GV 5 1 Non critical Requirement The system shall show or hide all instance goal parameters as specified by the user 1 3 2 5 2 SR GV 2 6 See 1 3 2 2 2 6 above 1 3 2 523 SR GV 2 7 See 1 3 2 2 2 7 above 1 3 2 6 Use Case GV 6 Change Instance Goal View 1 3 2 6 1 Description The user toggles the display of parameters their values and the values origin for a specific instance goal The user clicks the
98. d with the number of random goal events to issue The system will default to 25 random goal events to issue 8 4 1 5 TF GTD 2 2 SR GTD 2 2 the GMoDS Test Driver shall incrementally issue random goal events based on the current active instance goals 8 4 1 6 TF GTD 2 3 SR GTD 2 3 the GMoDS Test Driver shall keep a history of randomly generated goal events to form the current event script being executed 8 4 1 7 TF GTD 3 1 SR GTD 3 1 the GMoDS Test Driver shall provide a Save Script menu item that will cause the GMoDS Test Driver to save the currently executing goal event script to a file 133 8 4 1 8 TF GTD 3 2 SR GTD 3 2 the GMoDS Visualizer on behalf of the GMoDS Test Driver shall allow the user to specify the file to contain the saved script 8 4 1 8 1 TF GTD 3 2 1 SR GTD 3 2 1 if the user selects a file that exists the GMoDS Visualizer on behalf of the GMoDS Test driver shall ask for confirmation that it should overwrite that file 8 4 1 8 2 TF GTD 3 2 2 SR GTD 3 2 2 if the user selects a file name that does not exist or confirms the overwrite operation the GMoDS Test Driver shall save the current goal event script to the file 8 4 2 GMOoDS Visualizer 8 4 2 1 TF GV 1 1 SR GV 1 1 the system shall display the specification goal tree as a graphical tree using minimum white space padding between adjacent tree elements etc 8 4 2 2 TF GV 1 2 SR GV 1 2 the system shall display the string
99. determined period 1 3 2 3 2 Associated Functional Requirements 1 3 2 3 2 1 SR GV 3 1 Critical Requirement The system shall flash all instance goals for which it has received a change for a pre defined period 1 3 2 3 2 2 SR GV 3 2 Non critical Requirement The default flashing period shall be 2 seconds The default flashing cycle shall be 0 5 second Both the flashing period and flashing cycle shall be editable in manual mode 1 3 2 3 2 3 SR GV 3 3 Critical Requirement The system shall flash an instance goal by changing its background and foreground from its state color to its defined flash color and back once every flashing cycle The user may avoid the flashing effect by making the state and flash background and foreground colors match 1 3 2 4 Use Case GV 4 Change Specification Tree View 1 3 2 4 1 Description The user changes the display of parameters throughout the specification goal tree by selecting hide or show parameters from a menu bar menu item All specification goal and event parameters are hidden or shown as specified by the user The system minimizes the display area consumed by the tree at all times The system reduces the size of elements that include parameters when the parameters are hidden and expands the elements when parameters are shown See Figure 9 below and compare with Figure 7 above 23 lt lt and gt gt lt lt precedes gt gt g Figure 9 Use Case GV 4 1 3 2 4 2 Associated Fun
100. drawing are reset to their default values Next the canvas is triggered to determine the total size of its image Finally the tree and the directly routed and indirectly routed relations are drawn Figure 58 below shows the SpecificationTreeCanvas determineSize method self SpedficationTreeC anvas rootUl SpecificationGoalUl UlConstants GoalUlRegistry IndiredRelationRe gistry T rootUl getRootUI WM determineMinTreeSize graphics2D T determineTreeRelationOffsets graphics2D T 4 yy treeSize determineFinalTreeSize relationSize calculateRequiredSize treeSizt width pad getRelation VerticalO ffset i i create treeSize width treeSize height relatipnSize height pad totalSize SSS Se E Figure 58 SpecificationTreeCanvas determineSize self InstanceTreeUl PE super initialize initialize Instance TreeC anvas initialize startT hread Figure 59 InstanceTreeUL initialize Figure 59 above shows the InstanceTreeUl initialize method Figure 60 below shows the InstanceTreeCanvas initialize method 113 self InstanceTreeC anvas m create GoalUls Instance TreeC anvas createG oalUls GMoDSModel rootGoal getRootlnstanceGoal a create GoalUl rootG oal 0 orderGoals initializeG oals Instance TreeC anvas asses
101. e 13 1 3 1 2 2 1 1 SR GTD 2 1 1 Non critical Requirement The GMoDS Test Driver shall treat all parameter types as if they were String That is the system shall make no attempt to generate a value of the type specified for the parameter in the goal diagram Instead the type of the java object will be String for all parameter values The system will generate a random String for each parameter value 1 3 1 2 2 1 2 SR GTD 2 1 2 Non critical Requirement The GMoDS Test Driver may be configured with the minimum and maximum string lengths for randomly generated strings The system shall default to a minimum string length of 1 and a maximum string length of 10 1 3 1 2 2 1 3 SR GTD 2 1 3 Non critical Requirement The GMoDS Test Driver may be configured with the minimum and maximum delay time in milliseconds between randomly issued goal events The system shall default to a minimum delay time and maximum delay time defined relative to the default Flash Period from Table 2 on page 17 The minimum delay time shall default to the default Flash Period plus 1000 milliseconds The maximum delay time shall default to twice the default Flash Period The system shall not accept a minimum delay time of less than the current Flash Period plus 100 milliseconds 1 3 1 2 2 1 4 SR GTD 2 1 4 Non critical Requirement The GMoDS Test Driver may be configured with the number of random goal events to issue The system will de
102. e appearance of the specification goal tree or instance goal tree as a whole change the appearance of a specific instance goal or collapse expand a sub tree of instance goals Table 2 below shows the GMoDS Visualizer options 16 Table 2 GMoDS Visutalizer Options Option Definition Default Modified Flash Period Total time a changed instance goal is 2 seconds In manual mode flashed Flash Cycle Time between instance goal color 0 5 seconds In manual mode inversions in a single flash Specification Tree Show or hide parameter names and Show At run time Show Hide Parameters types throughout the specification goal tree Instance Tree Show or hide parameter names values Show At run time Show Hide Parameters and origin throughout the entire instance goal tree Show Hide Instance Show or hide particular specification Show At run time Goals of Particular goals derived instance goals a check Specification Goals list of goal types to show is presented to the user Triggered Goal A triggered goal s background color L At run time Background Triggered Goal A triggered goal s foreground color m At run time Foreground Triggered Goal Flash A triggered goal s background color L At run time Background during a flash Triggered Goal Flash A triggered goal s foreground color L At run time Foreground during a flash Active Goal An active goal s background color
103. e child instance goal 1 3 2 2 2 6 SR GV 2 6 Non critical Requirement The system shall separate instance goal names from parameters using a horizontal line if parameters are displayed If parameters are not displayed no such horizontal line shall be shown 1 3 2 2 2 7 SR GV 2 7 Non critical Requirement The system shall show each instance goal parameter parameter value and parameter value origin combination on a single line separated by a space a semi colon and another space One 21 line will be used for each combination of instance goal parameter parameter value and parameters value origin 1 3 2 2 2 8 SR GV 2 8 Non critical Requirement The system shall abbreviate the parameter value origin values as I inherited T trigger and M modification 1 3 2 2 2 9 SR GV 2 9 Critical Requirement The system shall provide scrolling and zooming of the instance goal tree view 1 3 2 2 2 10 SR GV 2 10 Non critical Requirement The system shall allow the user to specify that instance goals of particular specification goals be shown or hidden 1 3 2 2 2 11 SR GV 1 11 See 1 3 2 1 2 11 above 22 1 3 2 2 2 12 SR GV 1 13 See 1 3 2 1 2 13 above 1 3 2 3 Use Case GV 3 Update Instance Tree 1 3 2 3 1 Description The system receives notification from GMoDS that some aspect of the instance tree has changed The system modifies the display to reflect the changed information and flashes the affected instance goals for a pre
104. e executable prototype will demonstrate the architecture for the critical requirements established in the GMoDS Test Driver use cases GTD 1 Issue Scripted Goal Events and GTD 2 Issue Random Goal Events and the GMoDS Visualizer use cases GV 1 Display Specification Tree GV 2 Display Instance Tree and GV 3 Update Instance Tree The 29 demonstration and presentation to the supervisory committee will expose the top technical risks in the project 2 4 Implementation Plan 2 4 1 Deliverables The following deliverables will be provided in the production phase per course requirements 6 2 4 1 1 Action Items Action items identified during Presentation 2 will be resolved and documented 2 4 1 2 User Manual A user manual will be provided Sections will include an overview and explanations of common usage user commands error messages and data formats 2 4 1 3 Component Design The internal design of the components will be documented consistent with their complexity using class sequence and state chart diagrams 2 4 1 4 Source Code Well documented source code will be submitted consistent with the architectural and component designs 2 4 1 5 Assessment Evaluation A test evaluation document will include descriptions of the testing failures and reliability estimates The document will include graphical depiction of software quality metrics 2 4 1 6 Project Evaluation A project review document will review both th
105. e in Manual Mode moves the Test Driver to Automatic Mode if there is a next event possible Clicking pause while in Automatic Mode moves the Test Driver to Manual Mode if there is a next event possible In either Manual or Automatic Mode if there is not an event possible the Test Driver is finished 7 2 2 GMoDS Visualizer Component Design The GMoDS Visualizer uses the Model View Controller architecture This section shows the detailed component design in separate sections for the model view and controller portions of the architecture 7 2 2 1 GMoDS Visualizer Model Static Structure Figure 45 below shows the model portion of the GMoDS Visualizer architecture to show how GMoDS is referenced Figure 46 below shows the detailed component classes of the model 89 addObserver o Observer void isA ncestorPrece dedSpec fication Goal identiier Uniqueldentifier boolean isA ncestorPosttive TriggeredSpecification Goa entifier Uniquelde ntfier boolean isA ncestorNegative TrggeredSpecificatio n Goal identifier Uniqueidentiier boolean isCrossTreeLink identifier1 Uniquelde ntfier klentifier2 Uniquelde ntfier boolean haveSameParents identifier1 Uniqueldentiier dentifier2 Uniqueldentitier boolean a ssessState identifier Unique identifier GoalState inkialize Visibility void isV isible spec GoallD Uniqueldentifier boolean makeV isible spec GoallD Uniqueldentifier void
106. e process and product The process review will cover methodologies cost estimation accuracies and usefulness of technical reviews The product review will address whether the system requirements have been achieved and evaluate the quality of the product 2 4 1 7 References The annotated bibliography will include cited references for all notations used in the portfolio 2 4 1 8 Formal Technical Inspection Letters Fellow MSE students Kyle Hill and Shylaja Chippa will provide letters including their formal technical inspection checklist evaluations of this project and stating that the student in question successfully participated in their MSE project as an inspector and that their projects or at least their formal technical inspection section have successfully passed the architecture presentation 30 2 5 Work Breakdown Structure Deliverable Task Completion Criteria Time Frame Time Source code Draw relations between non adjacent specification goals Executable code 9 14 Feb 4 days Implement parameter origin value M Modification Executable code 15 17 Feb 3 days Revise event error checking Executable code 18 Feb 0 5 day Log event script errors Executable code 18 Feb 0 5 day Visually notify user of event script errors Executable code 22 Feb 1 day Confirm overwrite during save event script Executable code 23 Feb 0 2
107. ed agent component but not both send goal events to GMoDS GMoDS provides the possible goal events to the GMoDS Test Driver GMoDS pushes instance tree changes to the GMoDS Visualizer using a variant of the Observer design pattern called ChangeManager GMoDS already implements the client portion of this design pattern The GMoDS component provides the specification goal tree and initial instance goal tree to the GMoDS Visualizer The GMoDS Visualizer uses the specification goal tree and instance goal tree as part of the model for its Model View Controller architecture The GMoDs Visualizer will display the specification goal tree and initial instance tree and await changes from GMoDS The GMoDS Visualizer will not import any layout information from the goal diagram since GMoDS goal models can be programmatically built rather than through parsing a goal diagram GMoDS Test Driver relies on GMoDS to define the possible goal events in order to issue random goal events In addition the GMoDS Test Driver can check user provided event scripts for legality using GMoDS interfaces GMoDS parses the goal model diagram if the specification tree is not programmatically built 1 3 Project Requirements 1 3 1 GMoDS Test Driver GMoDS Test Driver System Issue Scripted Goal Events lt lt Include gt gt User GMoDS Issue Random Goal E vents Save Goal E vent Script Figure 4 GMoDS Test Driver Use Cases Figure 4 above shows use cases for the G
108. ed cmd gmods gtd invalid modified cmd InstParams gnods gtd invalid modified cmd gt insert 9g31P g3ipi gt into InstParams gmods gtd invalid modified cmd use topenter si addEvent lt gel gt precondition NotInScript is true precondition ValidType is true ModifiedReqParam is false UalidSpecGoal is true UValidfchievedEvent is true UalidFailedEvent is true precondition ValidSpecEvent is true TELDA Figure 33 Invalid MODIFIED event with no parameters Figure 33 above shows that invoking the addEvent violates the ModifiedReqParam pre condition for the above snapshot 79 x SpecificationParameter q3 ParameterizedSpecificationGoal id g3 k SpecEventParams isLeaf true idz e1 declaredGoallD g1 SpecBvents spTree SpecificationTreelmp ge1 GoalEventlmpl Spec rees type MODIFIED specEventID MODIFIED specGoallD g3 ptimp GMoDSTree instGoallD 1 UM meum implGoalTreelmpl InstTrees ge1P GoalEventParameter inatTree In Treelmpl InstGoa a ga InstGoals g 1 InstanceGoallmpl qf 4 InstanceGoalimp a21 InstanceGoallmpl g31InstanceGoallmpl instID 1 instID 1 instID 1 instID 1 speciD g0 speciD g1 speciD g2 speclD g3 state amp ACTIVE state t ACTIVE State t ACTIVE state ACTIVE instGoa Params InstGoalParams nstGoalParams InstGoa lParams q01P InstanceParameters q11P InstanceParameters q21P Insta
109. een ParameterizedSpecificationGoal ParameterizedSpecificationGoal end cificationGoal has 0 or 1 parents 0 1 role parent 0 role child 64 SpecEventParams a SpecificationEvent has 0 or more SpecificationParameters association SpecEventParams between SpecificationEvent 0 1 role event SpecificationParameter 0 role param end SpecGoalParams a ParameterizedSpecificationGoal has 0 or more SpecificationParameters association SpecGoalParams between ParameterizedSpecificationGoal 0 1 role goal SpecificationParameter 0 role param end InstTrees a GoalTreeImpl has InstanceTreeImpl association InstTrees between GoalTreeImpl 1 role goalTree InstanceTreeImpl 1 role instTree end InstGoals an InstanceTreeImpl has 1 or more InstanceGoaliImpl association InstGoals between InstanceTreeImpl 1 role tree InstanceGoalImpl 1 role goal end InstGoalParams an InstanceGoalImpl has 1 InstanceParameters association InstGoalParams between InstanceGoalImpl 1 role goal InstanceParameters 1 role paramCollctn end InstParams an InstanceParameters has 0 or more InstanceParamter objects association InstParams between InstanceParameters 1 role collec InstanceParameter 0 role param end QQNUS P RA N ES constraints
110. eference su AP PLY EditPreferencesP art Apply actionCm d equals E ditPreference sUI CANCEL EditPreferencesP art Cancel actionC m d equals EditPreference sUI COLOR OK M EditPreferencesP art ColorOK actionC m d equals EditPrefencesUl C OLOR CANCEL EditPreferencesP art ColorC ancel Figure 80 EditPreferencesPart actionPerformed e ActionEvent A Figure 80 above shows the EditPrefencesPart actionPerformed method Figure 81 below shows the EditPreferencesPart responding to the OK button on the main dialog presented by its UI The methods applyRandomEvents and applyStates enforce the business rules for user input regarding the values of the flash and random event parameters They will return true only if the business rules are satisfied and inform the user of the violation otherwise Figure 82 below shows the EditPreferencesPart responding to the Apply button on the main dialog presented by its UI Figure 83 below shows the EditPreferencesPart responding to the Cancel button on the main dialog presented by its UI 126 self EditP refe ePart view E ditPreferencesUl dialog JDialog gmodsVisualizerUI GMoDSVisualizerUI renc Li randomE vts applyRandomE vents view O O a states applyStates view i O dispose statesT abS elected isStatesTabSelected statesT abS elected states ap
111. ength int void length for a random Post Record the maximum string length for a random parameter value parameter value Query the minimum delay Syntax getMinDelayTime int time for a random event Post Result the minimum delay time for a random event Set the minimum delay time Syntax setMinDelayTime minDelayTime int void for a random event Post Record the minimum delay time for a random event Query the maximum delay Syntax getMaxDelayTime int time for a random event Post Result the maximum delay time for a random event Set the maximum delay time Syntax setMaxDelayTime maxDelayTime int void for a random event Post Record the maximum delay time for a random event Query the maximum number Syntax getNumEvents int of random events Post Result 2 the maximum number of random events Set the maximum number of Syntax setNumEvents numEvents int void random events Post Record the maximum number of random events Table 34 FlashParameters Interface Specification Query the total number of times an InstanceGoalUI should flash Syntax getTotalFlashCount int Post Result the total number of times an InstanceGoalUI should flash 93 Query the number of milliseconds in a cycle of flash and normal display Query the total number of milliseconds of flashing desired Update the f
112. ent Pre none a flash and decrement the Post The color for this InstanceGoalUI is inverted and remaining flash count when the remaining flash count is decremented when the the inversion has cycled back inversion has cycled back to normal to normal Result false if remaining flash count lt 0 true otherwise Query whether this Syntax hasParameters boolean InstanceGoalUI has Pre none parameters Post Result true if this InstanceGoalUI has parameters false otherwise Initialize the InstanceGoalUI Syntax initialize void and recreate the labels Pre none Post The InstanceGoalUI is initialized and the labels are recreated Reset the flash count to the Syntax resetFlashCount void current total required by Pr none FlashParameters Post The remaining flash count is reset to the current total required by FlashParameters Record whether this Syntax setShowParameters showParameters boolean InstanceGoalUI should show void its parameters Pre none Post Recorded whether this InstanceGoalUI should show its parameters 107 Toggle whether this InstanceGoalUI should show its parameters Toggle whether this InstanceGoalUI should show its children Table 46 InstanceGoalUIRegistry Record an InstanceGoalUI Access an InstanceGoalUI Access the root InstanceGoalUI Access all InstanceGoalUIs
113. ent id to an ACHIEVED or FAILED event s specification goal s not defined The event s specGoal attribute does not reference a legal specification goal s specification goal 96s is not a leaf goal The event s specGoal attribute does not reference a leaf goal for an ACHIEVED or FAILED event type 172 Message Meaning s specification event s not defined for specification goal 96s The specification event referenced by the name attribute is not defined for the specification goal referenced by the specGoal attribute 96s parameter names 46s do not match those specified 96s for specification goal 96s The MODIFIED goal events Parameter name attribute does not match any specified for the specification goal referenced by specGoal 96s parameter names 46s do not match those specified 96s for specification event s for specification goal 96s A POSITIVE TRIGGER or NEGATIVE TRIGGER goal events Parameter name attribute does not match any specified for that trigger in the specification tree for specGoal s specification event 96s not a negative trigger defined for specification goal 96s A NEGATIVE TRIGGER goal event s name attribute does not refer to a negative trigger in the specification tree for specGoal s specification event 96s not a positive trigger defined for specification goal 96s A POSITIVE T
114. eparated by a comma The final parameter shall be followed by the closing parenthesis and no comma 8 4 2 11 TF GV 1 11 SR GV 1 11 parent child relation lines shall not intersect with each other 8 4 2 12 TF GV 1 12 SR GV 1 12 the system shall minimize the number of intersections between precedes positive trigger negative trigger and parent child relation lines 8 4 2 13 TF GV 1 13 SR GV 1 13 the system shall not allow any lines to intersect goal rectangles 8 4 2 14 TF GV 1 14 SR GV 1 14 the system shall provide scrolling and zooming of the specification goal tree view 8 4 2 15 TF GV 2 1 SR GV 2 1 the system shall display the instance goal tree as a graphical tree using minimum white space padding between adjacent tree elements etc 8 4 2 16 TF GV 22 SR GV 2 2 the system shall display the instance goal name for each instance goal 8 4 2 17 TF GV 2 3 SR GV 2 3 the system shall display a collapse expand toggle rectangle if the instance goal has children centered on the lower edge of the instance goal An instance goal displaying its children will display the character in the collapse expand toggle An instance goal hiding its children will display in the collapse expand toggle 8 4 2 18 TF GV 2 4 SR GV 2 4 the system shall display a show hide parameter toggle rectangle if the instance goal has parameters centered on the left edge of the instance goal An instance goal showing its 13
115. er Interface Specifications Query the inherited property of a specific parameter Query the modified property of a specific parameter Set the value of a specific parameter Get the value of a specific parameter Syntax isInherited boolean Post Result true if the specified parameter s value is inherited Syntax isModified boolean Post Result true if the specified parameter s value has changed Syntax setValue value Object boolean Pre value null Post Result true if the specified parameter s value has changed Syntax getValue Object Post Result the value of the parameter Table 33 RandomEventParameters Interface Specification Query the minimum string length for a random parameter value Syntax getMinStringLength int Post Result the minimum string length for a parameter value 92 Set the minimum string Syntax setMinStringLength minStringLength int void length for a random Post Record the minimum string length for a random parameter value parameter value Query the maximum string Syntax getMaxStringLength int length for a random Post Result the maximum string length for a parameter value parameter value Set the maximum string Syntax setMaxStringLength maxStringL
116. fault to 25 random goal events to issue 1 3 1 2 2 2 SR GTD 1 3 See 1 3 1 1 2 6 above 1 3 1 2 2 3 SR GTD 1 4 See 1 3 1 1 2 7 above 14 1 3 1 2 2 4 SR GTD 2 2 Critical Requirement The GMoDS Test Driver shall incrementally issue random goal events based on the current active instance goals The union of all positive and negative trigger ACHIEVED FAILED and MODIFIED events defined by all active instance goals and their corresponding specification goals defines the possible random events at any time 1 3 1 2 2 5 SR GTD 2 3 Critical Requirement The GMoDS Test Driver shall keep a history of randomly generated goal events to form the current event script being executed 1 3 1 3 Use Case GTD 3 Save Goal Event Script 1 3 1 3 1 Description The user selects Save Script and is prompted for a file in which to save the current goal event script If the user selects a file that exists the GMoDS Test driver asks for confirmation that it should overwrite that file If the user selects a file name that does not exist or confirms the overwrite operation the GMoDS Test Driver saves the current goal event script to the file 1 3 1 3 2 Associated Functional Requirements 1 3 1 3 2 1 SR GTD 3 1 Non critical Requirement The GMoDS Test Driver shall provide a Save Script menu item that will cause the GMoDS Test Driver to save the currently executing goal event script to a file 1 3 1 3 2 2 SR GTD 3 2 Non critical Requirement T
117. g records that every valid event is created successfully Debug log records an error for every invalid event and a popup window notifies the user of the same errors Sieh 8 10 1 2 2 Test Case TC GTD 2 Event Script Operation Table 51 Test Case TC GTD 2 Event Script Operation Use Cases Tested GTD 1 Issue Scripted Events GV 3 Update Instance Tree Features Tested TF GTD 1 5 TF GTD 1 6 TF GTD 1 6 1 TF GTD 1 6 2 TF GTD 1 6 3 TF GTD 1 6 4 TF GV 3 1 TF GV 3 2 TF GV 3 3 Goal Diagrams A goal diagram compatible with the event scripts Required Event Scripts repeat procedure for each script listed here 1 Anevent script file that lists a valid event of every type 2 Anevent script file with events that are invalid with respect to the instance tree fault instance goal does not exist 3 Anevent script file with events that are invalid with respect to the instance tree fault instance goal not active for event type not MODIFIED 140 4 Anevent script file with events that are invalid with respect to the instance tree fault negative trigger with a parameter value not matching any instance goal parameter values Procedure 1 Click File Load Event Script on visualizer menu bar 2 Navigate to and select the desired event script file 3 Click OK 4 Click Play 5 Click Pause 6 Click Next 7 Click Play 8 Let script finish 9 Repeatthis test
118. g that configuration 139 8 10 1 2 1 Test Case TC GTD 1 Load Event Script Table 50 Test Case TC GTD 1 Load Event Script Use Cases Tested GTD 1 Issue Scripted Events Features Tested TF GTD 1 1 TF GTD 1 2 TF GTD 1 2 1 TF GTD 1 2 2 TF GTD 1 2 3 Goal Diagrams A goal diagram compatible with the event scripts Required Event 1 Anevent script file that lists a valid event of every type Scripts 2 An event script file with events that are invalid with respect to the specification repeat procedure for each script listed here tree fault goal name 3 Anevent script file with events that are invalid with respect to the specification tree fault parameter name 4 Anevent script file with events that are invalid with respect to the specification tree fault positive trigger with missing parameter 5 Anevent script file with events that are invalid with respect to the specification tree fault positive trigger with extra parameter 6 Anevent script file with events that are invalid with respect to the specification tree fault modify event with missing parameter 7 Anevent script file with events that are invalid with respect to the specification tree fault modify event with extra parameter Procedure Click File Load Event Script on visualizer menu bar Navigate to and select the desired event script file Click OK Expected Results For Each Required Event Script Debug lo
119. goalmodels VisionDocument2 goal Working directory Default Other Figure 107 GMoDS Test Driver Arguments 10 3 3 Common Commands 168 GMoDS Visualizer File Edit View ei CERAIS E b Play H Pause Next Save Event Script Exit Specification Goals Instance Goals Zoom G ResetZoom Zoom Zoom Reset Zoom zoom lt lt and gt gt Figure 108 Load Event Script Figure 108 above shows that the GMoDS Test Driver allows one to load or save an event script Figure 109 below shows that one can issue random events replacing any previously loaded event script play an event script in automated mode pause an event script and enter manual mode or issue the next event manually Figure 110 below shows that one can Edit Preferences Random Events to control the behavior of the GMoDS Test Driver when issuing random events 169 E GMoDs Visualizer File Edit View Specification Goals i Instance Goals Zoom Reset Zoom Zoom i Zoom Reset Zoom Zoom lt lt precedes gt gt Figure 109 Test Driver controls F3 Edit Preferences Hx States Random Events Number of Events 5 Min Delay Time ms Max Delay Time ms Min String Length 1 Max String Length 10 ok apply can
120. guide Approved by 5 6 Apr 1 5 day Major Professor User guide Approved by 6 7 Apr 1 5 day Major Professor References All references Approved by 8 Apr 0 5 day documented Major Professor Formal Technical Send and receive Approved by 8 Apr 0 5 day Inspection Letters letters from formal Major Professor inspectors Project Evaluation Evaluate process Approved by 11 13 Apr 3 days and product Major Professor Compile all Approved by 14 Apr 1 day project artifacts Major Professor into an overall portfolio document 2 6 Cost Estimate The project is at the end of the Elaboration Phase phase 2 Table 3 below lists the productivity for source code and documentation development in phases 1 and 2 of this project Table 3 Productivity in Phases 1 and 2 Activity Type Project Time hours Quantity Productivity Source Code 85 7 5000 SLOC 58 4 SLOC Hr Documentation 68 5 11 Documents 0 16 Doc Hr Reading Research Misc 24 5 178 7 I have completed about 51 of 72 71 96 functional requirements by the end of phase 2 32 I estimate that the total SLOC required for the project near 7000 5000 0 71 7059 So approximately 2000 SLOC remain to be written I estimate about 36 hours of source code development using the productivity factor of 58 4 SLOC Hr 2059 58 4 35 3 hours Assuming work of 2 hours day this translates to approximately 18 days I estimate that developing unit tests should ta
121. he GMoDS Test Driver shall allow the user to specify the file to contain the saved script 1 3 1 3 2 3 SR GTD 3 2 1 Non critical Requirement If the user selects a file that exists the GMoDS Test driver shall ask for confirmation that it should overwrite that file 1 3 1 3 2 4 SR GTD 3 2 2 Non critical Requirement If the user selects a file name that does not exist or confirms the overwrite operation the GMoDS Test Driver shall save the current goal event script to the file 15 1 3 2 GMoDS Visualizer GMoDS Visualizer System Display Specification Tree Display Instance Tree GMoDS Update Instance Tree Change Specification Tree View User Change Instance Tree View Change Instance Goal View Change Instance Sub4ree View Figure 6 GMoDS Visualizer Use Cases Figure 6 above shows use cases for the GMoDS Visualizer The client component simulated agent component or GMoDS Test Driver instantiates the GMoDS component populates the specification tree and initializes the instance goal tree The client component then constructs the GMoDS Visualizer passing in a reference to the GMoDS component The GMoDS Visualizer registers itself with GMoDS EventRegistry as the ChangeManager The GMoDS Visualizer displays the specification goal tree pulled from the GMoDS component The GMoDS Visualizer displays the initial instance goal tree provided by GMoDS and changes to the instance goal tree pushed to it by GMoDS The User can alter th
122. he next event can be created randomly if the nextEvent data member has been set to null by nextEventIssued 85 self E ventScriptImpl pE nextE vent getNextE vent nextE vent null incrementIndex checkInstanceTreealidity gmods issueToGMoDS gm ods nextE ventl ssued setC hanged notifyObservers nextE vent GoalE ventl mpl Figure 41 RandomEventScriptImpl getNextEvent 86 sei Randome ventScriptimpl mods GoalTree goal Instance Goal cinstanceP arameters gt GMoDSUtis T possible ListeAbstradE vent Generator active getAdi winstanceGosis Seidinstace Goal nstanc e gosi getSpeatication dertiier isLeaf isLeafSpecifcationGoal s T AEREOS E Eggs EEPE TE L osan U 1 spec sts getSpecifcationEverts a i ie 1 next spect vt in specEvts i posTriggered getPostiveTriggeredSpecificationG cals s speck vt on 1 isEmpty isEmpty isEmpty i n ee visi c gon 4 1 1 i i 1 4 1 1 1 1 i 1 1 i 1 Tac ees 7 Random Evertimpt createRandomEvert GoslEvent P art 2 Figure 42 above shows the first half of the process of creating a random GoalEvent Every active leaf instance
123. he size required Syntax calculateRequiredSize width int Dimension for indirectly routed relations Pre none below the specification tree Post Result the size required for indirectly routed relations below the specification tree Reset indirectly routed Syntax reset void AbstractRelationUIs data Pre none structures that support Post All indirectly routed AbstractRelationUIs data drawing structures that support drawing are reset to their default values Table 43 InstanceTreeUI Draw the instance tree on the Syntax draw void canvas Pre none Post The instance tree is drawn on the canvas Record whether all Syntax showAllParameters showParameters boolean parameters should be shown void in the instance tree Pre none Post Recorded whether all parameters should be shown in the instance tree Table 44 InstanceTreeCanvas Interfac e Specifications Assess the GoalState of all InstanceGoalUIs Syntax assessGoals void Pre none Post The GoalState of each InstanceGoalUI is recorded 104 Create an InstanceGoalUI Syntax createGoalUl goal InstanceGoal lt InstanceParameters gt depth int void Pre goal null Post An InstanceGoalUI is created for goal and is recorded in the InstanceGoalUlIRegistry Create all InstanceGoalUIs if Syntax createGoalUIs
124. hers wait until notified that a flasher has been added Body If there are flashers flash each flasher and redraw the InstanceTreeUI Body Remove all flashers whose flash method returns false Post None The thread never exits until the system exits 4 4 8 GMoDS Visualizer View Design Rationale I selected the MVC design pattern to allow for maximum flexibility in designing views of the core GMoDS objects 55 4 4 9 GMoDS Visualizer Controller Decomposition lt lt Interfac e gt Observer update o Observable arg Object void LN AbstractPart AbstractUl edu ksu cis macr goal m odel visualizer ui createUl void amp controller make Controller AbstractPart registerWithModel void initialize void testDriver TestDriver initialize model GMoDSM odel testDriver TestDriver abstractU AbstractUl void register WithModel void B Controls GMoDS 1 model Interfac e GMoDS Model edu ksu cis macr goal m odel visualizer m odel addObserver o Observer void isA ncestorPrece dedSpecficationGoak identifier Uniqueldentifier boolean isA ncestorPositive TrggeredSpecificationGoa entifie r Uniquelde ntffier boolean isA ncestorNegative TrggeredSpecificatio n Goal kentifier Uniqueldentfier boolean isCrossTreeLink identifier1 Uniquelde ntfier dentifier2 Uniquelde ntfier boolean
125. hod next goalUl in goalUls assessState Figure 65 InstanceTreeCanvas assessGoals 116 height getOwnSize heig draw ree graphics2D left Jtop height Figure 66 InstanceTreeCanvas draw Figure 66 above shows the InstanceTreeCanvas draw method Figure 67 below shows the InstanceTreeCanvas determineSize method self InstanceTreeCanvas rootU getRootUl Figure 67 InstanceTreeCanvas determineSize Dimension 117 self FlashDaemon workQueue ConcurrentLinkedQueue InstanceG oalUl gt flashers Set lt InstanceGoalUl gt FlashParameters Thread flashingUI InstanceGoalUl treeUl InstanceTreeUl isEmpty isEmpty I Mh isEmpty false ui poll I add ui isEmpty isEmptyO T isEmpty isEmpty MM a a j I t waitWhileEm pty L ee J finished SeteInstanceGoalUI Y loop next flashingUl in flashers T t t 4 T flash flash sj flash false add flashingUI i draw Lu 8 Es Instance TreeUl draw l i i l MEG PERES ee Se SR ae RP ee H
126. horizontal Syntax determineTreeRelationOffsets graphics2D offsets required to provide Graphics2D void space for relations in the tree Pre graphics2D null Post Each SpecificationGoalUI has recorded its required horizontal offset Determine the final overall Syntax determineFinalTreeSize Dimension size of the specification tree Pre none image Post Result the final dimensions of the specification tree image Draw the specification tree Syntax drawTree graphics2D Graphics2D originX int rooted at this originY int maxPeerHeight int void SpecificationGoalUI on the Pre graphics2D null canvas Post The specification tree rooted at this SpecificationGoalUI is drawn on the canvas Draw the Syntax drawSelf graphics2D Graphics2D originX int SpecificationGoalUI on the originY int void canvas Pre graphics2D null Post The SpecificationGoalUI is drawn on the canvas Draw the directly routed Syntax drawDirectRelations graphics2D Graphics2D relations emanating from the void SpecificationGoalUI on the Pre graphics2D null canvas Post The directly routed relations emanating from the SpecificationGoalUI are drawn on the canvas 101 Table 40 AbstractRelationUI Interface Specifications Determine whether the Syntax determineRouting void relation will be directly or Pre none indirectly routed Post The AbstractRelationUI has recorded whether the
127. horizontal line separating the goal parameters from the goal name is not visible 2 When View Specification Goal Parameters is rechecked all specification goals and events parameters are visible The horizontal line separating the goal parameters from the goal name is visible 8 10 2 1 6 Test Case TC GV 6 Show Hide All Instance Goal Parameters Table 59 Test Case TC GV 6 Show Hide All Instance Goal Parameters Use Cases Tested GV 5 Change Instance Tree View Features Tested TF GV 5 1 Goal Diagrams 1 Any goal diagram with a goal that has parameters Required Event 1 Any compatible event script with valid events Scripts Procedure 1 Start the GMoDS Test Driver 2 File Load Event Script and select the compatible script 3 Click Play and allow the script to end 4 Select View Instance Goal Parameters uncheck the box 5 Select View Instance Goal Parameters recheck the box Expected Results 1 When View Instance Goal Parameters is unchecked all instance goals parameters are not visible The horizontal line separating the goal parameters from the goal name is not visible 2 When View Instance Goal Parameters is rechecked all instance goals parameters are visible The horizontal line separating the goal parameters from the goal name is visible 8 10 2 1 7 Test Case TC GV 7 Show Hide Specific Instance Goal Parameters 145 Table 60 Test Case TC GV 7 Show
128. in 69 Inspection Item Pass Fail Partial Comments program interface Table 3 clearly specifies the GMoDS Visualizer interface Table 4 clearly specifies the TestDriver interface Section 4 4 clearly explains the rationale for the system architecture The GMoDS Test Driver architectural module class diagram Figure 3 uses legal UML elements Table 5 clearly explains the responsibility of each GMoDS Test Driver architectural class or interface Note GoalTree is a GMoDS interface not a GMoDS Test Driver interface Table 6 clearly specifies the GoalEvent interface Table 7 clearly specifies the EventScript interface Section 5 1 3 clearly explains the rationale for the GMoDS Test Driver architecture The GMoDS architectural class diagram Figure 14 uses legal UML elements Section 8 clearly explains the rationale for Figure 14 elements Classes in the USE OCL model section 9 are consistent with the classes in Figure 14 70 Inspection Item Pass Fail Partial Comments Attributes in the USE OCL model section 9 are consistent with the corresponding classes in Figure 14 Associations in the USE OCL model section 9 are consistent with associations in Figure 14 Multiplicities in the USE OCL model section 9 are consistent with multiplicities on the corresponding associations in Figure 14
129. ing instlD Integer parameters InstanceP arameters InstanceT reeM odifications SpecTrees goalTree 1 InstTrees 1 specTree 1 instTree 1 SpecificationTreelmpl Instanc eTr eelmpl SpecEvents tree 1 tree tree 1 sperm InstGoals 0 event 1 3 goal 0 1 parent goal tar SpecificationE vent ParameterizedS pecificationGoal Offspring Instanc eGoallmpl l id String Lid String instID Integer dedaredGoallD String isLeaf Boolean child speciD String 0 state GoalState event 0 1 goal 0 1 SpecGoalP el DOCET ase InstGoalParams 0 param cuia param SpecificationP arameter pam en MEET InstanceParameters 0 Lid String oo SpecEventP aram s colldn 4 InstParams 0 param Instanc eParameter l id String l value String Figure 24 GMoDS and GMoDS Test Driver classes supporting formal specification 4 7 USE OCL Model GMoDS Test Driver Formal Specifications GMoDSTestDriver use 61 A formal specification of invariants maintained by EventScriptImpl addEvent and next methods Author Mike Fraka Date November 30 2010 model GMoDSTestDriver zi Z U ERATIONS enum EventType ACHIEVED FAILED POSITIVE_TRIGGER NEGAT VE_TRIGGER MODIFIED enum GoalState TRIGGERED ACTIVE ACHIEVED FAILED REMOVED OBVIATED
130. ins manual mode Determine if the Syntax hasNext boolean TestDriver has a Pre None next event to issue Post Result TestDriver has a next valid GoalEvent to GMoDS that can be issued to GMoDS 4 2 4 System Architecture Design Rationale The system architecture uses the Model View Controller MVC design pattern The GMoDS Visualizer component has both the view and controller roles The GMoDS Test Driver if applicable and the GMoDS components are both assigned the model role The GMoDS Test Driver encapsulates the core GoalEvent objects that it can issue to GMoDS behind a well defined TestDriver interface This interface also implements the Observer design pattern to support the notification of the GMoDS Visualizer that it should check whether valid GoalEvents remain to be issued The GMoDS component is encapsulated behind a GMoDS Model interface within the GMoDS Visualizer component allowing custom methods to support GMoDS Visualizer requirements 42 4 3 GMOoDS Test Driver Architecture 4 3 1 GMoDS Test Driver Decomposition Launcher edu k su cis macr goal m odel testdriver launcher m ain args Strin void lt lt Interfac e gt TestDriver edu k su cis macr goal m odel visualizer addObserver o Observer void loadEventScrit eventScrpt File void saveEve ntScnipt eventScript File void issueRando mEvents void playQ void pause voii H
131. ipt File void Pre TestDriver is in manual mode Pre eventScript null Pre User must have permission to write the eventScript File Pre If eventScript File exists then user must confirm that it will be overwritten Post The current EventScript of validated Goal Events events that have already been confirmed to refer to instance goals that exist in GMoDS will be written to eventScript File using the XML schema defined in Chapter 1 Vision Document Post The TestDriver remains in manual mode Syntax issueRandomEvents void Pre None Post A RandomEventScriptImpl is created using the RandomEventParameters in effect during the method call Post The TestDriver enters manual mode 41 Place the Syntax play void TestDriver in Pre TestDriver is in manual mode automatic mode Pre TestDriver has a next GoalEvent it can issue Post The TestDriver enters automatic mode Place the Syntax pause void TestDriver in Pre TestDriver is in automatic mode manual mode Pre TestDriver has a next GoalEvent it can issue Post The TestDriver enters manual mode Issue the next event Syntax next void to GMoDS Pre TestDriver is in manual mode Pre TestDriver has a next GoalEvent it can issue Pre The next GoalEvent refers to a valid instance goal Post The TestDriver issues the next GoalEvent to GMoDS Post The TestDriver rema
132. iqueldentifier InstanceGoalUl estartThread void jrrunQ void AbstractCanv as jfimage Bufferedimage faraphics2D Graphics2D l model GMoDSM odel lrresizeQ void tdete mineSize Dimension draw void Lrintialize void paintCom ponent g Graphics void Figure 15 GMoDS Visualizer view modules 4 4 6 GMoDS Visualizer View Module Responsibilities Table 15 GMoDS Visualizer view module responsibilities Component Responsibilities AbstractUI Define the basic behaviors and responsibilities of the view role Hold references to the core model and TestDriver if present AbstractCanvas Hold the Java 2D image upon which a diagram is drawn Define the methods concrete canvases must support GMoDS VisualizerUI The top level concrete user interface Hold the JFrame containing all visual components Provide the JMenuBar and host the TestDriver JToolBar Hold the SpecificationTreeUI and InstanceTreeUI in a JSplitPane SpecificationTreeUI Define the UI for the specification tree Provide zoom and scroll controls for the specification tree SpecificationTreeCanvas Draw the specification tree SpecificationGoalUI Define the UI for a specification goal 50 Component Responsibilities AbstractRelationUI Define the basic behaviors of a relation UI between 2 specification goal
133. isualizer Model Behavior Figure 47 below shows the GMoDS Modell mp1 notifyInstanceGoalModified method of the ChangeManager interface This method records the new values of the instance parameters to add support for the MODIFICATION parameter value origin by calling the updateInstanceGoal method see Figure 48 It then notifies observers that the model has changed The observer initiates flashing of the affected InstanceGoalUI The notifyInstanceGoalModified method is an example of how all the other instance tree related ChangeManager methods notify the observers self GMoDSM odellm pl P updat elnstanceG oal instanceG oal instanceP arameters GMoDSModellmpl updateInstanceG oal instanceG oal Uniqueldentifier instance P arameters InstanceP aram eters Tj setChanged re notifyObservers instanceGoal Figure 47 GMoDSModelImpl notifyInstanceGoalModified instanceGoal Uniqueldentifier instanceParameters InstanceParameters self GMoDSM odellm pl goalParams Map lt Uniqueldentifier Modifiablelnstance Parameters modifiableP aram s ModifiablelnstanceP arameters T T modifiableP aram s get instanceG oal ifiableP aram s null setValues instanceP arameters new aram s ModifiablelnstanceP arameters Figure 48 GMoDSModelImpl updateInstanceGoal instanceGoal Uniqueldentifier instanceParameters InstanceParameters 95 7 2 2 3 GMOoDS Visualizer View Stati
134. iteria Tests will pass if they meet the requirements specified for the tested feature in Vision Document 2 0 and fail otherwise 8 8 Suspension Criteria and Resumption Requirements 8 8 1 Suspension Criteria If a manual test fails all tests for features that rely on the failed feature will be suspended The failed test case will be entered into the test log with a description of the failure and date and time Tested features that do not depend on the failed feature will continue Automated unit tests will continue in the presence of failures 8 8 2 Resumption Requirements Testing for a failed feature will resume once the defect causing the failure has been identified and resolved 8 9 Test Deliverables 8 9 1 Test Log The test log will document all test cases The log will include the date and time of the test the test case identifier the pass fail status reasons for the failure and the action taken to resolve the failure 8 10Testing Tasks 8 10 1 GMOoDS Test Driver 8 10 1 1 Unit Tests Unit tests will be created for the tested features listed in section 8 6 1 Table 49 above Every aspect of the class listed below that lends itself to unit testing of these features will have at least one unit test method dedicated to it 138 o GoalEventImpl 8 10 1 2 Manual Tests The GMoDS Test Driver will be manually tested by having it stimulate the GMoDS Visualizer All of the manual tests described in this section are conducted usin
135. ition NotInScript is true recondition ValidType is true precondition ModifiedReqgParam is true precondition YalidSpecGoal is true UalidfchievedEvent is true ValidFailedEvent is true ValidSpecEvent is false precondition precondition precondition use Figure 29 above shows that the script gtd invalid specevt cmd violates the ValidSpecEvent pre condition 76 m Shortcui gnods gtd invalid specgoal cmd gt gnods gtd invalid specgoal cmd gt gmods qgtd invalid specgoal cmd gnods gtd invalid specgoal cmd gt gmods qgtd invalid specgoal cmd gnods qgtd invalid specgoal cmd gt gnods gtd invalid specgoal cmd gt gnods gtd invalid specgoal cmd gt gqnods gtd invalid specgoal cmd gt gnods gtd invalid specgoal cmd gt io USE 2 6 use bai finsert Cg3 InstTrees finsert Cgmods InstGoals finsert CinstT finsert CinstT finsert CinstT g3p into SpecGoalParams Impl instTree gt into InstTrees InstGoals InstGoals g 1 gt into gii gt into ree ree ree g21 gt into InstGoals gnods gtd invalid specgoal cmd gt InstGoalParams gnods gtd invalid specgoal cmd gt insert g 1 gnods gtd invalid specgoal cmd gt tinsert gil gnods gtd invalid specgoal cmd gt insert 9g21 gmods qgtd invalid specgoal cmd gnods gtd invalid specgoal cmd gt use gt fopenter si
136. ke approximately 10 hours 5 days developing manual test inputs 6 hours 3 days running manual tests with the GMoDS Test Driver 6 hours 3 days and running manual tests with a simulation 6 hours 3 days for a total of 14 days There are 5 major documents to produce in the Implementation Phase component design assessment evaluation user manual project evaluation and references I estimate this will take 32 hours 5 0 16 31 25 or 16 days So the total estimated time for phase 3 is 48 days 2 6 1 Comparison of Cost Estimates I initially estimated the code size as 3 3 KSLOC using unadjusted function points The updated code size estimate more than doubles the initial estimate This discrepancy may be due to inexperience with function point estimation and with the application area I initially made an estimate of the most likely the effort and time required using COCOMO 2 0 The most likely time estimate was 7 8 months The new time estimate places the project conclusion in mid to late April which is well within that time frame 33 3 Chapter 3 Software Quality Assurance Plan 3 1 Purpose This is the initial software quality assurance plan for the GMoDS Visualizer and Test Driver Masters of Software Engineering final project 3 2 Management 3 2 1 Organization The GMoDS Visualizer and Test Driver project is organized as follows e Developer o Mike Fraka e Major Professor o Dr Scott A DeLoach e Supervisory Committee o
137. lModel2 cvs projects cis ksu edu New Go Into Open in New Window Open Type Hierarchy Show In 1 Copy opy Qualified Name Lii gt ip c Paste D x elete Build Path Source Refactor s Import t Export amp Refresh amp enl FA Shift Alt w gt Ctrl C Ctri V Delete Shift Alt S gt Shift Alt T gt FS Close Project Assign Working Sets Run As Debug As Validate Team Compare With Replace With Restore from Local History Figure 94 Project Properties EE Problems Declaration El Consc lt terminated gt HuRT IED Java Applicati Loading Environment File confi Loading Agent File configs ied home f raka Desktop logs 2011 home f raka Desktop logs 2011 Logging to file home fraka De lsp3 VMware Worksta va Eclipse amp The GIMP In the Java perspective right click the project that needs to use the GMoDS Visualizer and select Properties as shown above in Figure 94 In the dialog that pops up select Java Build Path as show in Figure 95 below Click Add and select GMoDS Visualizer as shown in Figure 96 below 157 Properties for HuRT Shared 2 filter text Java Build Path Resource Builders Required projects on the build path gt l GoalModel2 gt OrganizationModel gt i OrganizationSimulator Build Path Java Code Style Java Compiler Java Editor P i Organi
138. lash parameters with consistent values Table 35 UIColors Interface Specificat Query the color of an InstanceGoalUI for the combination of GoalState FlashContext and ImageContext Set the color of an InstanceGoalUI for the combination of GoalState FlashContext and ImageContext Syntax getFlashCycle int Post Result the number of milliseconds in a cycle of flash and normal display Syntax getFlashPeriod int Post Result the total number of milliseconds of flashing desired Syntax setFlashParameters flashPeriod int flashCycle int void Post Record values of the flash parameters consistent with each other ion Syntax getColor state GoalState flashContext FlashContext imageContext ImageContext Color Post Result the color of an InstanceGoalUI for the combination of GoalState FlashContext and ImageContext Syntax setColor state GoalState flashContext FlashContext imageContext ImageContext color Color void Post Record the color of an InstanceGoalUI for the combination of GoalState FlashContext and ImageContext 7 2 2 1 3 GMoDS Visualizer Model Design Rationale I designed ModifiableInstanceParameters starting with GMoDS InstanceParameters class to make it easy to incorporate support for the MODIFICATION parameter value origin directly into GMoDS if desired 94 7 2 2 2 GMOoDS V
139. lf E ventS criptlmpl e GoalEventlmpl script ListeGoalE vent check SpecificationT re e Validity add e setChanged notifyObservers Figure 39 EventScriptImpl addEvent GoalEvent e Figure 40 below shows the EventScriptImpl next method The default implementation of getNextEvent provides deterministic event script operation simply selecting the next event in the file RandomEventScriptImpl overrides getNextEvent to incrementally create the next random event The incrementIndex method moves the event pointer to the following event The next event checks its validity with respect to GMoDS instance tree If an event fails an IllegalGoalEventException is thrown logged and presented to the user the event is not issued to GMOoDS If the event passes the validity checks it is issued to GMoDS The script then notifies itself that it has issued the next event This is a hook for the RandomEventScriptImpl to override to prepare to create the next random event Finally script notifies observers of the change in its state Figure 41 below shows the RandomEventScriptImpl getNextEvent method This method refers to a data member called nextEvent used to hold onto the GoalEvent currently being issued to GMoDS so that it can be added to the script in nextEventIssued after is passes validity checks and is issued This allows the script to grow incrementally and be saved to a file T
140. lor that indicates the current state of the instance goal and black foreground lines and characters The state colors shall be as indicated in the Legend in Figure 8 above by default but shall be editable at run time 1 3 2 2 2 2 SR GV 2 2 Critical Requirement The system shall display the instance goal name for each instance goal 1 3 2 2 2 3 SR GV 2 3 Non critical Requirement The system shall display a collapse expand toggle rectangle if the instance goal has children centered on the lower edge of the instance goal An instance goal displaying its children will Ce 66 display the character in the collapse expand toggle An instance goal hiding its children will display in the collapse expand toggle 1 3 2 2 2 4 SR GV 2 4 Non critical Requirement The system shall display a show hide parameter toggle rectangle if the instance goal has parameters centered on the left edge of the instance goal An instance goal showing its parameters will display the character H in the show hide parameter toggle An instance goal hiding its parameters will display the character S in the show hide parameter toggle 1 3 2 2 2 5 SR GV 2 5 Critical Requirement The system shall connect each parent instance goal to one of its child instance goals using a line with an arrow pointing to the child whose source is the collapse expand toggle control on the parent instance goal The arrow head shall be centered on the top edge of th
141. low in Figure 92 154 Add CVS Repository Add a new CVS Repository Add a new CVS Repository to the CVS Repositories view Location Host cvs projects cis ksu edu Repository path cvsroot gmodsvis Authentication User Password Connection Connection type 3 Use default port Use port W Validate connection on finish C Save password could trigger secure storage login To manage your password please see Secure Storage onfi amp CS Cera Figure 92 Add a new CVS Repository 155 CVS Repository Exploring Eclipse File Edit Navigate Search Project CVS Run Window Help ar oa 4 ju ories 53 a gt Sl BE extssh fraka cvs projects cis ksu edu cvsroot cros g extssh fraka 9cvs projects cis ksu edu cvsroot dtamas extssh fraka cvs projects cis ksu edu cvsroot gmods g extssh fraka cvs projects cis ksu edu cvsroot gmodsvis v HEAD gt E CVSROOT gt C GMoDS Visualizer gt GMoDSTestDriver amp GMoDSVisualizer gt 4 Branches P f Versions EN MM 1 Dates Check Out As b DB extssh fraka cvs projects cis ksu edu cvsroot h Ta Tag as Version b O extssh fraka 9cvs projects cis ksu edu cvsroot c Tag with Existing ib g extssh fraka projects cis ksu edu cvsroot agen r Paste Connection Ctrl V Compare With Expand All T Add
142. mentation i Close All Perspectives P ty GMoDSTestDriver cvs projects cis ksu edu P tz GMoDSVisualizer cvs projects cis ksu edu Navigation 4i b 3 GoalModel2 cvs projects cis ksu edu Preferences b XE HuRT Shared cvs projects cis ksu edu I Figure 89 Window Open Perspective Other 152 Open Perspective Debug amp Java default 2 Java Browsing fe Java Type Hierarchy t Planning f Resource g8 Team Synchronizing X XML Figure 90 Open Perspective CVS Repository Exploring 153 7 CVS Repository Exploring Eclipse File Edit Navigate Search Project CVS Run Window Help Cte a o g extssh fraka cvs projects cis ksu edu cvsroot cros extssh fraka cvs projects cis ksu edu cvsroot dtamas extssh fraka cvs projects cis ksu edu cvsroot gmods extssh fraka cvs projects cis ksu edu cvsroot gmodsvis extssh fraka cvs projects cis ksu edu cvsroot hurt extssh fraka cvs projects cis ksu edu cvsroot omacs extssh fraka projects cis ksu edu cvsroot agenttool Paste Connection Ctrl V amp Refresh View Figure 91 New Repository Location Establish a new CVS repository location by right clicking in the CVS Repositories tab and choosing New Repository Location as shown above in Figure 91 Add a new CVS repository location for cvsroot gmodsvis using the host cvs projects cis ksu edu and connection type extssh as shown be
143. n Time between Failures MTBF as the average usage time between software faults and states that In rough terms MTBF is computed by dividing the test hours by the numbers of type 0 and type 1 SCOs In my case I used the cumulative number of test hours divided by the cumulative number of faults MTBF 2 00 1 80 1 60 1 40 1 20 1 00 0 80 0 60 0 40 0 20 0 00 9 MTBF 0 00 1 00 2 00 3 00 4 00 5 00 Figure 119 Mean Time between Failures Figure 119 above shows a rising MTBF as testing begins and a bit of leveling off at the end as no more defects are found I believe that MTBF will increase as the GMoDS Test Driver and Visualizer are put into production use 179 11 3 2 Future Work This section lists some future work that could improve the GMoDS Visualizer and Test Driver 11 3 2 1 Dynamic Specification Tree Display The GMoDS ChangeManager interface can notify the GMoDS Visualizer of changes to the specification tree similar to changes to the instance tree It would not be difficult to change the Visualizer to respond to these changes by redrawing the specification tree 11 3 2 2 Display Events Executed in the GMoDS Test Driver The GMoDS Visualizer UI could be enhanced to display the list of events as they issued by the GMoDS Test Driver to GMoDS This could improve the feedback and learning about GMoDS a user of the Test Driver experiences 180 12 References 1 2 10 B Boehm e
144. nceParameters InstParams g31pt InstanceParameter id x value 6 Figure 34 Valid snapshot prior to adding a valid MODIFIED event with parameters Figure 34 above shows a snapshot of the pre state when adding a valid MODIFIED event Figure 35 below shows that invoking addEvent on this snapshot produces valid pre conditions 80 mods gtd uvalid modified cmd gmods qgtd valid modified cmd gnods gtd valid modif ied cmd gt mods qtd ualid modified cmd mods qgtd valid modified cmd finsert finsert finsert tinsert gmods qtd ualid modified cmd gmnods gtd valid modified cmd gmods gqtd valid modified cmd gnods q gtd uvalid modified cmd gmods qtd valid modified cmd gmods gtd valid modif ied cmd gt finsert tinsert finsert finsert gmnods gtd valid modif ied cmd gt gnods gtd valid modif ied cmd gt gmods qtd uvalid modified cmd gmods gtd valid modified cmd ise gt topenter si addEvent lt gei gt precondition precondition recondition precondition precondition precondition recondition precondition TELPA NotInScript is true UalidType is true ModifiedReqParam is true ValidModif iedParamNames is UalidSpecGoal is true ValidfchievedEvent is true UalidFailedEvent is true UValidSpecEvent is true InstGoals CinstTree CinstTree CinstTree CinstTree In
145. ntext Image Context Color setC olor state GoalState flashContext FlashContext imageContext Im ageContext color Color void I Constant TRIGGERED lt lt Constant gt gt ACTIVE j Constant ACHIEVED lt lt Constant gt gt FAILED j Constant REMOVED j Constant OBVIATED esetNumE vents numE vents int void FlashParameters fashPeriod int 2000 flashC ycle int 500 getTotalF lashC ount int I getFlashC ycle int setF lashParameters flashP eriod int fashC ycle int void lt lt Enune gt GoalState lt lt Enunp gt FlashContext Constant Nomal Constant Flash l lt lt Constant gt gt Back ground I lt lt Constant gt gt Foreground Figure 46 GMoDS Visualizer Model Component Classes 90 7 2 2 1 1 GMoDS Visualizer Model Local Module Responsibilities Table 30 GMoDS Visualizer Model Module Responsibilities Component Responsibilities ModifiableInstanceParameters Record the current value of each InstanceGoal parameter so that if the value changes it can be ascribed the parameter value origin MODIFICATION ValueContainer Record the current value of a particular InstanceGoal parameter RandomEventParameters Define the parameters guiding random event generation FlashParameters Define the parameters guiding InstanceGoalUI flashing
146. omma The final parameter shall be followed by the closing parenthesis and no comma 1 3 2 1 2 11 SR GV 1 11 Critical Requirement Parent child relation lines shall not intersect with each other 1 3 2 1 2 12 SR GV 1 12 Non critical Requirement The system shall minimize the number of intersections between precedes positive trigger negative trigger and parent child relation lines 1 3 2 1 2 13 SR GV 1 13 Critical Requirement The system shall not allow any lines to intersect goal rectangles 1 3 2 1 2 14 SR GV 1 14 Critical Requirement The system shall provide scrolling and zooming of the specification goal tree view 1 3 2 2 Use Case GV 2 Display Instance Tree 1 3 2 2 1 Description The GMoDS Visualizer displays the initial instance goal tree in a tree like structure including all instance goals and parent child relations with their string identifiers By default goal parameter names values and the values origin I inherited T trigger M modification are shown The system shows each instance goal state visually See Figure 8 below Legend C Triggered E Active Achieved Failed B Removed E obviated Figure 8 Use Case GV 2 20 1 3 2 2 2 Associated Functional Requirements 1 3 2 2 2 1 SR GV 2 1 Critical Requirement The system shall display the instance goal tree as a graphical tree using minimum white space padding between adjacent tree elements Each instance goal will have a background co
147. onCommand actionC m d equals GMoDSVisualizerUl SAVE EVENT SCRIP T GMoDS isualizerPart saveE ventS cript a PE PIEL PI PE LE EEI PO SEEE ETT NTC CET actionCm d equals GMoDSVisualizerUI ISSUE RANDOM EVENTS i issueRandomE vents actionC m d equal GMoDSVisualizerUI NEXT GMoDSVisualizerPart next a actionC m d equals GMoD SVisualizerUl PLAY Figure 72 GMoDSVisualizerPart actionPerformed e ActionEvent 122 self GMoDSVisualizerP art testDriver TestDriver a file prom ptF orf ventScript view GMopSVisualizerUI LO AD_E VENT SCRIP T Q l fle t null ade ventScript fie Figure 73 GMoDSVisualizerPart loadEventScript Figure 72 above shows the GMoDS VisualizerPart actionPerformed method Figure 73 above shows the GMoDSVisualizerPart responding to the load event script command Figure 74 below shows the GMoDS VisualizerPart responding to the save event script command file null loadE ventScript file Figure 74 GMoDSVisualizerPart saveEventScript 123 self GMoDSVisualizerP art next testDriver TestDriver Figure 75 GMoDS Visualizer next Figure 75 above shows the GMoDS VisualizerPart responding to the next command It uses try catch and catches IllegalGoalEventExceptions when a GoalEvent is illegal with respect to the instance tree Figure 76 below shows the GMoDSVisualizerPart responding to the
148. onDocument3 go v Ju junit Ju DEMIR CF Share Ju src tests Ju src unittests Ju TestAuctionMgrimpl testAwardA Ju TestDEMIRCF testSequentialTask Filter matched 34 of 34 items Name Launcher VisionDocument2 goal in 69 Arguments JRE Classpath Source PS Environment Common Project GMoDSTestDriver Main class edu ksu cis macr goal model testdriver launcher Launcher Include system libraries when searching for a main class C Include inherited mains when searching for a main class O Stop in main Figure 106 GMoDS Test Driver Main Run Configurations Create manage and run configurations Run a Java application amp e Name Launcher VisionDocument2 goal Java Applet v GD Java Application O Environment TestObjectMoving D HuRT IED Launcher Launcher Environment E Launcher Environment 1Agent O Launcher Environment 2Agents O Launcher ObjectConstruction g Gi Launcher ObjectConstructionNe Launcher VisionDocument goal Launcher VisionDocument3 go v Jo junit Ju DEMIR CF Share Ju src tests Ju src unittests Ju TestAuctionMgrimpl testAwardA Ju TestDEMIRCF testSequentialTask m Filter matched 34 of 34 items G Main t9 Arguments JRE gt Classpath amp Source PB Environment E Common Program arguments
149. otype conduct a technical inspection of one elaboration phase artifact and present elaboration phase products to the supervisory committee The executable architecture prototype will demonstrate the architecture of the software on the critical requirements The elaboration phase will conclude upon approval of the supervisory committee 2 2 3 Production Phase The production phase includes tasks to prepare the component design document develop the remaining code and tests conduct testing evaluate the project and present production phase products to the supervisory committee The production phase presentation will include the production phase artifacts and a final demonstration of the software 28 The production phase will end upon approval of the supervisory committee 2 3 Architecture Elaboration Plan 2 3 1 Revise the Vision Document The student will incorporate changes suggested by the supervisory committee into the vision document The revised vision document will be submitted to the major professor for approval 2 3 2 Revise the Project Plan The student will revise the project plan to provide a detailed implementation phase plan and revised cost estimate The revised project plan will be submitted to the major professor for approval 2 3 3 Develop a Formal Specification The student will formally specify the visibility and appearance of UI elements corresponding to instance goals in response to GMoDS updates and user inte
150. pecGoal is true recondition UalidfichievedEvent is true precondition ValidFailedEvent is true recondition UalidSpecEuent is true use gt tinsert Csi gei gt into Events ise gt topexit ostcondition NowInScript is true ostcondition OneMoreEuent is true postcondition Appended is true TEx a M ser t 761 m LP Pa c Shortcut to USE 2 6 ise ba O x gmods gtd valid cmd gt gnods gtd valid cmd gt ise gt open gmods gtd invalid post cmd mods gtd invalid post cmd openter si addEvent gei1 precondition NotInScript is true D UalidT ype is true ModifiedReqParam is true UalidSpecGoal is true UalidachievedEvent is true i ValidFailedEvent is true precondition UalidSpecEvent is true Zgmods gtd invalid post cmd mods gtd invalid post cmd opexit ostcondition NowInScript is false evaluation results self EventScriptImpl si self event OrderedSet GoalEventImpl gt OrderedSet lt gt e GoalEventImpl gei self event gt includesCe gt Boolean mostcondition OneMoreEvent is false evaluation results self EventScriptImpl si false self event OrderedSet GoalEventImpl gt OrderedSet lt gt self event gt asSet Set GoalEventImpl gt Set self EventScriptImpl si self event pre OrderedSet lt GoalEventImpl gt OrderedSet lt gt self event pre gt asSet Set lt Goal
151. plements the observer design pattern on the GMoDSModel The GMoDSModel implements the ChangeManager interface and notifies the InstanceTreeUI whenever an InstanceGoal has changed its GoalState or been modified In response the InstanceTreeUI assures that an InstanceGoalUI exists and is initialized for each InstanceGoal Then the InstanceTreeUI notifies the FlashDaemon using a synchronized call to the notify method Finally the InstanceTreeCanvas is activated to draw the instance tree and will be re activated on each flash by the daemon 119 7 2 2 5 GMoDS Visualizer Controller Static Structure GMoDS VisualizerPart instTreeUl InstanceTreeUl notifyU serO fE xception view GM oDS VisualizerUI ex IllegalGoalE ventException void promptF orE vent Script view GMoDS VisualizerUl actionCommand String File EditPreferenc esPart gmods VisualizerUl GMoDS VisualizerUl applyStates view EditPreferencesUl boolean l applyR andom E vents view EditPreferencesUl boolean SpecificationTreePart Instanc eTreePart goalUl InstanceGoalUl instTreeUl InstanceTreeUl instT reeC an vas InstanceTreeC anvas Hm ouseClicked e M ouseE vent void AbstractUl P Controls edu ksu cis macr goal m odel visualizer ui initialize model GMoDSM odel testDriver TestDriver abstractUl AbstractUl void controller registerVVithModel void notifyU serOfE rror view Abstrac
152. plyStates view drawnstanceTree setVisible false dispose Figure 83 EditPreferencesPart Cancel 127 dialog JDialog self E ditP referenceP art button getC olorButton view E ditPreferencesu button StateColorButton updat eC olor dialog getColorChooserDialog setVisible false dispose Figure 84 EditPreferencesPart ColorOK Figure 84 above shows the EditPreferencesPart responding to the OK button on the color chooser dialog presented by its UI Figure 85 below shows the EditPreferencesPart responding to the Cancel button on the color chooser dialog presented by its UI self E ditP referenceP art button getC olorButton dialog getC olorChooserDialog setVisible false dispose Figure 85 EditPreferencesPart ColorCancel 128 self SpecificationTreeP art e AdionEvent view Spedfication TreeUl actionC m d equals SpecificationTreeUl ZOOM IN zoomin actionC m d equals SpecificationTreeUl ZOOM OUT zoomOut Figure 86 SpecificationTreePart actionPerformed e ActionEvent Figure 86 above shows the SpecificationTreePart actionPerformed method Figure 87 below shows the InstanceTreePart actionPerformed method actionC m d equals InstanceTreeUl ZOOM IN zoomIn actionC m d equals InstanceTreeUl RESET_ZOOM resetZoom actionC m d equals InstanceTreeUl ZOO
153. psed Legend C Triggered Active Achieved Failed B Removed obviated Figure 11 Use Cases GV 6 and GV 7 1 3 2 7 2 Associated Functional Requirements 1 3 2 7 2 1 SR GV 7 1 Non critical Requirement The system shall collapse the specific instance goal sub tree hiding all descendant goals if the user clicks on the collapse toggle control of that instance goal 1 3 2 7 2 2 SR GV 7 2 Non critical Requirement 26 The system shall expand the specific instance goal sub tree showing all descendant goals whose parent goal has not been collapsed if the user clicks on the expand toggle control of that instance goal 1 3 2 7 2 3 SR GV 7 3 Non critical Requirement The system shall not change the expand collapse state of any instance goal whose expand collapse control was not directly clicked 1 3 3 1 3 4 1 3 5 Assumptions There is no need to stack collapsed instance goals under instance goals from the same specification goal The view space savings from hiding the descendants will shrink the displayed tree sufficiently to allow simultaneous viewing of the desired number of instance goals Java JRE 1 6 or above will be available on platforms using the GMoDS Test Driver or Visualizer Constraints Applications using GMoDS shall not be forced to include the GMoDS Test Driver or GMoDS Visualizer components in their projects but may optionally do so Environment Application environment o JDK 1 6 or higher
154. q3p SpeciticationParameter SpecGoals isLeaf true Specirees GMoDSTree Instlrees typess POSITIVE TRIGGER specEventID e1 specGoallDz g2 InstGgs Instqoals stGoals instGoallD 1 gi tiinstanceGoallmpl g21 InstanceGoalimpl g01 InstanceGoallmpl instID 1 instID 1 instID 1 speclD g1 speciD g2 speciD q0 state ACTIVE state ACTIVE state ACTIVE InstGoa Params InstGoalParams InstGoalParams id x valuez a a1 4P instanceParameters Figure 25 Valid snapshot prior to adding a POSITIVE TRIGGER event Figure 26 below shows that the pre conditions and post conditions are valid for the above snapshot when executing the script gtd valid post cmd manually 74 gnods gtd valid cmd gt InstGoals gnods gtd valid cmd gt tinsert CinstTree g 1 gt into InstGoals gnods gtd valid cmd gt tinsert CinstTree gil gt into InstGoals qnods gtd valid cmd gt tinsert CinstTree g21 gt into InstGoals gnods gtd valid cmd gt qnods gtd valid cmd gt InstGoalParams gmnods gtd valid cmd gt tinsert g 1 g iP gt into InstGoalParams qnods qtd valid cmd gt tinsert gii g1i1P gt into InstGoalParams gnods gtd valid cmd gt tinsert g21 g21P gt into InstGoalParams gnods gtd valid cmd gt gnods gtd valid cmd gt use gt fopenter si addEvent lt gel gt recondition NotInScript is true precondition ValidType is true recondition ModifiedReqParam is true precondition UalidS
155. r Object Figure 38 GMoDS Test Driver Random Events Component Classes 7 2 1 1 1 GMoDS Test Driver Local Module Responsibilities This section describes the responsibilities of GMoDS Test Driver local modules not described in 4 3 2 Table 28 GMoDS Test Driver Module Responsibilities Component Responsibilities AbstractEventGenerator Define the behaviors required to generate a random GoalEvent AbstractTriggerEventGenerator Define the behaviors of a trigger based GoalEvent AchievedEventGenerator Generate a random ACHIEVED GoalEvent FailedEventGenerator Generate a random FAILED GoalEvent ModifiedEventGenerator Generate a random MODIFIED GoalEvent 83 Component Responsibilities PositiveTriggerEventGenerator Generate a random POSITIVE_TRIGGER GoalEvent NegativeTriggerEventGenerator Generate a random NEGATIVE TRIGGER GoalEvent Randomizer Provide random number and string utilities 7 2 1 1 2 GMoDS Test Driver Local Module Interface Specifications Table 29 AbstractEventGenerator Interface Specifications Generate a random GoalEvent Generate a random event delay time Get the identifier of the random event known to GMoDS Create random event parameters if applicable Syntax generateEvent gmods GoalTree GoalEvent Pre gmods null
156. r the state of the EventScript changes 46 4 3 4 GMoDS Test Driver Design Rationale The heart of the GMoDS Test Driver is the EventScriptImpl and RandomEventScriptImpl that extends it and the GoalEventImpl The EventScriptImpl provides the deterministic usually file based event script functionality The RandomEventScriptImpl provides random GoalEvent generation The GoalEventImpl enforces the invariants that assure valid InstanceGoals and SpecificationEvents are sent to GMoDS The GMoDS Test Driver architecture was derived from analysis of the objects referenced in Chapter 1 Vision Document 4 4 GMOoDS Visualizer Architecture The GMoDS Visualizer uses the MVC architectural design pattern Each section that follows decomposes the modules that take on each role in the MVC design pattern I did not make use of the Command design pattern because the visualizer has no requirement to support undo operations 4 4 1 GMoDS Visualizer Model Decomposition Interfac e GMoDS Model Interfac e gt Instanc eTree edu ksu cis macr goal m odel lt lt Interfac e gt SpecificationTree edu ksu cis macr goal m odel addObserver o Observer voki isA ncestorPrece dedSpecficationGoaK identifier Uniqueldentifier boolean isA ncestorPosttive TriggeredSpecification Goa identifier Uniqueide ntfier boolean isA ncestorNegative TriggeredSpecificatio n Goal identifier Uniqueidentifier boolean isCros
157. ractions using USE and OCL The formal specification will be submitted to the supervisory committee for approval 2 3 4 Prepare the Architectural Design Document The student will prepare an architectural design document to the level of abstraction of component interfaces using appropriate diagrams The architectural document will undergo technical inspection and be submitted to the supervisory committee for approval 2 3 5 Prepare the Test Plan The student will prepare a test plan for the software to be executed in the production phase The test plan will include unit integration and component and system level functional tests The plan will include evaluation criteria for all critical use cases and a set of test data deemed adequate for acceptance testing Specifically the test plan will identify a set of test cases the types of tests that will be used for these test cases the data that will be used for each case and the requirement traces for each test case 6 The test plan will be submitted to the supervisory committee for approval 2 3 6 Conduct a Technical Inspection The student will prepare an inspection checklist for the architectural design document and coordinate the inspection with the inspectors Kyle Hill and Shylaja Chippa will serve as inspectors on this project The inspection check lists and letters will be submitted to the supervisory committee for approval 2 3 7 Implement an Executable Architecture Prototype Th
158. rements Table 4 below shows the minimum documentation required for the GMoDS Visualizer and Test Driver project Table 4 GMoDS Visualizer and Test Driver Minimum Documentation Phase 1 Phase 2 Phase 3 Time Log Time Log Time Log Vision Document 1 0 Vision Document 2 0 Component Design 1 0 Project Plan 1 0 Project Plan 2 0 Technical Inspection Letters SQA Plan 1 0 Architectural Design 1 0 Project Evaluation Initial Executable Prototype Formal Requirements Project Source Code Specification Presentation 1 Technical Inspection Checklist Executable Project Test Plan User Manual Executable Architecture Presentation 3 Prototype Presentation 2 3 4 Standards practices conventions and metrics The project will follow applicable IEEE standards 4 5 for documents The source code will use Java naming conventions The source code will be documented using javadoc COCOMO 2 0 will be used as the cost estimation metric Quality will be measured using the rework ratio metric defined as RW pefects pevelopment Where Epefeects is the effort spent fixing defects and Epevelopment 1s the effort spent developing code Quality also will be measured using the mean time between defects Both of these metrics can be estimated using the engineering notebook time logs 35 3 5 Reviews and audits The developer will present all artifacts produced in each phase for review and approval by the major p
159. required by the specification event pre ValidTriggerParamNames e type 4POSITIVE TRIGGER or e type 4NEGATIVE TRIGGER implies gmods specTree event exists se se id e specEventID and Se param forAll sep e param exists ep ep id sep id The event is added to the script if all preconditions are met post NowInScript event includes e The number of events is increased by 1 post OneMoreEvent event asSet vent8pre asSet size 1 The new event is appended to the end of the script post Appended event gt last e context EventScriptImpl next The script must have at least 1 event pre HasAtLeastOneEvent event gt size gt 0 The script has a next event to issue to GMoDS pre HasNextEvent index lt event siz The next event refers to an InstanceGoal that exists in GMoDS pre ValidInstGoal let nextEvt GoalEventImpl event gt at index 1 in gmods instTree goal gt exists ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID An event whose type is not MODIFIED must reference an ACTIVE InstanceGoal pre NotModifiedRefActiveGoal let nextEvt GoalEventImpl event
160. rofessor and supervisory committee 3 6 Test The Test Plan will address all testing issues Please refer to this document when it is produced 3 7 Problem reporting and corrective action The major professor may report problems to the developer at any time during the project The supervisory committee will report problems during each presentation Any action items will be documented and addressed in the next phase Action items found at presentation 3 will be addressed before project conclusion 3 8 Tools techniques and methodologies Table 5 below shows the tools techniques and methodologies employed in the GMoDS Visualizer and Test Driver project Table 5 GMoDS Visualizer and Test Driver Tools Techniques and Methodologies Tool Use Microsoft Word 2007 Prepare all written documents Microsoft Excel 2007 Prepare cost estimates Microsoft Power Point 2007 Prepare custom figures Microsoft Project 2002 Prepare Gantt charts XML Spy 2005 Design XML schemas Gimp 2 2 Customize images for insertion in documents Visual Paradigm for UML 7 0 Prepare UML diagrams and generate source code Eclipse IDE for Java Developers Develop source code 1 2 1 20090918 0703 JUnit 3 8 Develop and execute unit tests USE OCL Formally specify UI element behaviors Freemind 0 8 1 Record notes and ideas 3 9 Code control media control and supplier control Project artifacts produced using the Eclipse
161. sGo als Figure 61 InstanceTreeCanvas createGoalUIs Figure 61 above shows the InstanceTreeCanvas createGoalUIs method Using recursion each an InstanceGoalUI is created for each InstanceGoal in GMoDS The goal UIs are ordered to support drawing Each goal UI is intitialized and its GoalState is assessed Figure 62 below shows the InstanceTreeCanvas createGoalUI method 114 self InstanceTreeC anvas goal Instance Goal lt InstanceP arameters gt InstanceGoalUlRegistry id getldentifier goalUl get id T goalUI null create goal depth instTreeUl this odalUIRegistry model testDriver put goalUl children getChildrenO finstance Goal id iterator L children Iterator Instance Goal InstanceP arameters gt gt hasNex hasNe t childGoal next PE createGoalUl childGoal depth 1 H i l i hasNext l H l i i Figure 62 InstanceTreeCanvas createGoalUl goal InstanceGoal lt InstanceParameter gt goal depth int Figure 63 below shows the InstanceTreeCanvas initializeGoals method next goalUl in goalUls Instance GoalUl initialize initialize Figure 63 InstanceTreeCanvas initializeGoals 115 self InstanceGoalUl Figure 64 InstanceGoalUL initialize Figure 64 above shows the InstanceGoalUL initialize method Figure 65 below shows the InstanceTreeCanvas assessGoals met
162. sTreeLink identifierl Uniquelde ntfier dentifier2 Uniquelde ntfier boolean haveSameParents dentifiert Uniquelde ntfier klentifie r2 Uniqueidentifier boolean assessState dentfier Unique Identifier GoalState A GMoD S Modell mpl lt lt Interfac e GoalTree edu ksu cis macr goal m odel gmods N 1 GoalState lt lt Constant gt gt TRIGGERED lt lt Constant gt gt ACTIVE Constant ACHIEVED lt lt Constant gt gt FAILED lt lt Constant gt gt REMOVED lt lt Constant gt gt OBVIATED Figure 14 GMoDS Visualizer model modules 4 4 2 GMoDS Visualizer Model Module Responsibilities Table 13 GMoDS Visualizer model module responsibilities Component Responsibilities GoalState Enumeration of possible goal states GMoDSModel Define methods for access and evaluation of the core GMoDS objects GMoDSModelImpl Implement methods for access and evaluation of the core GMoDS objects 47 4 4 3 GMoDS Visualizer Model Interface Specifications Table 14 below shows custom methods for accessing and evaluating core GMoDS objects The methods defined for GMoDS native interfaces GoalTree SpecificationTree and InstanceTree are not documented in this paper Table 14 GMoDS Visualizer GMoDSModel interface specifications Add an Observer of the Syntax addObserver o Observer void GMoDSModel
163. sible spec GoallD Uniqueldentifier boolean m akeV isible spec GoallD Uniqueldentifier void makelnvisible soec GoallD Uniquelde ntiier void getParameters identifier Uniqueidentifier Modifiableinstance Parameters isCrossTreeLink dentifiert Uniquelde ntfier dentifier2 Uniqueide ntfier boolean h aveSameParents dentifiert Uniquelde ntfier dentifier2 Un iqueldenttier boolean hasAncestor goa identifier Uniqueldentiier ancestoridentifier Uniqueldentifier boolean getMinStringLengthd int esetMinStringLength minStringLength int void egetMaxStringLength int setMaxStringLength maxStringL ength int void getMinDelayTime int setMinDelayTime minD elayTime int void IrgetMaxDelayTime int esetMaxDelayTime maxD ela yTime int void getNumE vents int M odifiableInstanceP aram eters parameters nstanceParameters isinherited uniqueldentifier Uniqueldentifier boolean isM odified uniqueldentifier Uniqueldentifier boolean l setValue uniqueldentifier Uniqueldentifier inherited boolean value Object boolean g et Value uniqueldentifier Uniqueldentifier Object ModifiablelnstanceP arameters modified boolean value Object isinherited boolean isM odified boolean set Value value Object void I getValue Object getColor state GoalState flashContext FlashContext im ageCo
164. stGoalParams gG1 lt gii Cr Cg31 gBP giiP gt g21P gt 931P gt Inst Params finsert g31P g3ipi gt into InstParams true qui qii g21 gt g31 gt into into into into into into into into InstGoals InstGoals InstGoals InstGoals InstGoalParams InstGoalParams InstGoalParams InstGoalParams Figure 36 below shows that the script gtd invalid modifed paramnames cmd violates the ValidModifiedParamNames pre condition gmods gtd invalid modif ied paramnames cmd gt gmods qgtd invalid modified paramnames cmd qmods gtd invalid modified paramnames cmd aArams gnods gtd invalid modif ied paramnames cmd gt aArams 7qmods gtd invalid modified paramnames aArams gmods gtd invalid modif ied paramnames rams cmd gt cmd gt insert insert insert insert InstGoalParams g 1 Cgil Cr P Cg31 g iP gt InstGoalP g1iiP gt g21P gt g31P gt InstGoalP InstGoalP InstGoalP cmd gt cmd cmd gt gnods gtd invalid modif ied paramnames Inst Params finsert g31P g3ipi gt into InstPar gnods gtd invalid modif ied paramnames gnods gtd invalid modif ied paramnames ams gnods gtd invalid modif ied paramnames cmd gt ise gt openter si addEvent lt gel gt precondition precondition precondition precondition precondition precondition precondition
165. support the isSent operator denoted by An in Warmer and Kleppe The Object Constraint Language 2nd Edition 2003 Addison Wesley pp 156 157 and gmods modifyInstanceGoal nextEvt specGoalID nextEvt instGoalID instParams 68 5 Chapter 5 Technical Inspection Check List 5 1 Introduction 5 2 Items to Inspect 5 2 1 System Architecture Design Document 1 0 1 System Architecture Section 4 2 a System Components Section 4 2 1 b System Component Responsibilities Section 4 2 2 c System Interface Specifications Section 4 2 3 d System Architecture Design Rationale Section 4 2 4 2 GMoDS Test Driver Architecture Section 4 3 a GMoDS Test Driver Decomposition Class Diagram Section 4 3 1 b GMoDS Test Driver Module Responsibilities Section 4 3 2 c GMoDS Test Driver Interface Specifications Section 4 3 3 d GMoDS Test Driver Design Rationale Section 4 3 4 3 GMoDS Architecture Section 4 6 4 USE OCL Model Section 4 7 5 3 Inspectors e Shylaja Chippa e Kyle Hill 5 4 Formal Inspection Check List Table 26 Formal Inspection Check List Inspection Item Pass Fail Partial Comments The system component diagram Figure 2 uses legal UML elements Section 4 1 clearly explains the elements of the system component diagram Table 1 clearly explains the responsibilities of each system component Table 2 clearly specifies the GMoDS Test Driver ma
166. t al Cost Models for Future Software Processes COCOMO 2 0 Annals of Software Eng Vol 1 1995 pp 57 94 Scott A DeLoach amp Matthew Miller A Goal Model for Adaptive Complex Systems International Journal of Computational Intelligence Theory and Practice Volume 5 no 2 2010 Scott A DeLoach Cost Estimating With Function Points Lecture CIS 748 Kansas State University 2006 IEEE Std 730 1998 Standard Software Quality Assurance Plans IEEE 1998 IEEE Std 730 1 1995 IEEE Guide for Software Quality Assurance Planning IEEE 1995 K State Master of Software Engineering web site MSE Portfolio Requirements 5 October 5 2010 http mse cis ksu edu portfolio html W Royce Software Project Management A Unified Framework Addison Wesley 1998 p 34 pp 265 281 W Royce Software Project Management A Unified Framework Addison Wesley 1998 p 198 USE A UML based Specification Environment Documentation 17 March 2011 available at http www db informatik uni bremen de projects USE doc USEOCLmodeling zip available at http people cis ksu edu mfraka FrakaMSE html This file contains the USE model and command scripts used to model the pre and post conditions of the method EventScriptImpl addEvent 181
167. t it can issue Post The EventScript enters automatic mode 45 Place the EventScript in manual mode Issue the next event to GMoDS Determine if the EventScript has a next event to issue to GMoDS Add an Observer of the event script as in the Observer design pattern Syntax pause void Pre EventScript is in automatic mode Pre EventScript has a next GoalEvent it can issue Post The EventScript enters manual mode Syntax next void Pr EventScript is in manual mode Pre EventScript has at least 1 event Pre EventScript has a next GoalEvent it can issue Pre The next GoalEvent refers to a valid instance goal Pre If next GoalEvent type MODIFIED then the next event refers to a valid active instance goal Post If the next GoalEvent type MODIFIED the EventScript issues the next GoalEvent to the GMoDS event method Post If the next GoalEvent type MODIFIED the EventScript issues the next GoalEvent to the GMoDS modifyInstanceGoal method Post The EventScript index refers to the next event if one exists Post The EventScript remains manual mode Syntax hasNext boolean Pre None Post Result EventScript has a next valid GoalEvent that can be issued to GMoDS Syntax addObserver o Observer void Pre o null Post An Observer o is recorded and will be notified wheneve
168. tDriver B TestDriver TestDriver L1 GoaTree Q ChangeManager com ponent GMoDS O Instanc eTree SpecificationTree com ponent a com ponent gt gt 8 SpecificationTreelmpl Instanc eTr eeimpl Figure 12 System components Figure 12 System components shows the three components developed or reused in this project The system reuses the Goal Model for Dynamic Systems GMoDS component to visualize its behavior The exact version of GMoDS reused is specified in Chapter 3 Software Quality Assurance Plan The GMoDS component provides the GoalTree interface and requires the ChangeManager interface The client uses the GoalTree interface to pull information from GMoDS GMoDS uses the ChangeManager interface to push information to the client The GMoDS Visualizer component provides the user interface for visualizing the behavior of GMoDS Figure 12 notes show that the GMoDS Visualizer uses the Model View Controller 38 MVC architecture The GMoDS Visualizer defines the TestDriver interface that must be provided by the GMoDS Test Driver when the visualizer is tested using this component The GMoDS Visualizer provides the GMoDS Visualizer interface to support its initialization The GMoDS Test Driver component provides the TestDriver interface implementation to support testing of the GMoDS Visualizer and uses the GMoDS Visualizer interface to initialize it 4
169. tGoalUIs Iterator InstanceGoalUl getChildUls identifier Uniqueldentifier Iterator sInstanceG oalUI hasc hildren identifier Uniqueldentifier boolean paintC om ponent g Graphics void resize void intialize void zoomlIn void resetZoom void HzoomOut void FlashDaemon work Queue Queue InstanceGoalUl null reeUl InstanceTreeUl null fashers Set lt instanceGoalUl gt newHashSet lt InstanceGoalUl gt Flashes rFlashDaemon treeUl InstanceTreeUl workQueue Queue InstanceG oalUl startThread void run void waitVVhileE mptyQ void fiashDaemon Figure 51 GMoDS Visualizer InstanceTreeUI Component Classes 7 2 2 3 1 GMoDS Visualizer View Local Module Responsibilities Table 36 GMoDS Visualizer View Module Responsibilities Component Responsibilities EditPreferencesUI Provide the view for editing preferences SpecificationTreeUI Provide the view for the specification tree SpecificationTreeCanvas Draw the specification tree on an image SpecificationGoalUI Provide the view for a specification goal AbstractRelationUI Provide the view for relation UIs AbstractTriggerUI Provide the view for trigger UIs PrecedesRelationUI Provide the view for a precedes relation 98 Component Responsibilities PositiveTriggerUI Provide the view for a positive trigger Nega
170. tGoals q11 InstanceGoallmp q21 InstanceGoallmpl 31 InstanceGoallmpl instID 1 instID 1 instID 1 speciD g1 speciD g2 speciD g3 state ACTIVE state ACTIVE state ACTIVE InstGoalParams InstGoalParams InstGoslParams q21P InstanceParametel d31P InstanceParameters InstP rams g31pt InstanceParameter id x value 6 Figure 32 Valid snapshot prior to adding an invalid MODIFIED event with no parameters Figure 32 above shows a snapshot of an invalid MODIFIED event which is invalid because it specifies no parameters c Shortcut to USE 2 6 2 use bat gnods gtd invalid modif ied cmd gt gnods gtd invalid modified cmd gt InstGoals gnods gtd invalid modified cmd gt insert CinstTree g i gt into InstGoals gnods gtd invalid modified cmd gt tinsert CinstTree gi1 gt into InstGoals gnods gtd invalid modified cmd gt tinsert CinstTree g21 gt into InstGoals gnods gtd invalid modified cmd gt tinsert CinstTree g31 gt into InstGoals gnods gtd invalid modif ied cmd gt gmods q gtd invalid modified cmd InstGoalParams gnods gtd invalid modified cmd gt tinsert cgi g 1P gt into InstGoalParams gmnods gtd invalid modified cmd gt tinsert gil gi1P gt into InstGoalParams gnods gtd invalid modified cmd gt insert 9g21 g21P gt into InstGoalParams gnods gtd invalid modified cmd gt tinsert g31 g31P gt into InstGoalParams qgmods qtd invalid modifi
171. tUl message String void actionPerformed e ActionE vent void Hm ouseClicked e M ouseE vent void make Controller AbstractPart registerWithModel void Hinitialize void GMoDS GMoDS model model Interfac e gt gt GMoDS Model edu ksu cis macr goal m odel visualizer m odel addObserver o Observer void isA ncestorPrece dedSpec fication Goat identitier Uniqueldentifier boolean isA ncestorPostive TrggeredSpecification Goa klentifie r U niquelde ntf ier boolean isA ncestorNegative TriggeredSpecificatio n Goal identifier Uniqueldentifier boolean isCrossTreeLink dentifiert Uniquelde ntfier dentifier2 Unquelde ntfier boolean haveSameParents dentifiert Uniquelde ntfier identifier Uniqueldentfier boolean a ssessState dentifier Unique Identifier GoalState intialize Visibility void isVisible spec GoallD Uniqueldentifier boolean makeV isible spec GoallD Uniqueldentifier vo id makelinvisible specGoallD Uniquelde nt ier void getParameters identifier Uniqueldentifier Modifiablelnstance Parameters h asAncestor goa identifier Uniquelde ntfier ancestoridentifier Uniqueidentifier boolean Figure 71 GMoDS Visualizer Controller Component Classes 7 2 2 5 1 GMoDS Visualizer Controller Local Module Responsibilities Component Responsibilities GMoDS VisualizerPart Control the main view and menu items 120
172. tance goal with children 5 Click the Expand toggle for that instance goal Expected Results 1 When the Collapse toggle is clicked that instance goal s descendants are not visible 2 When the Expand toggle is clicked that instance goal s descendants return to the same visibility as prior to the Collapse 8 10 2 1 9 Test Case TC GV 9 Change Instance Goal State Colors Table 62 Test case TC GV 9 Change Instance Goal State Colors Use Cases Tested GV 3 Update Instance Tree Features Tested TF GV 3 3 Goal Diagrams 1 A goal diagram with a goal with a positive trigger and a negative trigger a lt lt precedes gt gt relation and at least on lt lt or gt gt connective Required Event 1 Any compatible event script with valid events that will cause all possible goal Scripts states to be shown in the instance tree when executed 146 Start the GMoDS Test Driver Edit Preferences and change the goal state colors as desired Click OK File Load Event Script and select the compatible script Click Play and allow the script to end Edit Preferences and change normal goal state colors as desired Click OK Procedure Expected Results The desired colors should be used during script execution The normal desired colors should replace the previous colors upon OK being clicked Flash colors cannot be changed since the script is not executing Nor e Pe pm 8 11 Environmental Needs
173. tate A Edit Preferences States Random Events Flash Period ms 2000 Flash Cycle ms 500 Click to Choose Colors for These States TRIGGERED Normal Background B TRIGGERED Normal Foreground TRIGGERED Flash Background TRIGGERED Flash Foreground OBVIATED Normal Background OBVIATED Normal Foreground OBVIATED Flash Background OBVIATED Flash Foreground Figure 98 Edit Preferences States 160 B GMops Visualizer File Edit Viev Specification Goals Instance Goals Figure 99 View Specification Goals Show Parameters 161 GMoDS Visualizer File Edit Specification Goals gt Issue R Show Goal Types gt Specifica Instance Goals lt lt and gt gt Figure 100 View Instance Goals Show Parameters Figure 99 and Figure 100 above show one can view or not view the parameters throughout the specification or instance trees Figure 101 below shows that one can view or not view all instance of any particular specification goal type If a goal type is not viewed all descendants instances are hidden 162 B GMoDs Visualizer File Edit Vie Instance Goals Figure 101 View Instance Goals Show Goal Types 163 GMopDs Visualizer File Edit View 2 Issue Random Events Play Pause Specification Goals Instance Goals Zoom Reset Zoom Zoom Zoom
174. term ineO ffsets graphics2D Graphics2D void ContainerFor determineFinalTreeSize Dimension IegetLabek String drawTree graphics2D Graphics2D originX int origin Y int maxPeerHeight int void IfgetStroke Stroke drawSelf graphics2D Graphics2D originX int origin Y int void sic 0 draw graphics2D Graphics2D void drawDirectR elations graphics2D Graphics2D void 1 relation A relations N K RelationsF rom RelationRegister pre er NegativeTriggerUI PrecedesRelationUI act Trigger H getStroke Stroke getL abel Stri 1 yeanves 1 saith J Levent SpecificationE vent a a ia SpecificationTreeCarwas T Li ing j pL pe parameterNames List lt String gt new ArrayList lt String gt PositiveTriggerUl goalUIRe gistry SpecificationG oalUIRegistry l getLabel String Lindire ctRelationRegistry IndirectRelationUIRegistry SpedificationT reeC an vas m odel GMoDSModel testDriver TestDriver createGoalUIs void createG oalUl goal ParameterizedSpecificationGoal depth int void draw void drawR elations void Indire Relations IndirectRelationUIRegistry initialize void x gt addR elationUI relationU AbstractRelationUl voi initializeGoals void drawRelations graphics2D Graphics2D void orderGoals void sortR elations void ItdetemineSize Dimension calculateR equiredSize treeWidth int Dimension
175. the percent of time spent on each type of task for the entire project Figure 115 below shows the same information for just phase 1 0 46 00 1 gt 4 36 E Coding E Designing E Documenting B Email E Presenting E Reading E Resolving Defect Figure 115 Percent of time for each task in phase 1 Figure 116 and Figure 117 below show the same break down for phases 2 and 3 respectively 176 E Coding E Designing Documenting E Presenting E Reading E Resolving defect Figure 116 Percent of time for each task in phase 2 Total E Coding E Designing E Documenting 8 Modeling E Reading E Resolving defect E Rework E Testing Figure 117 Percent of time for each task in phase 3 Table 70 below shows the actual time in hours spent in each task by phase Phase 1 was most intensive for coding and reading due to the time needed to understand the project requirements and the Java 2D technology Testing occurred in phase 3 as planned leading to most of the rework occurring then Table 70 Time in hours for each task by phase Coding Designing Documenting Modeling Reading Rework Testing Other Grand Total Phase 1 65 58 5 55 38 40 0 00 15 50 1 27 0 00 0 83 127 23 Phase 2 18 80 11 30 29 25 0 00 4 00 0 47 0 00 0 67 64 48 Phase 3 30 55 4 22 32 63 6 52 2 33 3 65 4 35 0 00 84 25 Grand 114 93 21 07 100 28 6 52 21 83 6 39 4 35 1 50 275 97 Total
176. tiveTriggerUI Provide the view for a negative trigger SpecificationGoalUIRegistry Record and provide access to the view of each specification goal IndirectRelationUIRegistry Record and manage the drawing of indirectly routed relation views InstanceTreeUI Provide the view for the instance tree InstanceTreeCanvas Draw the instance tree on an image InstanceGoalUI Provide the view for an instance goal InstanceGoalUIRegistry Record and provide access to the view of each instance goal FlashDaemon Flash each changed InstanceGoalUI 7 2 2 3 2 GMoDS Visualizer View Local Module Interface Specifications Table 37 SpecificationTreeUI Interface Specifications Draw the specification tree on the canvas Syntax draw void Pre none Post The specification tree is drawn on the canvas Table 38 SpecificationTreeCanvas Interface Specifications Assure that all instance goals in the instance tree have views Create the view for a particular specification goal Syntax createGoalUIs void Pre none Post All instance goals in the instance tree have views Syntax createGoalUl goal ParameterizedSpecificationGoal depth int void Pre goal null Post The specification goal has a view created and recorded 99 Dra
177. to specify the message sent in the next method instGoal InstanceGoalImpl gmods instTree goal gt any ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID mE SpecEvt SpecificationEvent zr gmods specTree event any se se id nextEvt specEventID in instParams oclIsNew and nextEvt param forAll np instParams param exists ip ip oclIsNew and ip id np id and ip value np value USE 2 6 2 does not appear to support the isSent operator denoted by in Warmer and Kleppe The Object Constraint Language 2nd Edition 2003 Addison Wesley pp 156 157 and gmods event instGoal specEvt instParams If preconditions are met and the next event is MODIFIED then the modifyInstanceGoal message is sent to GMoDS with appropriate parameter values post ModifiedSendsModifyInstanceGoal let nextEvt GoalEventImpl event gt at index pre 1 in nextEvt type MODIFIED implies let instParams InstanceParameters gmods instTree goal gt any ig ig instID nextEvt instGoalID and ig specID nextEvt specGoalID paramCollctn in instParams oclIsNew and nextEvt param forAll np instParams param gt exists ip ip oclIsNew and ip id np id and ip value np value USE 2 6 2 does not appear to
178. tring end AGO OG EAS DO IR OCN S GoalEventParameters a GoalEventImpl has zero or more parameters association GoalEventParameters b tween GoalEventImpl 1 role event GoalEventParameter 0 role param end Events a EventScriptImpl has zero or more events and a GoalEventImpl is associated with zero or one script association Events between EventScriptImpl 0 1 role script GoalEventImpl 0 role event ordered end GMoDSTree a EventScriptImpl has 1 GoalTreeImpl association GMoDSTree between EventScriptImpl 1 role script GoalTreeImpl 1 role gmods end SpecTrees a GoalTreeImpl has 1 SpecificationTreeImpl association SpecTrees between GoalTreeImpl 1 role goalTree SpecificationTreeImpl 1 role end specIree SpecEvents a SpecificationTreeImpl has 0 or more SpecificationEvents association SpecEvents between SpecificationTreeImpl 1 role SpecificationEvent 0 role end tree event SpecGoals a SpecificationTree ParameterizedSpecificationGoals association SpecGoals between SpecificationTreeImpl 1 role ParameterizedSpecificationGoal Impl has 1 or more tree 1 role goal end Offspring a ParametererizedSp and 0 or more children association Offspring betw
179. ubordinate views are initialized Table 17 GMoDS Visualizer AbstractCanvas interface specifications Paint the component holding the Java 2D image Create an image with a white background using the dimensions that will contain all drawing elements Determine the minimum dimensions that will contain all drawing elements Draw viewed elements on the Java 2D image Initialize the canvas Syntax paintComponent g Graphics void Pre None Post This canvas paints the component it holds that displays the image with the Java 2D drawing Syntax resize void Pre None Post This canvas calculates the minimum dimensions for its displayed image resizes it and fills it with a white background Syntax determineSize void Pre None Post The concrete canvas should calculate the minimum dimensions for its displayed elements Syntax draw void Pre None Post The concrete canvas draws its elements on the Java 2D image Syntax initialize void Pre None Post The canvas is initialized 52 Table 18 GMoDS Visualizer SpecificationTreeCanvas interface specifications Add an AbstractRelationUI to the list of relations to draw Draw the AbstractRelationUIs on the image Syntax addRelationUl relationUI AbstractRelationUI void Pre None Post The relationUI is
180. ulation components should follow these same steps except that they will skip creating a TestDriver and pass null into the constructor of GMoDSVisualizerImpl for the TestDriver parameter The figures also illustrate the initialization of the MVC architecture self Launcher l create goalDiagram null nme GoalTreelm pl initialize create goalTree testDriver GMoDSTestDriverlmpl gmodsVisualizer GM oDSVisualizerlmpl GMoDS isualizerlmpl create goalTree GoalTree testDriver TestDriver initialize T GMoDS Visualierm pl initialize i Figure 17 GMoDS Test Driver Launcher main program behavior T f T self GMoDSVisualizerlmpl T create goalTree model GMoDSModellmpl view GMoDSVisualizerUI T MoDS VisualizerU create model GMoDSM odel testDriver TestDriver create model testDriver Figure 18 GMoDSVisualizerImpl create goalTree GoalTree testDriver TestDriver 57 self GMoDSvVisualizerUl AbstradUl create model GMoDSModel testDriver TestDriver create self m odel selftestDriver create self m odel selftestDriver Figure 19 GMoDSVisualizerUI create model GMoDSModel testDriver TestDriver self AbstractUI self model model selftestDriver testDriver selfinitialized false Figure 20 AbstractUI create model
181. using Next only Expected Results 1 Debug log records that every valid event is issued to GMoDS successfully For Each Required 2 Debug log records an error for every invalid event and a popup window notifies Event Script the user of the same errors 3 The Test Driver stops issuing events upon Pause and enters manual mode Examination of the debug log confirms no event is issued while paused 4 In manual mode events are issued only after Next is selected 5 Selecting Play enters automatic mode Time stamps in the debug log confirm that the Test Driver is sleeping an appropriate time between issuing events 6 Appropriate changes to the instance tree are displayed depending on the event issued These changes include addition and coloring of goals and flashing 8 10 1 2 3 Test Case TC GTD 3 Random Event Script Operation Table 52 Test Case TC GTD 3 Random Event Script Operation Use Cases Tested GTD 2 Issue Random Events GV 3 Update Instance Tree Features Tested TF GTD 2 1 2 TF GTD 2 1 3 TF GTD 2 1 4 TF GTD 22 TF GTD 2 3 TF GV 3 1 TF GV 3 2 TF GV 3 3 Goal Diagrams A goal diagram with at least 1 precedes relation 1 positive trigger 1 negative trigger 1 lt lt or gt gt connective and 1 lt lt and gt gt connective Required Event Scripts None Procedure Click Issue Random Events on visualizer toolbar Click Play Click Pause Click Next Click Play
182. valid achieued cmd tinsert 9g21 gnods gtd invalid achieved cmd gt gmods gtd invalid achieved cmd gt use gt topenter si addEvent gel gt NotiInScript is true UalidType is true ModifiedReqParam is true UalidSpecGoal is true ValidAchievedEvent false UalidFailedEvent is true UalidSpecEvent is true recondition recondition precondition recondition precondition recondition precondition use gt S gt gt InstGoalParams InstGoalParams InstGoalParams g 1P gt into g11P gt into g21P gt into Figure 31 above shows that the script gtd invalid achieved cmd violates the ValidAchievedEvent pre condition A slight modification of this script would violate the ValidFailedEvent pre condition T1 6 4 3 Modeling a MODIFIED event isLeat false Offspring Q id g1 isLeaf false Offspring g2 ParameterizedSpecificationGoal id g2 isLeaf true Je aic vermmp type 2 MODIFIED specEventID MODIFIED specGoallD g3 instGoallD 1 q 1 InstanceGoallmpl instID 1 speciD g0 state i ACTIVE InstGoalParams pecificationGoal 3e1p SpecificationParameter SpecEventParams id g3 isLeaf true SE pecGoglParams id e1 pectpoals declaredGoallD g1 ary SpecHvents g3p SpecificationParameter pecwoals Spec rees T GMoDSTree i Goalresl InstTrees instTree InstanceTreelmpl InstGoal InstGoals InstGgals Ins
183. w the specification tree Syntax draw void on the canvas Pre none Post The specification tree is drawn on the canvas Draw all relations Syntax drawRelations void Pre none Post All relations are drawn Initialize the canvas Syntax initialize void Pre none Post The canvas is initialized Initialize all specification Syntax initializeGoals void goal views Pre none Post All specification goal views are initialized Order the goals at each level Syntax orderGoals void of the specification tree to Pre none draw relations from left to Post The goals at each level of the specification tree are right ordered so relations can be drawn from left to right Determine the dimensions of Syntax determineSize Dimension the specification tree image Pre none Post Result the total size of the specification tree image is returned Register and sort all Syntax registerRelations void relations Pre none Post All relations are registered with the appropriate views and registries and are sorted for drawing order 100 Table 39 SpecificationGoalUI Interface Specifications Determine the minimum size Syntax determineMinTreeSize graphics2D Graphics2D of the specification tree Dimension image Pre graphics2D null Post Result the minimum dimensions of the specification tree image Determine the
184. zationSimulatorExtra Javadoc Location Project References Refactoring History Run Debug Settings Task Repository Task Tags Validation WikiText Figure 95 Java Build Path Ele Edit Source Refactor Navigate Search Project Run Window Help o S amp O B o o o4 5 5 0 f Package Explorer X fg Hierarchy B s vol Ii AgentToo 3 Ej at3 GoalDiagramPlugin P 33i CollectiveBuilding Simulation cvs projects cis ksu edu Required Project Selection Properties for HuRT Shar Select projects to add O CollectiveBuilding Simulation Core Resource 1 amp DEMiR CF Share P gjDEMiR CF Share cvs projects cis ksu edu Builders iE GMoDSTestDriver Documentation b es GMoDsTestDriver cvs projects cis ksu edu 1 amp 9 HuRT Simulation b ij GMoDSvVisualizer cvs projects cis ksu edu Javaisodezsyla C1 amp OrganizationModelGenerator b x GoalModel2 cvs projects cis ksu edu P Java Compiler f HuRT Shared cvs projects cis ksu edu P Java Editor D Ey HuRT Simulation cvs projects cis ksu edu b ijOrganizationModel cvs projects cis ksu edu Javadoc Location Project References Refactoring History P ty OrganizationModelGenerator cvs projects cis ksu edu P ys OrganizationSimulator cvs projects cis ksu edu R ntieBu Settings Deselect All Task Repository P xg OrganizationSimulatorExtra cvs projects cis ksu edu Task Tags WikiText
Download Pdf Manuals
Related Search
Related Contents
1 GLS General Logistics Systems Slovenia, logistične storitve d.o.o. Anritsu PowerXpert and USB Power Sensors User Guide Baixar - Todos os Sites Pyle PDWM2600 Salon du Lycéen et de l`Etudiant de Rennes 15, 16 et 17 Janvier Samsung Galaxy Tab pro (10.1, LTE) Lietotāja rokasgrāmata Timex M515 M640 Heart Rate Monitor EP9TMXM640 3348A MANUAL DO USUÁRIO Kingston Technology ValueRAM 4GB DDR3-1600MHz ECC Copyright © All rights reserved.
Failed to retrieve file