Chapter 13 Surgery (4)

zhaozj2021-02-16  54

80. Composite State contains a status of parallel (orthogonal) or order (mutex) sub-status. See complex conversion, Simple State, State. The semantic composition state can be used to decompose to a parallel status status, or by "or" relationship is decomposed into mutually exclusive mutually exclusive. State refinement can only use one of two ways. Its sub-state can also be further decomposed in one of two methods. If a sequential constitution state is active, only one sub-state is active. If a concurrent composition status is active, all the sub-status orthogonal is active. The decomposition result is one with or tree. Each state machine has a top-level state, which is constituent. A plurality of states can be included at the same time. The active state set is called the active state structure. If a nested state is active, all of all components containing it are active. If the object allows concurrent, there may be multiple concurrent matrix states to be active. See complex conversion to understand concurrent execution; Figure 13-51 shows a tree or tree. The newly created object begins with the initial state, which is a state in which the outermost component must be included. Creating an object of an object can be used to trigger a transition that leaves the initial state. Discussion on creating events is also applicable to initial conversion. The object that is transferred to the outer term will be destroyed and stopped. Structure A constituent status includes a series of sub-states. The constituent state can be concurrent or sequential. One order constituent status can have an initial state and a final state, and can also be up to a shallow history state and a deep (DEEP) historical state. A concurrent composition state may not have an initial state, a final state, or a historical state. The constituent states nested in them can include these pseudo-states. The constituent state of the representation is a state in which the subordinate detail is included. It comes with a name division, internal conversion tab, and graphics. The graphics are useful in the nested diagram of the details. All points are optional. For convenience, the text fractal (name of the components and internal conversion points) can abbreviate tabs in the graphic fractal without levels extending. The graphic fractures are divided into sub-regions with dashed lines, indicating that the concurrent composition state is divided into concatuous state. Each sub-area represents a list of lists, and its name is optional, but must include a nested state diagram of a sub-state with a mutective. Separate the entire state of the text with the solid line. In the graphic division, the status extension is used as a sub-state with a nested state table diagram. The initial state is represented by a small solid circle. In the top-level state machine, an event that is derived from the initial state may be marked with an event. Otherwise the conversion must be a label. If there is no label, it represents all transitions to the package state. The initial conversion can have an action. The initial state is a symbolic device, and the object may not be in this state, but must be converted to the actual state. The final use of the outer sleeve of the rings (the eye). It represents the completion of the activities in the package. It triggers conversion on a package state that is implicitly completed (usually without label conversion). Figure 13-66 Sequential composition state Examples 13-66 show a state in which the two mutual mutual use states, one initial state, and a final state. When the constituent state is activity, the sub-state START (the target state of the initial state) first becomes active. Figures 13-67 showing concurrent composition states with three orthogonal states. Each concatenator state is further divided into sequence state. When the constituent state INCOMPLETE is active, the target state of the initial state is active. When the three sub-states reach the final state, the completion of the external components is triggered, and the passed is active. If the FAIL event occurs when INCOMPLETE is active, all three concurrent sub-status ends, and failed is active.

