Chapter 13 Surgery (3)

zhaozj2021-02-16  52

53. CANONICAL NOTATION UML defines a specification representation, which represents any model with monochrome lines and text. This is the standard "publishing format" of the UML model, which can be used for printing. Graphics Editing Tools can extend specifications representations and provide interaction capabilities. For example, a tool provides the ability to select the elements in the highlight. Other interactions include navigation in the model and models displayed in accordance with selected feature. This format is temporary and is not subject to UML. The interaction show reduces the ambiguity of two. Therefore, the focus of the UML standard is the specification form of printing, and an interactive tool can and should provide interaction extension. 54. The cardinality base is the number of elements in the collection. It is a specific value. The base is different from multiplex, and multiple properties are the range of possible bases that have collections. Discussion Please note that the term is used by many authors to be used for our so-called multiplex, but the base is defined as a number in mathematics, not the scope of the number. This is exactly what we use. 55. Change Event This is called a modified event due to the change of one or more values ​​referenced. See Guard Condition. Semantic modification events contain conditions specified by a Boolean expression. There is no parameters in the event. When the conditions (from fake) become true due to changes depending on the condition, the event occurs. This event implies a continuous test of conditions. In fact, by analyzing the time points of the changes to change, developers can perform tests in a well-defined, abstract time, so they don't need a continuous test. When the value of the expression is changed from a false change to true (a positive state change), the event occurs. When the event occurs once, unless the value will turn it first, otherwise the event will not happen again. Please pay attention to the difference with the condition of monitoring. When the event on the conversion occurs, the guard condition only calculates once. If the condition is fake, the conversion does not excite and the event is lost (unless this event triggers other conversions). A modification event implies continuous calculations, and when the value is turned once. At that moment, it can trigger a conversion or ignored. If it is ignored, because the condition is still triggered, the modification event does not trigger a conversion in a subsequent state. The modification event has occurred, so abandoned. The condition must become false, and then change another modification. The value of the Boolean expression must be an object of the object, which has a state machine that contains the conversion or value of the converted or value from it. The representation is different from the signal, and the modification event has no name and is not declared. They are only used as the trigger of the conversion. The modification event is expressed as the keyword when, which is the Boolean expression in the circular arc. For example: when (Self.waitingCustomers> 6) Discussion Event is a test that meets the conditions. It is very expensive, although skills to compile it without having to continuously test, but modifying events itself implies high cost and a specific relationship, ie the value of the value and the directance between the results triggered. relationship. Sometimes this is satisfactory because it encapsulates the results, but should be carefully used to use the modification. Modifying the event indicates the test of the value visible to the object. If the property change in an object means the modification of another object (this object does not know the attribute change of the first object), then this should be a modification event on the attribute owner, which triggers an internal conversion, Send a signal to the second object. Please note that a modified object is not explicitly sent anywhere. If you try to communicate with another object, signals should be used. Modifying events can be implemented in a variety of ways, and some are tested inside the application at a suitable point in time, while others are done by using basic operating system mechanisms.

56. Changeability indicates a property of a property value or whether the chain varies. Semantic this feature can assign the associated end or attribute. This feature can also be assigned to a class, indicating that all associations and attributes in this class meet this feature (for example, "frozen") indicating that the value of the object of the class is not changed after initialization). A keyword value that represents variability in the characteristic table can remove the column enumeration value. The changeable property value can be arbitrarily converted, including increasing or deleting values ​​within the range allowed by multiplex. The chain can be changed at will, or increasing or deleted within the range allowed by multiple properties and other constraints. If you do not specify another value, this is the default value. Frozen attribute value is not changed after initialization; it is not increased or deleted. When the other end associated (ie, the object is initialized with the object with the other end of the frozen value), the chain is not increased, deleted or modified. However, when the other end generates a new object, a new connection to the freezing end is generated as part of the initialization. Only addonly if the multiplex is not a fixed value, or has not reached the maximum, you can add a new attribute value. Once generated, as long as the objects of the class still exist, the attribute value cannot be changed or deleted. You can increase the new chain, but you cannot modify or delete it after it is generated. When a participant object is deleted, all of them contains all chains, whether it is "only" type, will be deleted. 57. More specific elements in the genrelation relationship. A subclass known as a class. The link of one or more sub-relations is off. Antonym: Parent) semantic child element inherits the feature of its parent element (also indirectly inherited the characteristics of its ancestors) and can declare its additional features. It also inherits the association and constraints involving their ancestors. The child element follows the alternative principle - that is, the example of the descriptor meets the variables declared by the ancestor of the descriptor. The example of the child is an indirect example of its parent. 58. Class (Class) Description A series of objects with the same properties, operations, methods, relationships, and behavior. A class represents a concept in the modeling system. According to the type of model, this concept may be the real world (for analysis model), or may also contain the concept of algorithm and computer implementation (for design models). Cyrids are genericization of classes, including other similar classes, such as data types, participants, components. The description of the data structure and behavior of the semantic to the object set is called class. Classs for declaration variables. Objects as variable must belong to a class, which should be compatible with the classes of the declared variable - that is, this class must be a class or post-edition of a declared variable. The class is also used to instantiate the object. A new instance of a creation operation generates a given class. The instance object of the class is a direct instance of this class, and it is an indirect instance of the parent class of such a class. The object saves the value of each attribute; accept all operations and signals of this class. It also appears in an associated chain associated with the parent class of this class or this class. Some classes may not be directly instantiated, but only to describe the structure of their descendum sharing; this class is called an abstract class. Classs that can be instantiated are called specific classes. A class can also be treated as a global object, which any class attribute is the properties of this implicit object. Such attributes have global, and have a unique value throughout the system. The operation of the class scope is the operation of the class itself, not suitable for the object. The most common type of scope is created. In UML, the class is a kind of element, including a series of elements similar to the class, but its full expression is still in the class. Structure A class has a name and some operations, methods, and attributes. Categories may belong to a certain association, generalization relationship, dependency, or constraint. Category is declared within its namespace, such as in a package or other class, there is different characteristics, such as multiple sex or visibility in its name domain. Class also have other different characteristics, such as explaining that it is an abstract class or a proactive class.

