节点文献

利用scenario获取对象状态图的算法研究与隐含scenario的获取

Algorithm Research of Generating Statechart Based on Scenarios and Building Implied Scenarios from Synthesized Statechart

【作者】 张可

【导师】 金淳兆;

【作者基本信息】 吉林大学 , 计算机软件与理论, 2005, 硕士

【摘要】 软件建模是面向对象软件工程的一个重要领域,实现这些模型之间的自动转换,对于保持系统开发过程各阶段中模型的一致性,及快速生成系统原型有着重要的意义。本文在现有工作的基础上提出了利用需求分析过程中的scenario 模型来自动生成对象状态图模型的方法,并对应用生成的状态图获得新的scenario 的方法进行了讨论从UML 建模角度,对象状态是指对象的生命期中的一个条件或状况,在此期间对象将满足某些条件。本文据此提出了利用用例描述来获取对象状态的方法,并扩展了“状态变量”和“状态向量”等概念,给出了在这些概念基础上进行状态模型生成的具体步骤。同时,利用在状态图生成过程中形成的合理的未预期状态转换路径,能够生成已知scenario 模型中未提供的scenario 描述。

【Abstract】 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

【关键词】 Scenario状态状态图用例描述
  • 【网络出版投稿人】 吉林大学
  • 【网络出版年期】2005年 06期
  • 【分类号】TP311.52
  • 【被引频次】3
  • 【下载频次】69
节点文献中: 

本文链接的文献网络图示:

本文的引文网络