Figure 13-67 SAITS 81. Composition refers to an aggregated association with a strong main relationship with a strong lifetime. A portion can only be constructed. Some of which do not have a fixed multiple can be created after the composition is created. But once you are created, these parts will exist at the same time and die at the same time (shared survival cycle). These parts can also be removed before the composition disappears. The composition can be recursive. See aggregation, association, constituting objects (Composite Object). Semantic with strong aggregation associations is called composed. The composition is an aggregation association with additional constraints, an object can only be constructed at a certain time, and the composition object is fully responsible for all the components. As a result of the first constraint, all the sequences of all constitutive relationships (all associations with composition properties) form an object and a constituent chain. A component cannot be shared by two constituent objects at the same time. This is in line with physical composition concept - a portion of the direct component of two objects (although it can indirectly into multiple objects in different granular levels). The composition is responsible for its components, refers to it is responsible for the creation and destruction of its ingredients. In the implementation, it is responsible for the memory allocation of the ingredients. In the instantiation process, the composition must ensure that its ingredients have generated examples and correctly connect them. It can generate ingredients yourself or take responsibility for existing parts. But in the constituent life, there is no other object to be responsible for its ingredients. This means that designing formal class behavior should be understood that there is no other class that can be destroyed or repositions them. In the lifetime, the composition can be added if the ingredient is responsible, and the additional portion (if multiplex is allowed). It can move ingredients if the compliance allows and other objects to arrange their responsibilities. Once the composition is destroyed, it must destroy its ingredients or give their resettlement rights to other objects. This definition summarizes the universal logic and realization characteristics of the composition. For example, a record with a values ​​is a common implementation of an object and its properties. When the assignment space is recorded, the storage space of its attribute is automatically assigned, but the attribute value needs to be initialized. When the record is present, its properties cannot be moved. When the recording is made, the storage space of the attribute will also be protected. Other objects cannot affect the spatial allocation of the properties in the record. The physical characteristics recorded compatible with constrain constraints. The consisting definition is convenient for useless cell recovery. If it is destroyed, the only pointer to its ingredient is also destroyed, and the component will not be accessed, and it is easy to recover unused units. Retrieving Upper Access Units is very simple for useless unit recovery, which is a reason for distinguishing composition and other aggregates. Note: The constituent does not have to be implemented into the physical ingredients in the composed of memory blocks. If a component is independent, the composition is responsible for assigning / dividing the storage space as needed. For example, the implementation of constructors and destructive functions in C . An object can only belong to a constituent object at the same time. This does not exclude a class of components that become multiple classes at different times or in different instances. But at the same time, an object can only exist in a constituent chain. In other words, an ingredient may belong to the composition of "or" relationship. An object can be ingredients of different constituent objects in its life cycle, but only one constitutive objects each time. The aggregation characteristics of the structure associated end can be the following values: None attached elements are not aggregated or constructed. The attached element of AGGREGATE is aggregated and the other is its ingredient. Composite is constructed, and the other end is its ingredient. Associated at least one end should be None. The representation is constantly constituted by a solid diamond shape with one end connected to the constitutive element. (Figure 13-68). Multipleness is represented by conventional methods, must be 1 or 0..1. Figure 13-68 Composition Relationships In addition, the composition is indicated by a symbolic nested component symbol (Fig. 13-69). Nested types can be multiplexed in its composition elements.

Multiple sex is indicated in the upper right corner of the symbol of the ingredient. If multiplexes are omitted, the default value is "more". Nested elements in the constituting relationship can have a character name. The role name is marked before its type, the syntax is: ROLENAME: ClassName Its role name is an implicit role name that is associated from constituting to its ingredients. The association painted in the constituent relationship boundary is considered to be the composition of the composition. Any object from such a link coupled to a link must belong to the same composition. The association that is exceeded in the constituent relationship is not constituted, and the object of such associated chain links can belong to the same composition, or may belong to different components. (Figure 13-70) Figure 13-69 Graphic Nested Composition Relationship Figures 13-70 Association noted about the composition, the attribute is actually a constituent relationship between the class and the attributes of the class. (Fig. 13-71). However, the usual property is preserved as a basic type value (number, string, data), not a class reference. Other relationships are not seen in the attribute representation. Note that the composition is similar to the representation of cooperation. When all participants in cooperation are the only components of the object, the composition can be seen as a cooperation. Figure 13-72 is a multi-component. Figure 13-71 Attribute is a form of forms in Figure 13-72 Multiple composition discussions (see gathering discussion, what to understand, constitute, and simple associations) Composition and aggregate are constant - they exceed a single association Constraints for the entire system. The composition is defined in the constituting relationship. A object can have a constituent chain (to compose), but may be from multiple components. Even if the connection chain is connected to different associations, the entire chart consisting of composition and aggregation chains and objects must be ring. Note that these constraints apply to the example domain - aggregation association itself is often ring, and the recursive structure also requires the association. Consider the model in Figure 13-73. Each Authentication is an integral part of the transaction, which is the transfer of Purchase or Sale. But not every transaction requires an example of Figure 13-73 to abstract composition classes. Figure 13-74 Shared part of the class Authentication. From the figure, you can derive the Authentication without other constitution associations. Each Authentication object must be an integral part of a Transaction object (multiple); one object can only belong to a composition (depending on the definition); Authentication is already an integral part of an object (as shown), so Authentication cannot It is another component that is associated with other components. You can manage your own storage area by Authentication. Although not all transaction has an Authentication that needs to be managed, it can always be taken to assume management responsibility. (Of course, if the designer needs, Authentication can manage yourself) Now consider Figure 13-74, AutograPH can be optionally part of Transaction or Letter. But it is not possible to simultaneously belong to both (determined by the rules of composition). The model allows Autograb to be the part of the link, then the part of the transaction (at this point, AutograPH must not be part of the Letter). In fact, AutoGraph does not have to be part of any object. And from this figure we cannot rule out the possibility of the AUTOGRAPH to become the class of the class or later increasing class. If you emphasize AutoGraph must be part of Letter or Transcation? This requires a redesign model. As shown in Figure 13-73, there can be a new abstract superclass (called Document) on which a Letter and Transaction is added therein.

