Requirements Engineering Formal Analysis of the Shlaer-Mello(11)
发布时间:2021-06-08
发布时间:2021-06-08
In this paper, we define a number of tools that we think belong to the core of any toolkit for requirements engineers. The tools are conceptual and hence, they need precise definitions that lay down as exactly as possible what their meaning and possible us
are defined, whose argument is of type M I X I N G T A N K . A mixing tank would then migrate between its subclasses by changing the truth value of these class predicates. We noted earlier that role-playing can be represented by a many-one relationship with the constraint that an existing role can only be played by an existing player. This poses no special problems for the formalisation.4. The State Model 4.1. StructureFor each object class or relationship with interesting behaviour, a state model can be defined that represents the typical life cycle of class instances. The instantiation of a state model for class instances is called a state machine in OOA. Each class instance has a state attribute that indicates the current state of the object in its state machine. State models and state machines are finite state automata, which can be represented in two (equivalent) ways: the Mealy and the Moore representation, shown in Fig. 4. Both representations in the figure show a transition triggered by input event e. The transition in turn triggers output action a. In the Mealy representation a is performed during the transition and in the Moore representation, a is performed upon arrival in the destination state. Hence, in the MealyFormal Analysis of the Shlaer-Mellor Method113I$1e/at$2$1tMoore representationS2/aMealy representationFig. 4. The Mealy and Moore representationsof finite state machines.representation, output actions are attached to transitions and in the M o o r e representation, output actions are attached to states. A M o o r e representation can be transformed into an equivalent Mealy representation by moving the output action of each state to the incoming transitions of the state; conversely, a Mealy representation can be transformed into a M o o r e representation by introducing additional states in such a way that the incoming transitions of each state generate the same output actions, and then moving the output actions to the states [39,44]. The Moore representation is convenient if all transitions entering a state generate the same actions; otherwise, the M o o r e representation tends to have more states than the Mealy representation. This is illustrated by the methodological analysis below. O O A uses the Moore representation of finite state machines. A n example of a state model using the Moore representation is given in Fig. 5. Each event in a state model is an incident to which an object in the system must respond. The event may be generated by an object in the system, or it may be generated in the environment of the system. The state machine responds to an event by performing an action. O O A allows the following actions [17,45]: 9 Read or write attributes of any object in the system. 9 Perform any calculation. 9 Generate an event. This event may be received by the environment of the system, by another object, or by the object itself (in its next transition). 9 Create, delete, set, reset or read
上一篇:学院电视台节目策划书