There will also be a state machine to explain the reaction behavior of the class - means that the reaction is received when an event is received. The class can declare the event set (including abnormal processing). Classs can be implemented by zero or more interfaces, or provide different types for a behavior implementation. The interface lists the integration set supported by the interface. Categories contain attributes and operational tables, which have established a namespace within the class. The inherited properties and operations also appear in the corresponding namespace. In the namespace of the property, there is also a dummy attribute, such as the character name of the contact, for classes, and a distinction of the generalization relationship used to involve such a ancestral relationship, each name is only in this class and its ancestors only It can be declared once, otherwise, a conflict will create an error. If the operation represented is the same, the corresponding operand is repeatable, otherwise the conflict will occur. The class is also a namespace and the scope established for the nested category declaration. Nested category is not a structural part of an example of a class. There is no data connection between class objects and nested objects. Nested classes are a statement of classes that may be used by outer classes. Class declarations within the class are private, unless clear settings are visible, otherwise it is irreparable to the outside of this class. There is no visible identifier to indicate the declaration of the nested class. It is only possible to access them only when using the hyperlink tool. Nested names must be specified with the path name. Figure 13-40 Base class declaration representation A class is represented by a rectangle of a solid border, and the rectangle is divided into three parts. Top section contains the name of the class and other features for the entire class. The middle partner contains a property sheet. The bottom portion contains an operational table. The middle and bottom can be hidden within the identification of the class. The class is declared in the class diagram and is used in many other figures. UML provides a graphical representation for the declaration and usage class, while providing a text representation in order to indicate the indicated by other model elements. The contents of the class are defined in the class diagram: the properties, operations, and other features of the class. Other graphs are defined in other relationships and accessories related to the class. Figure 13-40 shows a base category declaration with attributes and operations. Figure 13-41 shows the same as a declaration of the same class, including more detailed content, mainly related to achieving properties, such as visibility, class hierarchical scope, and dependent operations depending on the implementation. All internal information related to class is not shown in Figure 13-42. This information still appears in an internal model, usually in at least one figure. Indications Options Hide Person. Hide attributes and one or all of them (Figure 13-43). The interval that is not indicated will not appear. If a point is hidden, it cannot be inferred whether the elements are present. Please note that empty points (ie, the separation line, but no content) indicate that there is no element in the corresponding list. If a certain filter is used, the elements do not meet their requirements. For example, only public operations are visible, the corresponding operational tab is empty, and there is no public operation. Any conclusion cannot be obtained for private operations. Figure 13-41 Detailed class declarations with visibility features Figure 13-42 Examples of classes hidden in all detailed classes Figure 13-43 Hide a statement of the attributes and non-public operations. Additional tab addition points are used to represent other predefined or user-defined model features - for example to represent transaction rules, responsibilities, changes, signal processing, exception handling, and more. The top of the attached tab has a parent name and is separated from its contents with a special font (see Figure 13-44). Standard fractures (attributes, operations) do not require tandem names, although only one point is visible, you may use a parent name to exempt or distinguish. Most of the species is just a simple string table, and each string represents a feature. The "string" here includes an icon and an embedded document, such as a spreadsheet or graphic. It may also have more complex formats, but UML does not specifically explain these formats. This instruction is the responsibility of the user or tool.

If the nature of the point can be judged from the format of the content, the name of the point can be omitted. See the use of fonts (String) Figure 13-44 Declaration of classes with additional numerals Figure 13-45 Type constructive type structures with constructive types above the name of the class The text string in the book name ("") is represented (see Figure 13-45). You can also replace this line of text with icons with icons in partial upper right corners. The identity of the class with the structural icon can be "compressed" as only the type of constructive type icon of the class, and in the icon, or the name of the class is labeled (see Figure 13-170). Other contents of the class are hidden. See STEREOTYPE. Format guidance. Write the structure type above the name of the class name with normal font. Call or write the name of the class with the black body or to the left. Use normal font to align the writing properties and operations to the left. Writes the name of the abstract class with a slope letter, or the symbol of the abstract operation. At least a genus property and an operational grid (at least once in a set of pictures), you can hide them at other contexts or mentions. It is best to define a "home" for each class in a set of graphs and described in detail here. In other locations, you can use the minimization representation of the class. The concept of discussion classes is applicable to some use cases in logic modeling, but also for implementation. Including the concept of types, including the concept of the implementation of the class. In UML, in a particular semantic blur, an object can have multiple classes, and can also change the class at runtime. The definition of a more stringent-limited class is common in most programming languages, which can be considered a special class. IMPLEMETATIONCLASS, Type 59. Class Diagram Class Diagram, a static view, indicated (static) model element, such as class, type, and its elements and interrelationships. The class diagram may indicate the package, even the symbol of the nesting package. The class diagram contains some specific behavior elements, such as operations, but their dynamic feature is represented in other figures, such as state diagrams, cooperation diagrams. See Classifier, Object Diagrams Indicates that the method is a graphic manner to represent a static view. Typically, in order to represent a complete static view, there are several class diagrams. Each independent class diagram does not need to explain the division in the base model, even some logical divisions, such as the package is a natural boundary constituting the figure. 60. Class-in-state is a class, as well as the state where it might exists. See the active graph semantic with a state of state machines, each state illustrates the behavior, value, and constraints of instances in this state. In some cases, some attributes, associations, or operations are only applicable to instances of a particular one or of several states. In other cases, the parameters of an operation must be an object in a particular state. Normally, the above special case is only a portion of the behavior model. However, sometimes it is best to indicate them directly in an interactive view or a static view. The status class is still class, just a legitimate state that may have a class object. If the class has a concurrent sub-state, the status description will list several states where the objects of such classes may. The state class can be treated as a kind of element. Its behavior is similar to a subclass of the description. It can be used as a variable class or parameter class. It can participate in the association of objects that are only applicable to the given state. In Figure 13-46, please see the Assignment association between SubmittedPaper and Conference ProSession. This association applies only when SubmittedPaper is in an Accepted state (the target multiplex is 1), and there is no existence in the rejected state.