And the composition of AutograPH is connected from the original class to Document. At the same time, the multiplex of AutograPH to Document is 1. Figure 13-75 The generalization of the associated generalization has a small problem: Document to AutograPH must be set to optionally, thereby weakening the transaction to the forced containment of AutoGraph. The model can be established in this case as shown in Figure 13-75. The composition between Autograph and Transaction is set to the composition associated with the composition between AutograPH and Document. Multipleness is declared for children (note that they are still consistent with the ancestors, so use children to replace their parents). In addition, by adding constraints on two constitution, it is necessary to select one of both, and the original model can be used. 82. Concrete refers to an extensive element (such as class) that can be directly instantiated. Its implementation must be fully described. For classes, all of its operations must be implemented (by classes or their ancestors). Antonym: A Direct Class, instantiation semantics only the specific class can be instantiated, so the leaf node of the generalization system must be specific. In other words, all abstract operations and other abstract properties must eventually be implemented in a descendant. (Of course, when the program is not completed, the abstract class may have no specific progeny. For example, the framework to be expanded. But these classes cannot be used in implementation before providing specific descendants). The name indicating the specific element is represented by a conventional font, the name of the abstract element is used as a bevel. 83. Concurrency executes within the same time interval, execution of two or more activities. These activities are not implied. Usually, in addition to a clear synchronization point, their activities are independent of each other. Concurrency can be implemented by inserting or performing multiple threads simultaneously. See complex conversion, constituting status (Disjoin), thread. 84. Concurrence Substate A sub-state that can be simultaneously present in other sub-states in the same composition state. See the Composite Transition, a Disjoin Substate 85. Conditional Thread activity diagram, starting from the gifted monitoring input segment, an area of ​​the input segment of the corresponding bond point ends. See the composite state, complex transformation 86. Conflict means a situation or operation of inheriting the same name from several classes, or an event triggers multiple conversions, or other may be possible Causes of contradiction results. Depending on the different model elements, conflict is used to resolve conflicts, and conflicts may be legitimate but generate an uncertain result, or it may indicate an error in model form. Discuss conflict resolution rules can avoid conflict. For example, if multiple classes define the same feature, this feature of the first superclass is used (this requires superclocking). UML usually does not define conflict resolution rules because they are dangerous. Conflicts are easily ignored, often the cause of deeper problems in the model. It is better to request a precise system with the rules that depend on these subtle and easy to confuse. Such rules are present in some tool or programming language. Preferably, when using these rules, tools give a warning to make the modeling the appearance of conflicts. 87. Constrain it is a semantic condition or limiting expression. UML predefined some constraints, others can be defined by the modeling. Constraint is one of the three scalable mechanisms of UML.

