Font Size: a A A

Algorithm Research Of Generating Statechart Based On Scenarios And Building Implied Scenarios From Synthesized Statechart

Posted on:2006-02-13Degree:MasterType:Thesis
Country:ChinaCandidate:K ZhangFull Text:PDF
GTID:2168360155952984Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Software modeling is an important part of software engineering. It builds views and models of the system in diverse viewpoints or abstract facets. These models support the whole development from requirement acquiring to coding. Realizing the transition between these models helps retain the consistency of different models during the process of development and helps generate system prototype rapidly. In his paper, we study an approach to transforming the scenario models to statechart automatically, and study the method of getting new scenarios from the statechart generated. That is, this paper presents a method to generating the statechart of an object in Object-Oriented development process. Developers can get the behavior models of objects based on the requirement description. Scenarios describe the communication among objects which is organized to accomplish a function of the system. Statecharts explain the state transformation of an object in its lifecycle. It is lack of semantic information in the scenario models that we first extent the concepts of "state variable"and "state vector". State variables include not only the object's attribute variables which describe the state of object modeled, but also other object's attribute variables which denote the system's circumstance. We call the former "object state variables"and the vector formed by them is "object state vector". The latter is called "system state variables", which form "system state vector". We use Object state vector to describe the object's state, and use system state vector to constrain the generation of reasonable state transition path. Because there is no enough information about object states in scenarios, this paper presents a series of rules to analyze the use cases. There is precondition, postcondition, base flow and alternative flows in use case description. According the description, we can get the conditions under which messages happened. Attribute variables in these conditions are the basis of state vector, and we can supplement or abridge the state variables in state vector. The integrality of the state vector depends on the use case description. Using the object state vector, the semantic information of object state is added to the scenario models. After that, we give a statechart generation algorithm, which is convenient for extending the new scenarios based on the statechart existed. This algorithm falls into two phases. The first is the generation of "object scenarios statechart". In this phase, we play emphasis on the combination of the same state node in the statechart, it is the basal statechart which helps to extend. The second phase is to reduce the "object scenarios statechart"to "object statechart", that is resolving the problem of combining the adjoining nodes which have the same state. Object statechart is the final result of the method. According this method, we append an object a state vector to every state node in the statechart. In the statechart generated, there perhaps exists some unexpected state transition paths which are not described by the scenarios existed. The rationality of these paths determines the rationality of the statechart, so we design an algorithm to differentiate these paths and judge the validity of the paths. Based on the unexpected paths, this paper presents an approach to generating implied scenarios. Implied scenario is an instance of an use case, which is recognized during the process of statechart generating and not described in the scenarios models existed. This approach introduces the concept of "object scenario message snip". Using the unexpected state transition paths in the object statechart, we adjoin the every object scenario message snip of every transition to get the implied scenario. Implied scenarios are important to elaborate the use case description and generate the test cases. This paper provides a serial of algorithms to insure the validity of statechart and implied scenarios generated. These algorithms are: generating object scenario statechart; combining the adjoining nodes which have the same state; confirming the correct unexpected state transition paths; building object scenario message snips; and building implied scenarios. In the paper, we designed a example of elevator system. Using this example, we show how to get object state variables from use case description, how to generate object statechart through scenarios, and how to gain the implied scenarios. Finally, we realized a small system to validate this method. Compare with Whittle's and T. Syst?'s approaches, this approach has advantages as follows: using use case description to get the most semantic information of object states, and insure the reliability of statechart; based on the statechart generated, developers can supplement the new scenario conveniently; discussing the overgeneralized problem about state transition path, and give the method to identify the reasonable unexpected transition...
Keywords/Search Tags:Synthesized
PDF Full Text Request
Related items