For SubmittedPaper, the target multiplex is 0 or 1, because the class is also reported in the class simultaneously. However, when the association between the SubmittedPaper and Conferenceion in the Accepted state is modeled, the target multiple is 1. Figure 13-46 Status class is also useful when the state class element is also useful when the input output value is operated in the moving figure. Indication status class class symbol indicates that after class name, follow the status name (class name [status]) in square brackets. In square brackets, several concurrent status names separated by commas can be used, indicating that the object can be several of these states. Discussion Status Class and Dynamic Cells are two different methods used to enable objects that allow objects to change structures in their life cycle. Depending on the implementation of the environment, one of them may be more convenient. 61. Class Name Each class must have a non-empty class name, which is unique to the class in the outer casing (such as package or included). The scope of the name is the class of the class, or you can see other packages of the package. See the name to get a complete description of naming and unique rules. The representation method is represented in the top of the rectangle indicating the class. There may also have a keyword or constructive name in the name division, and / or constructive type icon, and a series of tag values ​​hosted by the curneth. (See Figure 13-47). The optional type keyword in the book name can be placed above the class name, and / or indicate the icon of the constructed type in the upper right corner of the point. The structure of the structure must be repeated with a predefined keyword, such as an enumeration. Figure 13-47 Name Patches Figure 13-48 The path name of the class in other packages next indicates the name of the class, and the class name is marked with bold words in the horizontal level. If this class is an abstract class, the class name is represented by a bevel. Note that any description of any clear generalization state (such as abstraction or specific), its font should be greater than the words used by the class name. At the class name, the character string table (the properties or characteristic value of the meta) can be listed in square brackets. This list can mean that those level properties that are not symbols in the UML, and can also represent feature values. You can use some unfained keywords to represent a consortium of certain attributes and values. For example, a LEAF class represents the attribute {Leaf}, which is the same as {isleaf = true}. There is no special instructions, assuming that the class indicating that in a package is defined in this package. To reference classes defined in other packages, the syntax used as the name string in the name division (Figure 13-48) Package-name :: class-name with the name of the package with the class name Separate to provide a complete path name. If the path name can distinguish between different classes in different packages, the same class name can be used. But this situation is easy to cause errors and should try to avoid it. In the description of the text, classes are also referenced, especially in the type of attributes and variables. In a text description, a class is cited as long as it is used, including the name of the possible packet, which is obedient from the expression of the syntax rules. 62. Classifier types are model elements that describe behavior and structural features. Types of class include classes, behaviors, components, data types, interfaces, nodes, signals, subsystems, and use cases. Category is the most common class. Although each type of element has its own meta model, they can be understood in accordance with the concept of classes, but there are certain special restrictions on content and use. Most of the features of the class are applicable to class, usually only some special restrictions on each kind. See generic elements, static views.

Standard Element Enumeration, Location, Metclass (Metclass), Persistence, Strong Type (PROCESS), Semantics, STEREOTYPE, Thread ), Utility. 63. Classifier Role This is a fragment in cooperation for describing the roles of each participant in cooperation. See COLLABORATION. Semantic cooperation illustrates an interactive mode between a series of participants, it is an instance of class or data type. The class element is a description of a participant. Each role is in your own unique context, a unique use of a class. A type of element may have multiple roles, and each role has a different relationship with other roles in a cooperation. One role is not an independent object, but a description of all objects that may participate in the cooperation instance. Whenever this cooperation is instantiated, there are different objects and chains to play these roles. Each class element has a reference and multiplex of its class (its basis). Basic category limits the type of object that can act as a role. The class belonging to the object can be the same as the class of the base type, or its subclass. Multipleness Description In one example of cooperation, how many objects are used to act as this role. The type of dollar role can have a name or anonymous. When multiple types of dollars are needed, the class element character can have multiple base types. Cym roles can be connected to other types of element roles by associative roles. Object. A cooperation represents a set of objects that work together in order to complete a certain goal. The role represents the part of the object (or a set of objects) in the process of completing the target. An object is a base class directly or indirectly of the base class belonging. In cooperation, there is no need to appear all objects of the base class, and the objects of the same base class may also act as a plurality of roles in one cooperation. In different cooperation, the same object can act as different roles. Cooperation represents one aspect of the object. A separate physical object may include multiple aspects, thus implies the connection between the object and its work. Figure 13-49 Class Role Representation The Ferrary Role is a symbol (rectangle) with a class element, and the symbol has a character name and a class element name with a colonial point, ie: a role name: base class. One role is not an independent object, but a class for describing multiple objects that appear in different types of element instances. The names of role names and classifications can be omitted, but the semicolon must be retained to distinguish between a common class. In a cooperation, it is not easy to confuse because all participants are roles. Cym roles may indicate a subset of class element features, that is, attributes and operations in a given context. The remaining features that are not used will be hidden. Figure 13-49 shows a representation of different types of elements. Standard Elements are destroyed, create, temporary (Transient). 64. Customer (Client) refers to an element that requires other elements to provide services. It is used to describe the roles in dependencies. At the time of expression, the customer appears in the tail of the dependency arrow. Antonym: provider. See Dependency 65. Collaboration is a description of the total arrangement of objects and chains, which complete a behavior through interoperability in the context, such as one use case or operation. Cooperation consists of static part and dynamic part. The static section describes the roles that may bear in the cooperative examples. The dynamic portion includes one or more dynamic interactions, indicating that the message flow in cooperation in the execution calculation process. See Association Role, Classifier Role, Interacting, Message. Semantic set objects are exchanged in order to complete a target in a given context, thereby achieving a behavior. To understand design mechanisms, you should focus on objects and messages involved in achieving one or a set of related goals, which also completed other objectives in a larger system.