See Expression, STEREOTYPE, Tagged Value. See Chapter 14 Standard Elements, there are predefined constraints. Semantic Constraints is some semantic conditions or restrictions expressing the statement of statements in text language. Usually constraints can be attached to any one or a column model element. It represents semantic information attached to the model elements. Each constraint has a constraint and translation language. The restraint is a string of Boolean expression on conditions in the constraint language. Constraints apply one or a column of model elements. It should be noted that the language here can be a formal language or a natural language. If it is a natural language, the constraint is non-form, and it cannot be automatically executed (but the formal constraint is not necessarily automatically executed). UML provides constraint language OCL [Warmer-99], or other languages ​​can also be used. Some common constraints have a name, thereby avoiding the complete statement when using each time. For example: the difference between the two shared associations between the associations (XOR) constraints represent an object of the shared class only belongs to the associated party. See Chapter 14 Standard Elements, you can see a pre-defined constraint list in UML. The constraint is not a mechanism that can be performed, but an assertion. It means limits that must be implemented by the correct design of the system. How to ensure that the constraint is a designed task. At runtime, constraints acts on the "stable" time of the system instance - that is, the intermediate time of the operation of the operation and the moment when the atomic conversion is being performed. During the execution of an operation, it may be temporarily violated at some time. Constraints cannot act on itself. Even the additional constraints are defined, the inheritance constraint - the constraint defined on the ancestral model element or the structure of the structure must be observed. Inheritance constraints cannot be ignored. If there is such a need, it means that the structure of the model is not good, it should be reconstructed. However, limit conditions can be added to enhance inheritance constraints. If the inheritance constraint of the elements conflicts, the model is a non-rootic structure. The text string representation of the scratches ({}) is indicated. The text string is a code body written in a constraint. Tools should provide one or several formal constraint languages. A predefined language that describes constraints is OCL. Depending on the model, some computer languages ​​(such as C ) can also be used to represent constraints. In addition, constraints can also be described in natural language. At this time, the translation and execution of constraints are completed. Each constraint is part of the constraint, but is not indicated in the figure. (The tool will retain its record). For a column element represented by a string in a division (eg, attributes): constraints may be used as the entrance to element columns (see Figure 13-76). The entry does not represent a model element, but a running constraint acting on the model elements listed thereafter. The role range until another run constraint, or elements are columns to the head. Running constraints can be replaced by new constraints that appear later in the list. To eliminate running constraints, you can replace it with empty constraints. A constraint attached to a list element cannot replace running constraints, but can increase additional limits for them. For simple graphics symbols (such as classes or associated paths): The constraint string can be marked on the edge of the graphic symbol, if the graphic symbol has the name, it is marked on the side of the name. Figure 13-76 Constraints 13-77 constraint representations for two graphics symbols (eg, two classes or two associations): constraints are represented by dashed arrows for two graphics symbols (eg, two classes or two associations): Arrows are connected from one element and have a constraint string (in large brackets). The direction of the arrow is related to the information of the constraint. For three or more graphic symbols: Constrained annotation symbols, and connected to individual graphics symbols with dashed lines (Figures 13-77). This representation is suitable for other situations. For three or more similar paths (such as generalized paths or associated paths), the constrained label is on the dotted line through all paths.

To avoid confusion, different wirings can be labeled or tagged to establish a correspondence between them and constraints. The discussion constraint is the semantic representation of the model itself, and the comment is no semantic effect and can be attached to the model element and the text statement indicating the element. Constraints and comments can be represented by a comment symbol. In principle, the constraint is performed by the tool. In practice, some constraints are difficult to formulate, and they should be enforced by manual. In general, many elements in the model are constrained, but the constraints here refer to binding statements that must be expressed by the built-in model elements. Constraints can be used in a variety of languages, even using human language, but tools do not verify the constraints of human language descriptions. OCL Language [Warmer-99] is an expression for UML constraints, but in some cases, some programming languages ​​may be more applicable. Because constraints text string indicate that ordinary modeling tools can be read and maintained without understanding their meaning. Of course, tools or plugins used to verify or perform constraints must understand the syntax and semantics of the target language. Some constraints can be attached to the constructive definition, which means that all elements that belong to this configuration are under these constraints. When there is constraints in the model, it is not necessarily required to give the constraints to be violated. The model is just a statement that may occur, so that these situations occur. A program can include assertion and other verification mechanisms, and violation of the constraint should be considered as a program failure. Of course, this model reaches the target if the model can help generate the correct or verified programs. Standard Elements INVARIANT, Postcondition, precomient. 88. Constructing the third phase of the software development process, performing detailed design, system implementation, software, firmware, and hardware testing. At this stage, analytical views and design views are basically completed and most implementations and some deployment diagrams. See the Development Process. 89. Constructuring a functional domain operation of the instance of the constructor created and initialized, can be used as a constructor of the operation. See Create, instantiation 90. Package Container contains objects of other objects, which provide an operation of access or iteration, or a class describing such objects. For example, an array, a list, a collection. See aggregation, composition discussions usually do not have to model the container. They are usually implemented by the associated "most" end. In most models, the multiplex is more than 1 sufficient to indicate the correct semantics. When the design model generates code, the package container class for implementing the associated can be specified as a code generator using the tag value. 91. Context and a view of a model element set of a target, such as performing an operation or constructing a model. Context is part of the model, which makes constraints or provides an environment for the elements. Cooperation provides context to its content. See collaboraion. 92. Control Flow In interaction, the relationship between the subsequent trajectory of the controlled subsequent trajectory. For example, an active map or cooperation. See Action, Action, COLLABORATION, Completion Transition, Message, Object Flow State, Translation Semantic Interaction View Represents Calculation Process Control flow in. The original elements in the interaction are activities and objects. Control flow represents the relationship between activities and its participants and subsequent activities, and the relationship between action and its input and output objects. In a simplified format, the control stream is an object to another object, or a derived calculation between an object between different versions of different times. (Configuring the object input and output is referred to as an object stream).