Arrange the object and chain work together to achieve a certain goal is called cooperation; a message sequence that implements behavior in cooperation is called interaction. Cooperation is a description of the "organization of objects". It is a fragment in a large complex model, and cooperation in the model is to achieve a goal. For example, commercial sales represent a arrangement for some objects, which have a specific interrelationship in transaction processing. This mutual relationship is meaningless outside of the transaction range. Participants in sales include sellers, buyers and agents. In order to achieve a particular interaction, such as selling homes, participants exchange specific message sequences, such as quotation or signing contracts. The message stream flowing in cooperation can be described in the state machine to describe the order of the legal behavior. The event in the state machine represents a message exchange between the characters in cooperation. Cooperation consists of roles. The role refers to a class or associated part of a work in cooperation. When instantiation, the role can have an instance of a class or associated. The same class or association can bear different roles; each role has different objects and chains. For example, in business transaction processing, one party in two companies may be a seller and the other party is a buyer. Seller and Buyer are the roles of the COMPANY class in the partner relationship. The role is only meaningful in cooperation; it is meaningless outside of cooperation. In fact, in other partnerships, the role may call. An object may be SELLER in a cooperative example, and in the other is Buyer. The same object may bear a variety of roles in different cooperation. This is different from the role in the role of the associated defined. Regardless of whether the object is involved in the association, the relationship described in the association has a global meaning of a class in all contexts. The relationship described by cooperation is limited to a particular context, and the relationship is meaningless outside of this range. achieve. Cooperation implements a certain operation or use case. It describes the context of the implementation of the implementation of the operation or use case, that is, when execution, the arrangement of the existing object and the chain, and an example generated and destroyed during the execution process. Description of behavioral sequences in interaction can be represented by sequence diagrams or collaboration. Cooperation can also complete the implementation of the class. Class cooperation is the combination of cooperation between class operations. To design different cooperation for the same class, system, and subsystems; each cooperation represents a subset of properties, operations, and related objects associated with an entity, (eg, implementation of a particular action) mode. Parameterized cooperation represents a design structure that can be reused in different design. Usually the basic class is parameter. This parameterized cooperation meets the pattern structure. See an instance of the design mode by providing a specific class element by providing the basic class element parameter. Each instance generates a cooperation on a specific class set in the model. A pattern can be bind multiple times with different types of dices in the model, thereby avoiding new cooperation for each appearance. For example, a model view mode defines a routine relationship between model elements, which can be binded to multiple model view clauses representing the model view. Each actual model view class represents a mode of binding mode. One pair of these pairs may be images in housing and homes, and the other pair may be a stock and represent a graphic of the current price of the stock. Note that a model also includes the use of guidance, as well as a clear description of the advantages and disadvantages. These content can be used as a comment, or written in a separate text file. Hierarchical cooperation in cooperation can be represented on a different granular level (Granularity). A coarse granular cooperation can be further refined to become more detailed in another particle size. This is the refinement of a high-level cooperation to low-level cooperation by extending one or more operations. Cooperation can also be implemented through sub-collaboration. Each subordinate cooperation implements a portion of the entire function and has its own independent role set. Each role in the overall cooperation can be bound to one or more roles in the nested portion. If an outer role is bound to a plurality of inner-layer roles, it implies a connection to a low-layer cooperation. This is the only way to interact between use. A design idea is outward from the inner layer.

First, the inner layer, defining the role, and then combines them to generate an outer layer, and broaden the character makes it have multiple responsibilities. Binding during runtime. At runtime, objects and chains are bound to the role in cooperation. Usually in different cooperation, an object can be bound to one or more roles. If an object is bound to multiple roles, it represents a "accidental" interaction between the characters - that is, this interaction is not inherent by the role itself, but only they are in a wider context. A side effect. Usually an object is responsible for a plurality of collaborations that make up large cooperation. This overlap of this cooperation provides an implicit, cooperative control and information flow. Structural role. A cooperation includes a range of roles, each character is a reference to a plurality of basic class (class element characters) or basic association (associated role). The role is a location in cooperation, which describes the use of a class or associated in the work. The role itself is also a class element, and the role of the cooperative instance is bound to the object is a temporary instance of the role. In an example of a cooperative, each class element role is bound to an object, and each associated role is bound to a connection. In an example of the same cooperation, an object can be bound to multiple type element roles, but this is uncommon, and can be avoided by appropriate constraints. In an example of the same cooperation, the object of the same class can act as a different role. Each object has a relationship that is compatible with its role. Each type element character has a subset of the properties of the class used in cooperation. The rest of the attribute is independent of the cooperation, but it may be useful in other cooperation. If there is a multi-role, each role should have its own name to distinguish. If a base class element is used in cooperation, the role can be no name because the class is not confused. The role defines the structure of the cooperation. If you support multiple classifications, the role can have multiple basic class elements. The object bound to the class element is an instance of each base class. General. A cooperation can also include generalization relationships and constraints. This is a supplement to the relationship that may have a relationship that is possible in its respective outer cooperation. Under the use of class elements in cooperation, the generalization is necessary. Otherwise, their generalization structure is just a part of its class definition, and cannot be changed in cooperation. In the parameterized cooperation (mode) certain types of element roles may be parameters. The generalization relationship between two parameterized categories indicates that any class dollar bound to the role must meet the generalization relationship. (Binding to the parent role must be a ancestor binding to the child character class. There is no need to be a parent child relationship between them.) For example, [gamma-95] Composite mode represents an object recursive tree, where Component is The general element of the tree, Composite is a recurrent element, Leaf is a leaf element (Fig. 13-50). Component is the parent of Leaf and Composite. Component is an element of the assembly (loop). Component, Composite, Leaf is the parameters in the model. When the model is used, they are replaced by a specific class. Any specific class that bind to the mode must follow Component and the ancestors - progeny relationship between LEAF. Specific examples can be Graphic, Picture, Rectangle; DirectoryEntry, Directory, File; or any recursive class. If a binding does not satisfy the generalization constraint, its form is wrong. Figure 13-50 Mode: A parameterized cooperation constraint. Parameterized and non-parameterized characters can have their constraints. These constraints are supplements to the class constraints bound to the role. Constraints apply to any instance of cooperation. news. Cooperation can be described by a series of messages to describe its dynamic behavior. Cooperation with messages is called interaction. There can be multiple interactions, each interacting illustrates one of the same cooperation.

For example, an interaction can describe an implementation of an operation and another interaction indicate another operation. The message has the order information in which the order of information sequence is the same as the state machine that is defined by the message trigger. Resources. Cooperation may represent a class, use case, or method (cooperation is an implementation of an operation, not an explanation). Cooperation describes the behavior of the source element. Representation cooperation diagram is represented by the symbol (rectangle) of the class, the associated path (solid line) represents a message symbol on the associated role. A cooperation figure without messages indicates the context of interaction, and does not represent interactions. It can be used to represent a single operation context, and even a context of all operations in one or set of classes. If the zipper is marked with a message, the graphic can represent an interaction. Typically, an interaction is used to represent an implementation or use case. The cooperation diagram represents the position of the object as the type of element role in cooperation. The difference between the type of element role and the class is that it has both names and class names, syntax: role name: class name. Role names and class names can be omitted, but the colon must be retained. The chart also shows a chain between objects as an associated role, including a temporary chain representative of process parameters, local variables, and self-link. Multi-correlation role If you connect with different classifications, you can have the same associated name. The arrow on the connection indicates the navigation in the direction of the arrow. (Arrows on the line between objects indicate that the connection is only single-direction navigation. Arrows adjacent to the line indicate that the message flows in the connection line. In the one-way connection, the message cannot be returned, so the message flow must be Compliance with navigation arrows.) Single attribute values ​​in class elements are usually not explicitly marked. If the message must be passed to the attribute value, the property should model the property to use the associated object. Other graphics can also be used as a keyword, or replacing it. For example, each life period can be represented by different colors. You can also use animation to express the generation and destruction of elements, and the state of the system within a different time. Implementation of an operation indicates the cooperation of the operation implementation includes symbols of the target object role, as well as symbols of other objects that are directly or indirectly used when the target object is implemented. The message on the associated role represents a control flow in interaction. Each message indicates a step in the method of operation. A cooperation description operation includes a role symbol that represents the operational parameters and the local variable generated in the execution. The object generated in the execution can be specified by {new}; the object destroyed in the execution is specified by {destore}; generated in the execution, then the object destroyed is specified by {transient}. There is no keyword, exists before the start of the operation, and the object that is still present after the operation is completed. Implementing the internal message used by a method is numbered, starting from the 1st. For a process of control flow, sequential message numbers are used in the "Dot" method, and sorted in the nested hierarchy. For example, the step of the second layer is message 2; its next step is 2.1. All message numbers are in the same layer. (That is to say they have no nested relationships). See the message (Message) to fully understand the message syntax, including the order. Complete cooperation diagrams show the role of all objects and chains in the operation. If an object is not indicated, it is assumed that it is not used. However, it is assumed that all objects in the cooperation figure are not safe to use. For example, in Figure 13-51, the Redisplay object calls the Controller operation. When the operation is called, it has been connected to the Window object that will display the image. It is also connected to the Wire object, which will be displayed in the window. The fixed layer implementation of the Redisplay operation is only one step - calling the DiaPlayPositions in the Wire object.