The representation is represented by a message indicated by an associated role (representative link) of the connection class role (representative object and its example). In the active diagram, the solid arrow between the control flow activity symbol is represented. The object flow activity symbol or the dotted arrow between the control flow arrow and the target stream status symbol. See the relevant chapter to make further understanding. 93. Control Icon is a brief representation of the optional symbols of various control modes. See Activity Graph, Collaboration, State Machine Representation The following symbols are designed to be active, but can also be used in the state diagram. These symbols do not allow those that cannot be represented by basic symbols, but for conventional control modes, they are convenient and practical. The branch branch is a series of transitions issued by a single state, and there must always be a conversion monitoring condition to be satisfied. In other words, if a trigger event occurs, only one conversion can be excited. These monitoring conditions represent the branch of the control. If it is completed, a branch is a Pure Decision. For convenience, there can be a branch output being labeled "ELSE". If you don't choose other paths, take this. The branch is represented by a diamond shape with an input arrow and a plurality of output arrows. Enter the arrow indicate the trigger event (if any), each output is marked with a guard condition (Fig. 13-78). Combined with two or more optional control paths aggregated. It is opposite to the branch. The rhombus is also a sign of branches and combines. If there are multiple inputs, the symbol represents mergers. If there are multiple output arrows, the symbol represents a branch (Figure 13-78). It is not necessary to have a merger (multiple converted into a single state called merging), but they are still very useful for the matching of previous branches. Signal reception signal reception concave pentangular representation. The content of the signal is marked in the symbol. From a non-tagged conversion arrow pointing to the pentagon from the front-driven state, the other without label points from the five-side shape to its subsequent state. This symbol replaces the event tag on the conversion, which is triggered when the event occurs after the forefront activity (Fig. 13-79). Further, the dotted arrow can be used from the object symbol to the pentagon gap, indicating the sender of the signal. Signal transmission signal transmission is represented by a convex pental shape. The content of the signal is labeled in the symbol. There is a non-label conversion from the front drive to the pentagon, and the other without label is directed by the heave to its subsequent state. This symbol replaces the "Send Signal" tab on the conversion (Figure 13-80). In addition, you can use the dotted arrow from the pentagonal vertex to the object symbol, indicating the recipient of the signal. Figure 13-78 Branch and Figure 13-79 Signal Receive Figure 13-80 Signal Sending Examples Figure 13-81, EntercreditcardData and ChargeCard are active. When they are completed, the next step is performed. After the ENTERCREDITCARDDATA is completed, the branch according to the amount is displayed: If the required amount is more than $ 25, the certificate is required. A Request signal is sent to the credit center. In a normal state machine, it can represent an activity on the conversion from EntercreditCardData; the two senses. AWAITAUTHORRIZATION is a waiting state. It is not an internal completion of activities, but must wait for an external signal from the credit center (Authorize). When the signal appears, a regular conversion is triggered, and the system enters ChargeCard activity. The trigger event can be used as a label on the conversion between the AWAITAUTHORRIZATION and the ChargeCard, both of which are different representations of the same thing.

转载请注明原文地址:https://www.9cbs.com/read-25108.html

New Post(0)