The serial number of this operation is 1 because it is the first step in the uppermost method. This message stream is passed to the reference to the Window object that will be used later. The DisplayPositions operation calls the DrawSegment operation in the same Wire object, the number of this call is 1.1, which is passed through the SELF chain. Star symbol indicates the repeat call of the operation; the details are described in square brackets. Each DrawSegment operation accesses two bead objects, numbered I-1 and i, respectively. Although in this context, there is only one association between Wire and BEAD, but two chains that point to two Wire objects are needed. Objects are marked with LEFT and RIGHT (these are classified roles in cooperation). There is a message delivery on each chain. The message number is 1.1.1a, 1.1.1b. This indicates that they are the steps of operation 1.1; the last letter indicates that two messages can be passed in parallel. In the usual implementation, they may not perform parallel, but they can be performed in any order because they are declared parallel. Figure 13-51 Collaboration with a message flow When two return values ​​R0, R1 can be performed, another step below operation 1.1 can be performed. Message 1.2 is a creation message passed to the Line object. In fact, the message reaches the LINE class (at least in principle), the message creates a new Line object that is connected to the sender. The new object comes with label {new}, indicating that it is created during the execution of the operation and will continue to exist after the operation is completed. The newly created chain has a label "local" indicating that it is not an association, but a local variable in the process. The local variable is temporary, and it will disappear after the process is completed. So don't need to add tag {transient} for it. Step 1.3 Send a Display message through the newly created link to the newly created Wire object. Pointer to the pointer to the Window object is passed as a parameter so that it can be accessed by the Line object as a "parameter" chain. Note that the Window object connected to the LINE object is the Window object associated with the original Controller object; this is important for operations and is marked in the figure. In the last step 1.3.1, you will ask the Window object to create a connection to the LINE object. This connection is an association, so it has a character name Contents and is labeled {new}. Imagine that all temporary connections are wiped, get the final state of the system. Between Controller and Wire, and between Wire and its partial bead, both Controller and WINDOW, Window have a connection between its contents. However, once the operation is complete, Wire cannot access Window that contains it. The connection in this direction is temporary, and it disappears when the operation is completed. Similarly, Wire objects can no longer be accessible to the LINE object that represents it. Instance-level Collaboration is similar to many model elements, and cooperation can be represented by a descriptor or examples. A descriptor collaboration represents a possible relationship between objects; cooperation can be instantiated multiple times to generate a cooperation example. Each cooperation example represents the relationship between a particular object. Which form should be used to model a scenario? If the figure shows possible events, you must use the descriptor level cooperation diagram. The object map has no chance. They do not have conditional judgments or cycles; these are the contents of universal descriptions. An example does not rate the value range, or many possible control paths; it has only one value and the only history. If the figure shows the specifically or parameter specific value, if the diagram shows the specific number of variable size multiplexes, or if the diagram represents a specific choice for a branch or loop in the execution, such a picture Must be a instance-level cooperation diagram. In many cases, both views can be used. This is like this when there is no branch in the calculation.

If any execution is its prototype, there is not much difference between the descriptor form and the instance form. 66. Collaboration Diagram Represents a view of the interaction between the role - ie, the instance of cooperation and its chain. Unlike the sequence diagram, the cooperation map is clearly expressed in the relationship between the characters. On the other hand, the cooperation map does not represent the time as a separate dimension, so the sequence number must be used to determine the order of the message and the parallel thread. The sequence diagram and cooperation maps are similar information, but different methods are used. See the position of the object or chain in collaboration (SEQUENCE DIAGRAM 67). It illustrates the types of objects and chains that may appear in the cooperative example. See association role (ASSOCIATION ROLE), Classifier Role, COLLABORATION. Semantic cooperation roles are describe objects or chains. However, it does not represent separate objects or connections, but when cooperative is instantiated, the location can be replaced by an object or connection. Cooperation can be a type of element role or an associated role. A type of element role has one or more basic class, which can be instantiated as an object. The associated role can have a foundation association and can be instantiated as a chain, which can be associated instance, or an instance of its progeny. In many cases, the association is only defined in cooperation - ie, saying that it only appears on the object that is responsible, and it is meaningless after leaving the cooperation. In this case, the base correlation can be omitted. Association is implicitted in cooperation, not available elsewhere. The representation of the representation can be a class or associated role. The type element role class element is a class element, represented by the rectangular symbol of the class. Usually only the name point. Name points include string classifierroleName: baseclassifierNameList, if necessary, the base class name can include the detailed path name of the outer bag. (The tool can allow simplified path names when it is not confusing. The name of the package is preceded by the class, and is separated by a double colon. For example: Display_Window: WINDIWINGSYSTEM :: GraphicWindows :: WINDOW CET role can include the text form of the curly brackets indicates above the name string, or the form of the icon is indicated in the upper right corner. A type of element role is a structural type that must be matched to its basic type of cell. Represents a series of objects of a series of objects, contains multiple indicators (e.g., "*") in the upper right corner of the rectangle frame of the class. It illustrates the number of objects that can be bound to this role in one example of cooperation. If the indicator is omitted, the value takes 1. The name of the type of element role can be omitted. In this case, the class name is to keep the semicolon. Representative anonymous objects. If you support multiple classifications, the roles may have multiple elements. Object is an example of each of them. Classs of type dollar characters can be hidden (including semicolons). For objects or chains created in interactions, there is a keyword NEW in their roles as constraints. For objects or chains destroyed in interactions, the character has keyword destroyed as constraints. Even for an element that has no name, you can use the keyword. Two keywords can be used at the same time, but the keyword transient can be used instead of New Destroies. Associated role. The associated role is an association that is represented by the path between the two type element character. The path can be assigned in the following form: associationroleName: BaseAssociationName There is no foundation association if the name of the base association is omitted. The role name of the base association and other modified components will be represented on the path. If the associated role path is connected to a class role greater than 1, the associated end plus a multiplex indicator to emphasize. Figure 13-51 is an example of an associated role.

68. Combination links two partial descriptions of the class to consist of a complete descriptor of an element, and the interrelationship between the two parts is called a combination. See Extensions, including (include). One of the powerful functions of semantic oriented objects can be combined with an increasing manner model. The inheritance mechanism will be combined with the generalized class dollar to generate an effective full description of the class. The other two methods of combining the descriptor are to use extensions and related relationships. (The generalization can also be listed under this entry, but due to its special importance, it is used as an independent basic relationship). The representation is expressed in a dotted arrow with a structural type keyword. See Extensions, including (Include). It is also possible to discuss other kinds of combinations. Some programming languages, such as CLOS, achieve a number of different functional powerful methods. 69. Comment (Comment) attached to a single element or an annotation. Note There is no direct semantics, but it can represent semantic information or other information, such as constraints or methods for the modeling or tool. See Note Semantic Note Include text strings, if the tool allows, you can also have an embedded file. Note You can attach a model element, represent an element, or an element set. It provides a text description for any information, but there is no semantic role. The comment is to provide a model that can be used to search for a model. The symbol indicating the comment indicates that the rectangle ("Dog Ear") is folded down in the upper right corner ("Dog Ear"), and is connected to one or several elements of the annotated (Fig. 13-52), and the tool can use other forms. To represent or navigate out information, such as pop-up memo, special font, and more. Standard Element Demand, Responsibility. N Fig. 13-52 Note 70. Communication Association describes the association of communication relationship between element instances connected to each other. In the configuration view, it is an association between the nodes containing the communication relationship. In the case model, it is the association between the use of the participant associated with communication. See the participant (actor), use case 71. Column (Compartment) closed graphicization of the shape symbol, for example, divided into a small rectangle of the rectangular level of the class. Each point indicates the part of the attribute it represent. There are three denses: fixed, list, regional. See Class, Classifier. Representation The fixed graphic form and the text portion represent the fixed attribute. Graphical form is determined by element species. For example, class name points, which contain strings, class names, class names, representing different features of the class. Some of some of them may be hidden depending on the elements. A list of points contains an encoding table for an element component. An example is an attribute table. The encoding is determined by the type of ingredients. The order of element tables can be their actual order in the model, or sorted by one or more characteristics (in this case, natural order will be invisible). For example, the list of attributes can be sorted according to the visibility, then sort in the name. Depending on the characteristics of the model element, the entry in the table can be expressed or hidden. For example, attribute points may only represent public properties. The structured and keywords can be used to use the list entry to apply them to each independent component. The structural and keywords can be included separately to all sequential components. They can affect all sequential components until the end or another such statement works. The "constructor" is listed separately in the operation table, and the subsequent operation can be constructed as a constructor, and the subsequent character "query" will revoke the previous declaration and use the "Query" constructor instead of it. The area is a region containing a sub-map representing an element sub-structure, usually implied with recursive.

For example, a nested state diagram. The nature of the sub-map is the model element. In a symbol, it includes a legal, but will appear confusion. Regions are commonly used for circulating elements, while text is used for leaf elements without cycling sub-structures. A class has three pre-defined dense: name, a fixed point; attribute, a list of points; operation, also a list of points. Model designers can add other points in the rectangle and mark their names with different fonts (e.g., black body) at the above. Graphical syntax depends on the type of element and tissue. Figures 13-53 show signal dense. Figure 13-54 shows responsibilities. Figure 13-53 Name in the class 72. Compile Time refers to the situation when compiling in the software model. See Modeling Time, Run Time 73. Completion Transition refers to a conversion that does not have a dedicated trigger event, but is triggered by the activity in the source state. See Activity, Transition, Trigger Semantic completion conversion means that the conversion of the event is not explicitly triggered. The conversion source is completed after any activity (including the nested state), the conversion implicit trigger. In the constituent state, the completion of the activity is represented by the reach. If there is no internal activity or nested state, once the portions and export activities are completed, the completion conversion will be triggered immediately. If there is a nested state or activity, there is no output conversion with a trigger event, and the conversion is not necessarily possible. When the status of the package is still waiting to complete its activity, an event may trigger the conversion of the internal state so that the completion of the conversion may be skipped. Complete the conversion contains monitoring conditions and one activity. There is usually no need to have only one monitoring of completion conversion, because if the conditioning condition is not satisfied, the completion of the conversion will never happen (because the implicit trigger condition only occurs once). Sometimes if the trigger conversion will take the object with a dead state, some errors may also be useful. In more case, a series of surveillance completion conversions cover all possible conditions, under these conditions, when the status is end, one of the completed conversions will be triggered immediately. Figure 13-54 Completing conversion completion conversion is also used to connect the initial state and historical state to its rear state because these pseudo-states will not remain active after completing their activities. Examples Explanations 13-54 show the state machine model pieces of the booking program. When the customer selection date, the Selecting status will always be active. When the customer presses the "Done" button, the Selecting state reaches its final state. This triggers complete conversion, transfer to the Selected state. 74. Complex Transition refers to more than one source state and / or more conversion of more than one target state. It represents a response to an event that causes concurrent number. Depending on the source status and the number of target status, it can be controlled synchronization, controlled bifurcation, or both. See branch, composite state, bifurcation (JOIN), merge (MERGE). Semantics look from the upper layer, the system has experienced a series of states. However, from the overall point of view, for large systems with distribution and parallelity, it is considered that the system is not enough to explain the problem. There are a variety of states at the same time. These active status sets are active state structures. If a nested state is active, all states containing this status are active. If the object allows concurrent, there may be multiple concurrent lables to be active. In many cases, the activity of the system can be modeled to some-independent or interactive control threads. Each conversion can only affect a small portion in the active state structure. When the conversion occurs, the unaffected active status continues to remain active. A thread at a certain moment can be considered a sub-state in the active state structure, each thread corresponding to a sub-state. Each sub-state has an independent response to the event.

If the number of active events is fixed, the status model is a collection of some interactions of the fixed state machine. However, the number of usual states (and the number of control threads) varies over time. One state can be converted to two or more concurrent status (control branches), two or more concurrent states can be converted to a state (combination of control). The number of concurrent status and changes is controlled by the system's state machine. Complex conversion is a conversion derived or pointing to a series of concurrent state. Complex conversion has more than one source state and / or target state. If the conversion has multiple source status, it represents the combination of control, if a conversion has multiple target status, it represents the controlled bifurcation. If it has multiple source status and target status at the same time, it represents synchronization of the parallel thread. If a complex conversion has multiple source status. Only when these sources are active, the conversion is likely to be triggered. The order of these states is activated is irrelevant. If all source status is active, the event occurs, the conversion will be triggered, and if the conditioning condition is met, the conversion will be excited. Each conversion is only excited by an event even if there are multiple source states. UML does not support multiple events; each event triggers a separate conversion, which is then connected to the resulting state by the control combination point. If a complex conversion with multiple source states does not trigger events (ie, to complete conversion), the conversion will be triggered when all source states are activated, and if the guard condition is satisfied, the conversion will be excited. When complex conversion is excited, all sources and the state in the same composition becomes inactive; all target status and the status in the same composition become active. In more complex cases, the monitoring conditions can be further extended so that the conversion is allowed to be excited when some sub-state activities. Examples Examples 13-55 are a typical concurrent composition state with complex conversion entrance. Figure 13-56 is a typical execution process record of the state machine. (The active state is expressed in blue). The record indicates that the number of active status of different times is different. Figure 13-55 Branch and binding. The concurrent state unless the structure is very careful to design its structure very carefully, a series of complex conversions may result in inconsistencies, including deadlocks, and multiple occupants. The theoretics of Petri Nets fully studied these issues, and the common solution is to introduce good structural rules in the state machine to avoid inconsistency. This is the "structured programming" rule of the state machine. There are many different implementation methods, each has an advantageous. UML acceptance rules require the state machine to refine the state machine. The advantage is that a well-defined nested structure is easy to establish, maintained, and understanding; the disadvantage is that some meaningful structures are hidden. All in all, this is similar to the practice of giving agreed using a goto statement for a structured program. A complex state can be decomposed into several mutually exclusive sub-states ("or" decomposition), or decomposed into several concurrent states ("decomposition). The structure is recursive. Usually "or" layer can be replaced with "or". "Contract" and "indicates concurrency decomposition - all sub-state concurrency activities;" or "layer represents the order decomposition - only one sub-state is active each time. The node of the recursive expansion tree can be started from the root node to obtain a legal concurrent state sequence. Replace "with" in all sub-states; instead of "or" with a certain state. The nested structure of this status map corresponds. Figure 13-56 Active Status Recording of concurrent state machines Examples Explancils 13-57 represent states and / or trees corresponding to the state machines of Figures 13-55. A typical concurrent active state is labeled blue. This corresponds to step 3 of Figures 13-56. Figure 13-57 Nested state with / or trees If a conversion enters a concired region (region), it enters all sub-states. If converted into the sequential area, it only enters a sub-state.

The active state in the sequential area can vary, and in the concurrent area, as long as the area is active, all sub-states are active. However, usually each concatenation state is further decomposed into sequential regions. Therefore, simple conversion (with a source state and one target state) must be connected to the state within the same sequential area, or both only "or" layer separated. Complex conversion connects all the sub-states in a concurrent area to one state outside the concurrent area. (We ignore more complex situations, but they must also follow the above principles). In other words, the conversion of the concurrent area enters all sub-states, while the conversion of the departure area is also left all of the sub-state. A simplified representation can be used: if complex conversion enters the concurrent area but omits one or more sub-regions, the conversion indicating the initial state of the steering sub-region can be omitted. If a sub-area does not have an initial state, the model structure has an error. If there is a complex conversion exiting the concurrent area, the conversion emitted from each omitted sub-region is implicit. Once the conversion occurs, all activities in the sub-zone will terminate - that is, forcibly exiting. The conversion can be connected to the packaged concurrent area itself, which implies a conversion indicating the initial state of the respective concurrent sub-regions - an ordinary modeling situation. Similarly, the conversion derived from the packaged concurrent area indicates that the forcibly exits each sub-region (if there is a trigger event) or waiting for the sub-area to end the operation (if there is no incident). The complex conversion rules ensure that the combination of unspeakable status is not concurrently active. A series of concurrent states are part of the composition of the package, and they are either active, or they are either. The conditional thread is in the active diagram, with a bifurcated line segment can be a conditional thread. When the conversion is excited, only the thread with the monitoring symbol is initialized when the guard condition is satisfied. Things without a conditioning condition initialize immediately after the conversion is excited. The concurrency in the activity diagram must be reasonable nested. - There must be a corresponding combination point after each branch point. If a condition thread fails because the conditions are not satisfied, activities on this branch line are considered to have been completed - that is, the conversion is no longer waiting for the control flow of this conditional thread. If all threads in the bifurcation fails, the control will immediately start from the matching point. The condition thread is equivalent to a branch and merge, which is in the conditional portion in the active chart. Examples Examples 13-58 are active diagrams with two conditional threads. It represents a boarding process. At the beginning, passengers must first show a ticket. There are then 3 concurrent threads, two of which are conditional threads. The seat arrangement must always be carried out, but only when the passengers have baggage, there is only a baggage check, and only international flights have a passport inspection process. When three threads are all completed, control the combination, point to a single thread, returns the ticket and boarding the passengers. If a conditional thread is not able to start, it will be considered to be completed by the subsequent control combination point. Figure 13-58 Condition thread representation complex conversion with short crude strips (indicating synchronization and / or branch of synchronization). There may be one or more solid-line conversion arrows to point from the state (this state as the source state); there may be one or more arrows pointing from the bars (this state target state). The conversion label is indicated on the stick edge to describe triggering events, guarding conditions, activity, interpretation under transformation. Each independent arrow does not have its respective conversion identity strings, which are only part of the entire conversion. Examples of Figure 13-59 The state machine of 13-55 increases exit conversion. It also indicates implicit bifurcation from the initial state of the SETUP state to the initial state of each subdomain, and the implicit binding of the normalization from each sub-region to the Cleanup state. If event f1 occurs when the B2 state activity occurs, the conversion of the Cleanup event will occur. This conversion is an implicit bond point, which is also terminated both the state B2 and ends state A2.

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

New Post(0)