Chapter 13 Surgery (7)

zhaozj2021-02-16  47

216. A semantic variant of multiple inheritance, wherein the elements can have multiple parents. This is the default setting in U / NL, in most cases, the modeling can also set the used elements. Contrast: Single inheritance. 217. MultiPlicity Description Allows the range of choles, such as the size of the set can be set. Multiple indication may be used in associating ends, part of the components in classes, and other destinations, etc. In essence, multiple sex is a subset of non-negative integers (possibly unlimited). Contrast: The base of the collection. See the multiplicityof association, multiplicity of classes. Semantic multi-weight is a description of the size of the collection. Concept, it is a subset of non-negative integers. In fact, it is a limited integer set, a region between the maximum and minimum values. Any collection must be limited, but the upper bound can be limited or unbounded (unreasonable multiple "is called" many "). The upper bound must be greater than 0; otherwise the multiplex is not large, because it only allows empty sets. Multiple sex is represented by strings. Typically, multiplex is an integer range - there is a maximum and minimum. But it is usually a collection of discontinuous non-negative integers. Integer sets may be unlimited - that is, the upper bound may be unlimited (but each particular base in the collection is limited). In practice, this integer set can be declared as several mutually exclusive, not connected integer areas. The area refers to a continuous integer between the maximum and minimum values. Some unlimited sets cannot be said, such as even set, but this simplification means that too much information will not be lost. In the design, multiplexes are usually only used with an integer area with upper and lower limits, because multiple properties are only used to define the maximum storage space that may be required. See the associated multiplicity and class of multiple properties to further understand the use details of these elements. The representation of the method is expressed as the text form of an integer area list, and the area format is: minimum. . The maximum value, the minimum and maximum value is an integer, or the maximum value is "*", indicating that there is no upper bound. Expression 2. . * Reads "two or more". The format of the area can also be: the number number is an integer representing a single size area. Multiple expression * and 0 containing a single star. . * Isometric, indicating that no limit ("0 or more, no restrictions"). This common multiple sex is called "many". Example 0..110 .. ** 1.. * 1..61..3, 7, 10, 15, 19. * Style Guide * It is recommended to use the area of ​​increment order. Such as: 1..3, 7, 10 to 7, 10, 1..3 good. * 2 connected areas are connected to 1. For example, 0..1 is better than 0, 1. Discussion Multiple expression can contain variables, but must be replaced with an integer after the model is completed - must be parameters or constants. Multipleness is different from the dynamic array boundary, and cannot be changed at runtime. It is used to illustrate the range (worst case) of the value that may occur in the collection, the application's data structure and operation should match it.

It is a constant when modeling, and if the running boundary can be variable, the necessary multiple "is" many "(0 .. *). Multi-weight may be omitted, but it hides exists in the model. In the completed model, there is no meaning for multiple sex. I don't know that multiple sex and declare it as "many", because at this time to be selected can be any, this is the same as "many" definitions. See unspecified values. 218. The multiplex declaration of associated multiplexes. See multiple times (MultiPlicity). Semantics define multiple objects in the associated end, indicating how many objects can be available in this location. For binary associations, the multiplicity of the target end limits an object of the source that can be associated with how many objects of the target class. Multipleness is given as an integer area (see multiple sex). Common multiplexes are 1,0 or 1,0 or more unlimited, 1 or more unlimited. "0 or more unrestricted" is called "many". In the N-element association, multiple properties are defined at each N-1 dimension. For example, the three-dimensional association between the given classes (A, B, C), and the multimode of the C-terminal will show how many objects can participate in the associations of A and B. If multiple sex is (many, many, 1), for each (a, b), only one C value; there are many A values ​​for each (B, c), but A, B, C Many values ​​can participate in the association. See the discussion of N-dimensional multivultors in the N-dimensional association. Representation Multiple Nature is marked on the side of the path (Fig. 13-126) N1..N2. See multiple times to further understand the grammar and specification description (may be more widely used than most practical applications). 219. (Property) MultiPlicity (OF Attribute)) Each object may have attribute values. Multipleness of semantic properties Description How many values ​​can be available in this property. Common multiplexes are (1..1), that is, 1 value of each object, other 0 or 1 (optional or null), 0 or more unlimited (set of values), 1 or more unlimited (non-empty set). "0 or more, no restrictions" are called "many". Indicates that the method is labeled in the parentheses after the name in the individual, and there is a colon (Fig. 13-127), if not marked, the multiple is 1 (default). 220. (Class) Multi-Multi-Multi-range - how many instances can be present at the same time. Semantics For classes, how many instances can be made, the default value is unlimited, but sometimes it is also useful.

Especially when declaring a single class - only one instance class, you need to create content and parameters of the entire system with multiplexes. In cooperation, it also uses the multiple of the class, which indicates how many tie examples can be included in the class character role in a cooperative example. Indicates that the multiplexity of the legal or class is marked in the upper right corner of the rectangle (Figs. 13-128). When multiplexes are many (unlimited), the string can be omitted. Figure 13-128 Multipleness 221. The association between 3 or more types of n-ary assistation. Contrast: binary correlation. Semantics Each associated example is from the N-group value value of the corresponding class. A class can appear in multiple locations associated. The binary relationship is a special case, a simplified representation and a unique attribute (such as navigation), which does not make sense to N-yuan association (at least quite complicated). The N yuan association can declare multiple sex, but it is not easy to understand as binary relationships. The multiplexing of the associated end illustrates the number of native values ​​when the value of the additional N-1 end is determined. This definition is also suitable for binary correlation. The aggregation (including composition) is only for binary associations, and the role associated with N-yuan cannot be composed or aggregated. There is no semantic difference between the binary relationship and only the N yuan association between the two ends. There is a 2-side association being considered to be binaryization, and there are two upper associations to be regarded as N metabolies. The representation of the n-element association is expressed as a large rhombus (larger than the path endpoint), and the path to each participating class is introduced by the rhombus. Associated name (if any), labeled the rhombus edge. The modification is marked on the endpoint of each path as the binary correlation. There can be multiple sex, but there is no eligibility limit and aggregation. The associated class symbol can be connected to the diamond symbol with a broken line, indicating that the attribute, operation, and / or associated N-element association. Examples Examples 13-129 show a team of the highest record holder in each season. Recording the holder can transfer during the season and leave a record in other teams. Record this, each connection is independent. Style Guide usually, the line starts from the midpoint of the rhombus vertex or a somewhere. The definition of multiple sex is performed in other N-1 dimensions in discussing the N-element associations. For example, the three-dimensional association (A, B, C), and the multimode of the C-terminal, and how many C objects can be present in the association between each A and B pairs. If multiplex is (many, many, 1), there is only one C value for each possible (A, B). For a given one (b, c) pair, there can be multiple a values. Many of the respective values ​​of each of A, B, and C participate in the association. In the binary relationship, the definition is simplified into a multiplex of the associated end to the other end. Only definition of multiple sex is meaningless (as proposed by some authors). Because of any meaningful N-element associated end, multiple properties are many. Otherwise, the N-element association can be simplified into a class and a binary association between associated classes containing other classes, which is easier to implement. Because the binary relationship is more easy to implement, and it is preferable to avoid the N-element association. The N-yuan association is only useful when all values ​​are required to determine a connection. Typically, the N-element correlation is implemented as a class, and the properties of the class contain pointers to the participating objects. Depending on the metallic connection because there is no iterative connection in the association. Consider the example of electing a professor within the semester (Figure 13-130). Students will not have multiple times to select a professor's same course, but they can choose a few different courses from the same professor. A professor can teach multiple courses. Multipleness is shown in the figure. The multiplication of Professor is (0..1), and other multiplexes are many (0.3). Each multi-weight value is in terms of other end objects.

For (courses, students), there can be 0 or 1 professor. For (student, professor), there can be many courses. There are many students in pairs (courses, professors). Note: If the association is classified, there may be multiple identical (student, professors, courses), which is undesirable. 222. The name is used to identify a string of the model element. See Namespace. Semantic names are an identifier - a limited character sequence pre-defined in a certain programming language. Implementation methods can specify the format of the name, such as certain symbols (such as punctuation), and the initial rules, etc. In particular, it is considered that the name can be used to find and search for primary keys in different data sets. For example, Rome fonts typically have uppercase and lowercase, numbers, separators (such as underlined characters), while other punctuation symbols depends on concrete implementation. Tools and programming languages ​​can specify the length of the name and the range of characters used, which are stricter than the restrictions on the comments. The name is defined in the namespace, such as a package or class. In the namespace, the name must be unique in its semantic group, such as class, status, attribute, etc .; the names in different groups can be iterated (but should also be avoided). Each namespace belongs to a larger namespace. Nested names and their external names and the name of the outermost element can be represented by a name path. The name of the representation is expressed as a string. Names are usually listed separately as a line. The normative name format includes characters, numbers, and underscores. If an implementation allows other characters, some characters may be encoded to prevent confusion. This is the responsibility of tool implementation. The names of different hierarchy spaces separated by double slash can constitute a path name. 223. Part of the Namespace model, the name is defined here and used. During the namespace, each name has a unique meaning. Semantics all named elements are declared in the namespace, and their names are also the namespace. The top-level namespace is a package (including subsystem) or the included, the purpose of the included is mainly group organizations to understand and access ease of human understanding, and integrate the model as easy-to-computer storage and maintenance in the development. Basic model elements, including classes, associations, state machines, and their respective content (such as attributes, associated ends, state machines, cooperative roles) namespaces. The range of each model element is described in respective introductions. Each model element has its own namespace. The name defined in the namespace must be unique (this is exactly the purpose of using the name). Given the namespace and name, you can find specific model elements (if it has a name - some elements are anonymous, you must look for its association with its elements). The namespace can be nested, given the nested namespace name, you can find it. The package can access or import another package to access its namespace. The system itself defines the outermost namespace, which is the foundation of all names. It is a package that is usually with several layers of nested packages until the name of the final basic element is obtained. The performance represents the method of the method (passing through several nested namespaces) is connected by a namespace (such as package or class) named with double semicolon (: :). Userinterface :: Helpfacility :: Helpscreen224. Nave that you can get one or several objects associated with the instance of the class with binary associations in the expression of the class. This concept is not suitable for N-yuan associations (see text). Navigation is an enumeration type, and the value can be true (navigation), FALSE (not navigation). See Navigation Effcience.

Semantic Navigation Description Role Name can be used for expression to pass through an object of the object with this role name to reach another associated end. If navigation, the association defines the pseudo properties of the class of the class of the other associated end of the role name - that is, the role name can be used for the expression of the class as the attribute, and obtain a value. The role name is also used to express constraints. No navigation specifies that the class "can't see" associated with the other end, so it cannot be used to form an expression. The association without navigation does not create a dependency between the source class to the target class, but there may be other clauses to create such dependencies. No navigation is not to say that there is no way to pass through the associated method. If possible from other directions through the association, you can search in an instance of the other classes to find the class to the object, thereby crossing the association. This method is only available in a small range. N-yuan associations cannot define navigation because it requires a set of navigation for a collection of classes. This is achievable, but it is too complicated as a basic attribute. This is not to say that the N-yuan association cannot pass, but such a rule is too complicated, it is difficult to define the Boolean value. Navigation is usually related to navigation efficiency, but there is no strict requirement in UML rules. Representation Navigation Association Represents an arrow on the associated path on the target class. Arrow illustrates the direction of crossing (Figure 13-131). Navigation modifier can be omitted (all associations in the figure). Arrows can be drawn on 0, 1 or two associated ends. For convenience, the association of bidirectional navigation can be omitted. In theory, this may be confused with two directions, but in fact, this association is actually, so it can be specifically shown. There is no need to mark the navigation of "Unexpected". If no navigation is determined, you can also get a common state. Discussion on navigation is only for it or not restrictions. Figure 13-131 Navigation 225. Navigable) A navigable can be used to cross the association or linkage in the expression. Its navigation properties are TRUE. This link is usually implemented with one or several arrows. See Navigability, Navigation Efficiency. 226. Navigation Cross connections in the figure, especially in the binary link in the object model, and the properties in the object model, thereby obtaining the mapping value of the object. In the latter case, the navigation path can be represented as a sequence of the attribute name or the role name. See Navigability. 227. Navigation efficiency (Navigation Effcience) Indicates whether it is possible to effectively through an object to a binary association with one or several objects. This concept is not suitable for N-yuan associations. Navigation efficiency is related to navigation, but not the properties it defines. See Navigability. Semantics can define navigation efficiency in conformity to abstract design and various programming languages. If the cost of the associated object collection is proportional to the number of objects in the collection (not the upper bound of a collection, it may be endless) plus a constant, it is considered to effectively navigate. When calculating complexity, it costs O (n). If multiplex is 1, or 0, 1, the cost of access must be a constant, which can be obtained by changing the length list. A minimum cost of the permissible navigation efficiency definition is log (n). Although a navigable association that is typically used in a block embedded in a block containing an object property, a hash table can be used to achieve an external implementation, and a average access is taken in the table. In this way, the association can be implemented as a check table operation for external objects outside the class. (Some real-time conditions should specify the cost of the most -h-changing situation, not an average cost. Don't change the basic definition, just replace the worst case, but can no longer use the hash table and other algorithms). If navigation can not be made in a given direction, it is not entirely unable to cross, but the overhead of crossing will be large - for example to find in a larger table. If the access in a direction does not appear, the surfract table is a reasonable choice. Navigation efficiency is the design concept, which allows designers to understand the overhead of access.

Typically, navigation implicit navigation efficiency. Maybe (if few) has an association that cannot be efficiently navigated in both directions. This association may be implemented as a collection of connections, and the collection must be searched when navigating in any direction. This is possible, but the efficiency is very low. In summary, this associated range is small. Discussion Navigation Efficiency Description Gets to get the efficiency of the object collections associated with a given object. When multiplex is 0..1 or 1, it is clear that a pointer to the source object is achieved. When multiplexing is "many", it is usually implemented as a class containing many pointers. The class itself may reside on the data record of the object of the class. This is determined by whether it can be obtained by the overhead constant (the conventional situation of pointer access). The included class must be efficient navigation. For example, all associated lists are not efficient because the object's connection and many useless connections are mixed together, you need to find it. According to the list of elements, it is efficient because unnecessary lookups are avoided. In the association of qualified qualifications, the setup navigation representation from the eligibility element indicates that the object or object collection can be efficiently obtained by the source element and the qualifier. This is consistent with the implementation of the index binary tree lookup with a hash table or according to the limit (this is the purpose of the purpose of the model as the model concept). 228. Node (Node) node is a physical object at runtime and represents a computing resource. Usually at least there is at least store space and execution capabilities. Runtime objects and runtime components can reside on the node. See location. Semantic nodes include human resources or mechanical processing resources in computing devices and (at least commercial models). The node can be represented by a descriptor or instance. The node defines the position that can calculate the instance resident when runtime, which can calculate the instance includes an object and component instance. Physical nodes have more features such as capabilities, throughput, reliability. UML does not predefine these properties, but they can be established in the UML model or tag value. Use the associated connection node to represent the communication path. These associations can have a structure type to distinguish different communication and communication. The node is the inheritance section in the view, and does not belong to the analysis view. The configuration model represents a node instance instead of a node type. Although the node type is of great significance, the type of each node is usually anonymous. The node is a class element that can be attribute. Typically, the node instance is represented in the deployment diagram. The descriptor of the node is very small. The representation of the representation of the node looks like the direction of the cube. The syntax of the node descriptor is that the node type is where the node type is a class element name. Node instance has names and type names. The node has the name of the underscore in the node, or below the node. Syntax of the name string: Name: Node type where the name is the name of each node (if any). Node Type Description It is a type of node. Both elements are optional. Depending on the arrow (dotted arrow of arrow pointing components) is used to represent the ability of the node type support component type. It can be used to declare dependencies using the structure type. Components instances and objects can be represented in node instance symbols. This shows that the element resides on a node instance. It is also possible to expire the relationship with the aggregation and constitutive association path. The node is connected with an associated symbol. The association between two nodes indicates the communication path between them. Association can have a structure type, indicating the characteristics of the communication path (eg, the type of channel or network). Examples Figures 13-123 illustrate two nodes including an object (family), which moves from one node to another node. The movement 229 between the nodes 13-132. Note (Note) indicates a symbol of the note or other text information, such as the method or constraint. The representation is expressed as a rectangle that is folded downward in the upper right corner. There is a text that does not have UML translation, or the expansion of text (such as embedding file). Note You can provide information for different model elements, such as notes, constraints, methods, and more. Note Normally does not explicitly explain the type of element that is explained, but it can be seen from the format and in use. Note You can be connected to the element with a dashed line. If the comment explains the plurality of elements, the dashed line points to each element. Note You can have the keyword to explain its meaning, such as the keyword "constraint" means that this is constrained.

Examples Explanations 13-133 represent various annotations, including constraints, constraints and memories of the operation. Figure 13-133 Note 130. Object (Object) encapsulates the status and behavior of discrete entities with a good definition interface and identity; ie the object instance. See Class, Identity, Instance. Semantic An object is an instance of a class, and the class describes the possible object set existing. An object can be observed from two related viewpoints: as an entity, it has a clear value at some time; as an identity holder, there are different values ​​at different times. A snapshot of an object has a location (in the distribution system), and each attribute has a value. An object is linked through a link set and other objects. Each object has a unique identity and can be referenced by a unique handle, the handle identifies the object and provides access to the object. Taking the object as an identity is corresponding to the cooperative example, the object in the cooperative instance is in contact with other object swap messages. In the full description of the object, each attribute has a attribute slot - that is, each attribute has declared in its direct class and each ancestor class. When the instantiation and initialization of the object have a value, each slot has a value, which is an instance of the declared attribute type. When the system is run, the value in the attribute slot can be changed unless the variability of the property is hidden. At any time executed, the value of the object must meet all implicit and explicit restrictions applied by the model. During operation, the restriction can be temporarily ignored. If the execution environment allows multiple classifications, an object can be a direct instance of multiple classes. Each attribute declared in any ancestor of the object in an object has a attribute slot in the object. The same attributes cannot appear multiple times, but if the two direct classes are the children of the same ancest, the ancestors reach this attribute, and each attribute of the ancestor has only one backup is inherited. If the execution environment allows the dynamic category, the object can change its direct class during execution. If attributes can be obtained during the process, their values ​​must be specified by changing the direct class operation. If the execution environment allows multiple types of dollars and dynamic categories, you can get and lose the direct class during the execution process. However, the number of straight-class categories cannot be less than one (class must have a structure, even if it is temporary). You can call an object to perform any operation in any direct description of any direct class - i.e., the direct and inheritance operations of the object. Objects can be declared as a one ancestors of the same class or the object of the object as the object as the target, the value of the variable and parameters. In other words, an example of any descending of the class may be a value of a variable, which is declared as that class. This is the substitute principle. This principle not only has a logical necessity, but its existence can simplify the integrity of programming languages. The representation object is an example of a class. The general principle of example symbols is to use the same geometric symbol as a descriptor, but it is separated as an individual area with an instance name with underscore. All values ​​are displayed in the instance, but all instance shares are marked in the descriptor. The specification symbol of the object contains two rectangles of the two points. The top contains the names and classes of the object, the bottom contains a list of attribute names and values ​​(Figures 13-134). There is no need to display operators because they are the same for objects of the same class. The top displays the object name and class name, which is subject to the following scribes, using the syntax object name: Class name, if necessary, the class name can include the full path name of the package. The name is first in the class name and separated by a double colon. For example, the constructor of the DISPLAYWINDOW: Windowings :: WINDOWINDOWS :: WINDOW class can be designed with text description (name string on the name of the name) or as an icon in the upper right corner. The structure of the object must conform to the type of constructor of its class. When the object of the multiple class object is displayed, the class list is separated by a comma. Some classes in a cooperation may have a temporary role.

For example, APERSON: PROFESSOR, SKIER Displays objects in a particular state, using the syntax object name: Class name [Status List] list must be a list of legitimate status names that may synchronize with comma. When the change in the class (dynamic class) is displayed, the object must be displayed twice, each class once. The two symbols are connected through a "becoming" relationship indicating that they represent the same object. The second part uses a list display the properties and values ​​of the object. The syntax attribute name of each value row: Type = value is redundant in the type of property declaration, which can be omitted. The value of the value of the representative value is specified. The attribute name does not need to underline. The name of the object is negligible. In this case, the colon after the name should be retained. This represents an anonymous object that is given to its relationship. Each symbol containing an anonymous object represents a unique object, which distinguishes yourself through relations with other objects. Object classes can be omitted (together with colon), but should be displayed when confusion may be avoided. Attribute value points can be omitted as a whole. Value is meaningless attributes can be omitted. In order to display changes in attribute values ​​during the calculation process, use a "becoming" to indicate that this is two versions of the same object. 231. Object Diagram Object Diagram Displays a relationship between a certain time object and an object. A object map can be seen as a particular case of a class diagram, instances and classes can be displayed therein. Objects are also associated with cooperation graphs, and the cooperation chart displays object prototypes in the context (class element role). See the picture (Diagram). The representation does not require a separate form for the object map. The class diagram contains an object, so only objects and uncommon class diagrams are one "object map". However, this phrase "object map" is very useful when portraying the specific use of all aspects. Discussing the object map display object set and its connection represents a state of a certain moment. It contains objects with values, rather than descriptors, of course, in many cases can be prototypes. The overall model of objects that can be used multiple instantiated can be displayed with a cooperation diagram, and the cooperation diagram contains a descriptor (class role and contact role) of the object and chain. If the cooperation graph is instantiated, an object map is generated. Object map does not display the evolution of the system. For this purpose, a collaboration map with a message can be used, or an interaction is represented by a sequence diagram. 232. Object flow (Object Flow) A relationship between an object, an object, and an operation or conversion between an object, or the use of it (input), or the use of it (input). See the control flow, the status of the object flow (Object Flow State). Semantic object flow is a type of control stream with object flow status, an object as an input or output. Indicates that the method is used to represent an object stream from the source body and destination entity. An entity or two entities may be a target flow state represented by an object symbol. A keyword can be used on an arrow indicating what object flow (formation or replication). If there is no identifier on the arrow, it is a connection. See object flow state, forming (Become), replication (COPY). 233. Object flow state (Object Flow State) A state represents an object of an object of a class in a certain time during the calculation process, such as interactive views or active diagrams. See the control flow (Class-in-state). Semantics Regardless of the activity map or the interactive map represents the control stream in the action of the target object of the message, but the message does not display the target stream as an operating parameter. Such information flows can be represented by a behavior model using an object stream state. An object flow state represents an object of one object of a certain class during the calculation process, such as intertman or active diagrams. Objects can be an active output and other activities input. In the active diagram, the object can be a conversion purpose (usually bifurcated, the additional branch is the master path), and the source of the active completion of the conversion. The current transition is excited, the object flow state is turned into activity.

This represents the creation of class objects. In order to display the object to a certain state, not the new object creation, an object flow state can be declared as a state class. An object flow state must match the results and parameters it represent. If it is an operation output, you must match the type of the result. If it is an input input, you must match the type of parameters. If the target flow states follows an activity completed conversion, then once the object value is valid, the activity is executed. No additional control inputs are required. In other words, the correct form of data is established is a trigger executed. The previous active and value of the control path can guide a complex conversion, which indicates that an activity requires a control path and a value. When all input conversion is ready, the active execution is performed. Multi-path arrives at a conversion indicates synchronization. Object flow conditions are usually useful for people to understand the input and output relationships, not to make calculations more concise. The information indicated by the target flow state is already available. The activity generated event in the activity graph can be modeled as an object flow state, which belongs to the signal. The << Signal >> constructor can be used. The target flow state is the output of the activity. If the activity generates multiple events, the object flow state is the target of the fork. The object indicating the status class is displayed in the active diagram. It is represented by a rectangular shape, including the class name with underline, and then following the status name class name [status name], such as the symbol representative of the ORDER [Placed] object. The object is existed as a state in the process, not just simple data. The symbol of the object flow state (represents a state) can be used as the source of the purpose and multi-conversion arrows of a conversion arrow. In order to separate them from the normal conversion zone, they are expressed as dashed rather than implementation. They represent objects. Examples Figures 13-135 illustrate the active flow state in the movable graph. An object stream status is created by an operation. For example, ORDER [Placed] is created by the Request Service. Because this activity follows another activity, the object flow status Order [Placed] is an output of the bifurcation symbol. On the other hand, state order [entered] is the result after the active Take ORDER is completed, and it does not have other successive activities. Figure 13-136 shows a part of the activities of the building. When the frame is built, the carpenter can go to build the roof, and the house can be sealed. These events can be modeled as signal object flow state - Carpenter Free and Frame Ready. Building roof and mounting water pipe as the result of these events. Therefore, the target flow state is displayed as an active input display. In the model, an event is completed produces an event, and the event triggers the next activity, which is hidden in the active connection. Obvious event requirements can be omitted. Therefore, the appearance of the target flow state signal is to provide information, not the structure of the structure. Discussing the status of the object state represents a calculated data flow view. However, the traditional data stream is different, it only has a limited portion (state machine or activity diagram) in the control flow model, not a data stream model. This makes it in an object-oriented frame structure. The object-oriented data structure, control flow, and data streams are unified in the same model. 234. The Object Lifeline sequence diagram The existence period of the object represents the object. 235. Object set expression (Object Set Expression) generates an expression of an object set when calculating. The goal of semantic semantics is an object set expression. When such an expression generates an object set at runtime, a labeled signal is sent to the object parallel. An object set may generate an element, in which case the transmission action is an ordinary order object. It does not even generate an element (ie, a split set), and in this case, there is no transmission action. 236.OCL object constraint language, a context of specified constraints and queries related languages. OCL is not used to write actions or executable code. Please see [Warmer-99] for details.

Semantic Object Constraint Language (OCL) is a context-related language for writing navigation expressions, Boolean expressions, and other query statements. It can be used to build constraint expressions, guardians, action, preamp, and back conditions, assertions, and other UML expressions. For complete syntax and semantic descriptions of OCL, please see [Warmer-99]. The summary of the following selection contains the most useful OCL syntax for creating navigation expressions and Boolean expressions. The full language includes a large number of predefined operators for collections and base types. The syntax of some common navigation expressions will be listed below. These forms can be chained together. The leftmost element must be an object or an object set expression. Available expressions means running on a value set. Please see OCL description for details and syntax. Item. The selector selector is the role name of the target end of the project's attribute name or project link. The result is the value of the attribute or the relevant object. The result is a value or value set depending on the diversity and connection of the project. Item. Selector (Parameter List) selector is an operator name of the project. The result is the operation return value on the project. Item. Selector [Limited Value] The selector indicates the qualified association of the qualified item. The qualifier is the value of the qualifier property. The result is the related object selected by the qualifier. Note that this syntax can limit the form as an array subscript. Collection -> Collection Characteristic Collection Characteristics is the embedded OCL collection function name. The result is a collection characteristic. If the collection characteristics are not a predefined OCL function, it is not legal. Several features are listed below. Collection -> Select (Boolean expression) Boolean expression writes in the item in the collection. The result is a collection of object subsets that satisfy the Boolean expression. Collection -> The number of elements in the Size collection. Self represents the current object (if the context is clear). Mathematics and Boolean operators for operation: = <> <=> = <> - * / NOT example flight.polit.training_Hours> = flight.plane.minimum_Hours Have a pilot set of pilot in sufficient training time company.employees-> SELECT (Title = "Boss" and self.Reports-> Size> 10) Made of the number of bosses that exceed 10 reports 237. Operation operation is a specification of the conversion or query that can call an object. It has a list of names and parameters. The method is the process of performing the operation. It has an algorithm and process description. Active operation can be executed by calling events. See call (Call), call event, method (Method). Semantic operation indicates the conversion of the target object state (which may be the status of the remaining objects of the target object) or returns to the operation caller value. Operation can be performed in the form of a method or calling an event, which results in a transition of the state machine of the active object. The operation is excited by calling, the caller hangs until the operation is executed, and then the caller continues to call the point after the point, and if the operation uses the object, receive the return value. The operation is declared in the class. The statement is inherited by its children. If another declaration has the same "match" signature, it is the same. You can specify a rule about matching the signature to test the conflict, which includes an operation name and parameter class (not the name or path), but does not include return parameters. The same operation can appear in the children's grandson. In this case, it is considered an iteration that inherits the declaration is ignored. The purpose is to use name matching to allow an operation to declare multiple classes in several classes to form different packages. The operational statement of common ancestors as all other claims is called the origin. It represents the operational rule declaration that is inherited by other operations. If the two operations declares have the same name and the same ordered list of the same parameter type (excluding the return parameter), the other features are different (for example, a parameter is an input parameter in the operation, and the output parameter in other operations ), Then declare the conflict, the model form is wrong. The method is an operation of an operation (or by calling the event).

If the operation declared in the class has no abstract characteristics, there is a method definition. Otherwise, the operation may be abstract (no way) or a specific inheritance method. Structure An operation has the following components. Concurrency concurrency semantics is to call the same passive instance, an enumeration value. Values ​​are sequential caller must be coordinated to make each time there is only one call to the object (any sequential operation of the object). If it occurs concurrently, the integrity of semantics and systems cannot be guaranteed. Multiple calls for concurrent threads to an object (any monitoring of objects) may occur at the same time, but only one call occurs at the same time. Other calls are blocked until the first operation is executed. Make sure that the deadlock does not generate a deadlock due to the simultaneous module is the responsibility of the modeling. The monitoring operation must be executed correctly (or block yourself) correctly (or block yourself), otherwise the monitoring semantics cannot be declared. Concurrent concurrent threads Multiple calls for an object (concurrent operation of the object) may occur at the same time. All calls can be executed according to the correct semantics. The concurrent operation design must ensure that the concurrent, order, or monitoring operation of the same object can be performed correctly. Otherwise, it cannot be declared concurrent semantics. The implementation of a polymorphic operation (method or invoking event) can be overloaded by future class. If possible, implement a new definition or different state machine conversion capable of being overloaded by a descendum, providing a method. Realization of different forms --- is a polymorphism. If it is not, the current implementation does not do any changes in the later generation. It has only one form. The execution of the query operation changes the status of the system - ie it is a query. If yes, the operation is returned, but no side effects. If not, it may change the system status, but it is not guaranteed to change. Name operation name, string. Feature matching operation call name and parameter type list (excluding parameter names or return types). Matching features must be unique in classes and its ancestors. If there is iteration, it is considered an iterative declaration of the operation that it must be fully matched. If you match, other all have been ignored in addition to the operation declaration of the highest layer ancestors. If you do not match, the model is in the form of an error. Parameter list operation parameter declaration list. See the parameter list (Parameter List). Return Type Call If there is a return value, a list of returns. This feature is null if there is no return value. Note that many languages ​​do not support multiple return values, but it is still a valid modeling concept that can be implemented in many ways, such as using one or more parameters as an output value. Whether the action domain operation is implemented on an object individual or class itself (main field). The value is: example operation can be implemented on the object. Class operations can be implemented on the class itself - for example, create an operation of class instances. Description Describe the expression of the effect of the operation, for example, the front rear condition. UML does not have a specified format, which can be used in various formats. Visibility with the visibility of the operations of other classes rather than defined operations. See Visibility. The method of defining the operation has the same constituent element. In addition, it has other optional state machines that constitute an elemental behavior description method. The expression of the method process. Available in strings or possible listing formats. Although the information description can be expressed in natural language, the body is usually expressed in programming language. Generally speaking, if the state machine is used, the value of the body is not used. Cooperative collaboration sets the implementation of the method as the ordered message set between roles (interoperability). The constituent elements of the event are called the same. The implementation of the operation must specify one or more conversions, and the conversion can be triggered by the calling event. A string representing the characteristic of the operation is represented by the characteristics of the operation.

The default syntax is the << Constructed Type >> OPT Visibility OPT Name (Parameter List): Return Type OPT {Characteristic String} OPT Construction Type, Visibility, Return Type Expression, Feature Strings (and Differences ) Can be omitted. The parameter list can be empty. Figure 13-137 shows some typical operations. name. Operation (not sputum parameters) Name string. parameter list. The list of parameters separated by a comma, consists of parameter flow, name, and type. The entire list is included in parentheses (including empty tables). See the parameters list and parameters for details. Figure 13-137. An operation list containing multiple operations returns. Use a comma-separated class (class, data type, and interface) name list string. After the list of operational parameters, follow the colon (:), colon, follow the type string. If you do not return any values ​​(such as C Void), the colon and the return type string can be omitted. Some but non-all programming languages ​​support multiple return values. Visibility. Visibility with symbols ' ', '#', or '-' identifies, which represent public public, protect protected, private private. In form, the visibility can be expressed in a keyword in the characteristic string (eg, {Visiblity = private}). This format is used in user-defined or dependent language selection. method. Operation and methods are declared with the same grammar. Operating features at the top of the generalized hierarchy are operational statements. The same feature in the subsequent class is an iterative declaration of operation. These features may be useful for declaration methods or statements. If the operation declaration has an abstract characteristic (operand is labeled or marked with a keyword Abstract), there is no corresponding method. Otherwise, the statement is represented by an operational statement and implementation. Use the operand and an ordered parameter type table, but does not include the return parameter to perform operation and method matching. If the remaining characteristics are inconsistent (for example, the input parameters are not matched with the output parameters), there is a conflict, and the model is non-alaid structure. If two identical operations declares that there is no common ancestor, but inherited from a public class, the model is non-rooted structure. In this case, a conflict has been conflicted in the class inherited the two operations. Method body. The method of the annotation of the method can be represented by the annotation statement. If it is a formal description written in some language (a semantic restriction), the text should be encapsulated. Otherwise, if it is just a natural language description (note), just use the normal body. Method declarations and its state machines or cooperation links are not significantly indicated, usually depicted in the editing tool. Description. Describe the expression of the operation performance. This can be expressed in a variety of methods, including body, front rear conditions, and non-variables. Regardless of the method of expression, the description should be expressed according to the operation of the system state, rather than the execution rules. The rule rules belong to the scope of the method. Description is represented by a string attached to the operating entrance. Inquire. Display the selection in the feature string of isquery = true or isquery = false format. Select TRUE or use keyword query. The default is to select False ---, the operation can change the system status (but does not guarantee change). Polymorphism. Display the selection using the feature string of ISPOLYMORPHIC = TRUE (Overload) or ISPOLYMORPHIC = FALSE (not overloaded) format. By default, you can choose TRUE ---. Scope. Example Scope Operations are specified in the operation string without underscore. Class scope operations are specified by name strings without underscore. Concurrent.

Use the characteristic string display selection in accordance with the ConcURRENCY = Value format, and Value can take one of the Sequential, Guarded, or Concurrency. signal. Keywords << Signal >> This represents the class receiving signal before a certain operation in the operational table. The parameter is the parameter of the signal. The declaration may have no return value. The response after the subject receives the signal is represented by the state machine. In other applications, this symbol can indicate that the class object is an error condition and an abnormality that can be modeled as signals, the expression option reference table and the return value type may be omitted (all rather than each). The visibility represents a different method, such as using a special icon or a group element. The syntax of the operational feature string can be a syntax of a particular language, such as C or SmallTalk. Special identification features are included in the string. Style Guide ● The operand is typically starting with lowercase letters. ● The operand is displayed in a normal body. ● Abstract operation with oblique display. Standard element semantics. 238. Ordering (Ordering) is used to express a set of value set features that are ordered or disseminated, such as an object set associated with an object. See association, associated endpoint (Association), multiplex (MultiPlicity). Semantics If the multipart of the associated endpoint is greater than 1, the other end of a binary connection is an object set. The sequencing characteristic is that the declaration is ordered or disorder. If it is disorder, there is no obvious order in the collection in the collection, constitutes a normal collection. As in an orderly, the elements in the collection have obvious order. The order of the elements is the information of the associated expression - i.e., this is additional information except element itself. Elements can be obtained in order. When the new chain is added to the association, its location in the order must be indicated by the operation of the addition chain. The location can be a parameter or may be implied. For example, an operation adds a new chain to the end of the known chain table, but the location of the new chain must be specified in some way. Note An ordered set is different from a collection of sequence by one or more characteristics of an element. One order is fully determined by the value of the object in the collection. Therefore, although it can be used to complete the function, do not add any information. In other words, the sequenced association information is additional information outside the element's own information. The sequencing characteristics is used to any multi-multiple elements, such as attributes greater than 1. The sequencing relationship can be implemented in a variety of ways, but it is usually implemented as a specified language. The collection of extension predetermined sequence needs to be explained separately to the sequencing rules, and it is best to limit it as limiting. The keyword indicating the legal order is indicated that the keyword is placed on the path end therewith (Fig. 13-138). Default keywords expire. Key words {Ordered} indicating that it is an ordered set. To this end, keyword {sorted} can be used to represent a collection of sorting through internal values. For attributes greater than 1, the sequencing keyword can be placed behind the attribute string, placed in the currency, as part of the characteristic string. If the sequence keyword is ignored, the collection is disordered. Figure 13-138 Order and Disorder Setting Discussion About the order of information, information is attached to the entity itself in the collection. Therefore, it is not derived, but it must be indicated when the entity is added. In other words, any additional operation must indicate the location of the entity in the entity table. Of course, the operation of inserting a new entity into a hidden position can also be implemented, such as a header or tail. However, only any order of the enabled entity is not expressed because of a collection ordered. These must be determined by the modeling. In general, the location of the new entity is the parameter of the new operation in the table. Note the order of binary relationships must be specified separately in each direction. Unless the multiple of the one is greater than 1, there is no meaning in order. An association may be completely disordered, or one direction is ordered, and the other direction is disorderly, or both directions are in order. Assume that classes A and class B have an association, in order in the B direction. Typically, the operation of the object A adds a new chain, indicating that the B object and the new chain are in the list of known B tables. A Operation of an object News a new B object, and also creates a new chain between A and B.

The table is added to the linked list maintained by A. It is possible to create a new chain starting at the B-terminal, but usually the new chain is inserted into the table A to B, because the location meaning in the table began in the B-terminal is not large. Of course, programmers can achieve more complex situations as needed. The relationship between the two directions is not common, because it is somewhat difficult to indicate the insertion point in both directions. But this is also possible, especially when new chains are added to each direction. Note An additional information is not included in an ordered quotation entity collection. The class is calculated, but does not increase the information. It can be considered a design optimization without being included in the design model. It can serve as a value of the sequencing characteristics, but it does not need to specify a location for the addition of an entity to a collection. The location of the new entity is automatically determined by checking the method in which the property is required. 239. The orthogonal substate state set is divided into a sub-state, and the activity of all sub-status is parallel. See a composite state, a Concurrent Substate, and a CONCURRENT SUBSTATE. 240. Owner scope indicates that features are actually shared on a single object or by whole class. See a scope, target scope. Semantic Owner Scope Indicates that there is a different attribute slot for the instance of each class, or only one attribute slot throughout the class. For operation, the owner scope represents an instance or acts on the class itself (for example, a new operation). Sometimes referred to as a scope. The value of the value of INSTANCE has a copy of its own individual attribute slot. The value in the groove is independent of the value in other slots. This is normal. For operation, operation is on a single object. The Class class is self-with a copy of the attribute slot. All instances of the class are shared. If the language allows the class as a real object, one property of the class is an object. For operation, operational role is on the entire class, such as a new operation or returns a statistics of the entire instance set. Indicates the attributes or operation of the method of the method (Figure 13-139). The properties or operations of the instance level scope do not take underscore. Discussion For association, the source position of the chain is an example or a class. However, this information can be indicated by the target scope in the other direction, so the owner's scope is not necessary, so it is not used. Figure 139 Attributes and operations of class scope

240. Package (package) Elemental visibility can be explained by adding visibility marks in front of the name of the element (' ' to represent the public, '-' Indicates private, '#' indicates that is protected. ). You can draw the relationship between the bag symbol to display the contact between some elements in the package. In particular, the dependencies between the bags (different from authorized dependencies, such as access and import) indicate that there is one or more dependencies between elements. Indicates that the optional tool can clear visibility by selectively displaying an element of a visibility level, such as all public elements. Tools can also illustrate visibility through image marks such as color or fonts. Style guides people to show that the package is displayed by the named icon, and these specific content can be dynamically accessed by "zooming into" a more detailed view. Figure 13-140. Connection between Packages and Packages Examples Figures 13-140 show a package structure for an order processing subsystem. This subsystem itself is displayed in a bag with prototype. It contains several ordinary packages. The dependence between the bags is expressed by the point line. This figure also shows several external packages dependent on the subsystem. These may be part of the bookshelf or library element. The generalization between the bags indicates different changes in the generic package. For example, the "external storage" package can be implemented as "random storage" or "stream storage". The discussion package is used as an accessed and configured control mechanism to allow developers to organize large models with each other and achieve them. Naturally, they will become a developer's hope. More special, to be able to work, the package must follow a certain rules. Because they are as a configuration control unit, they should contain those elements that may develop together. The package must also group elements that must be compiled. If changes to an element can cause recompilation of other elements, these elements should also be placed in the same package. Each model element must be included in one and only one package or other model element. Otherwise, the model maintenance, modification, and configuration control are impossible. Package controlled its definition of model elements. It can be referenced and used in other packages, but changes to this package require access to authorization and update the package with the package. Standard Elements Access, Extensions, Facade, Frame, Pile (STUB), System 242. Parameter parameters can be changed, delivered, or returned by variables. A parameter may include a name, type, and direction. Parameters are used for operation, information, events, and templates. The use of a parameter links the operations containing the parameters or the classes containing this parameter with this parameter. See: Argument, Binding Semantics When the package element is used, the parameter is stored in the storage of the contained election. It defines the range of values ​​of the variable. It includes the following parts. The default value This parameter does not change a value expression used when it corresponds to the corresponding. The expression is calculated when the parameter table is accepted. The direction of the direction parameter information flow is an enumerated value. The value is as follows: IN a pass value of the input parameters. Changes to this parameter do not work on the caller. OUT an output parameter. It does not enter a value. Its final value is available to the caller. INOUT A modified input parameter. The final value of this parameter is available to the caller. Return a call return value. This value is available to the caller. Configuring the same output (OUT) parameters, but its results can be used in an embedded expression. The options listed above are not directly existing in all programming languages, but the concepts contained in most languages ​​are meaningful and can be mapped into a meaningful expression. Name parameter name. The only thing must be guaranteed within the parameter table.

Types for a class specifier (in most processes, is a class, data type, or interface). Variables assigned to this parameter must be an example of a class specifier or its progeny. The representation is displayed as a string of text, which can be broken down into different attributes of this parameter. The default syntax is as follows: Direction Name: Type = Default Direction. The direction is a keyword in front of the operation name. If the keyword does not exist, the direction is in. The optional value in the direction is IN, OUT, INOUT, and RETURN. Return parameters are usually displayed in other places, and the return parameters do not have to be marked as the direction. first name. The name is displayed as a symbol string. Types of. The type is displayed as a symbol string, the symbol string is a name, interface, or name of the data type. Default. This value is displayed as an expression. The expression of this expression should be understood by a specific tool, but is not displayed as a standard format. range. If this range is class, the operation symbol string has underscores; if the range is an instance, the operation symbol string does not have an underscore. Parameter dependencies. Parameter dependencies are represented as an arrow, and the arrow direction is a class that contains this parameter or a class to this parameter. The "parameter" is marked on the arrow. For example: Matrix :: Transform (in Diatance: Vector, In Angle: REAL = 0): Return Matrix All direction labels can be omitted. 243. Parameter List Description of the value accepted by the operation or template. The parameter table is an ordered sequence of parameter description. This sequence can be empty, in which case the operation does not call any parameters. See parameters indicating that the normal parameter table is a sequence of parameter declarations, cracked by a small arc and separated by a comma. (Parameter Table) Even if the parameter table is empty, the brackets should still be displayed: () 244. Parameterized Element See Template 245. Father (PARENT) More in general elements . For classes, it is called a parent class. One or more father relationships (ie, passing closures) are called ancestors. The opposite is called the descendants. See Generalizateon 246. Participation (Particles) Participation is the connection between the model elements and contacts or the specificization. For example, an associated class participation, a class flag character in a collaboration is involved. 247. Passive object (Passive Object) does not have a thread-controlled object itself. Its operation is performed under the control of the thread within the active object. Semantic Active Objects are objects with control threads, which can excite control behavior. The passive object is an object with a value but cannot excite the control. However, when the passive object is processed by the request accepted by the thread that already exists in itself, the operation of the passive object may send a message. The representation passive object is displayed as a rectangle of a class, where the object name is underlined. The passive class is displayed as a class rectangle, where the class name is not underlined. These rectangles have a normal boundary (no bold). The active object uses a bold boundary when displayed. 248. The path connection between the graphics segments of each flag is usually used to display contact. The representation path is a graphical link between each flag in the chart. The path is used to explain a variety of linkages, such as association, generalization, and dependence. The end of the end of the two coupons is coincident. Although some tools only support linear sections and arcs, the segment can be a straight segment, an arc or other other shape. (Fig. 130141). In theory, the line can draw any angle, although some modeling people want to limit the line to a right angle, and may also put the line to a rule in the grid of the line for the virtual bag and placed. .

In general, although the route of the path is not important, the path should avoid passing through the closed area because the boundary through the graphic area may have a semantic meaning. (For example, the association of two classes in the same cooperation should draw in the partner area, indicating that this is the association of objects in the same cooperative example; corresponding, the path to a certain area indicates the object of different cooperation examples. Inter-association). For more precise, the path is a topology. Accurate routes don't have semantics, but it is important for linkages and crossings of other labels. Accurate path layout has a great impact on understandability and beautiful, and also implies the importance of contact and other things. However, this consideration is based on people rather than based on the computer. It is desirable that the tool can make the route's routing and heavy route. In most charts, there is no significance between cross between lines. In order to avoid the erliness of the intersection, a small semicircle or notch can be drawn on the intersection (Figures 13-142). More common practice is that modeling staff just treats a cross as two independent lines to avoid confusion with two right angles in their abutment. Figure 13-141. Path Figure 13-142. Path cross in some contacts (such as aggregation and generalization), several paths of the same type may be coupled to the same reference numeral. If the properties of different model elements are combined, the line segments of these linkages to the label can be combined into a line segment, so that the path taken from the label is a different path to form a tree. This is entirely the choice of graphical representation. Concept, a single path is different. This indication may not be used when the modeling information of different segments is not exactly the same. Figure 13-143. The path of the shared section 249. Path Name (Pathname) contains a string of the name of the element, nested namespace. The string starts from the unclear and unnamed namespace containing the entire system, ending with the name of this element itself. Semantics In one system, the path name is unique to indicate a model element, such as attributes or status. It can be used to reference an element in an expression. It is not named every element. The representation path name is displayed as a list of nested namespaces and elements names, and is separated by a double-cut number. The namespace is package or elements with nested declarations. Accounting :: Personnel :: Employee :: Address Attribute Address exists in the package Employee exists in the package. 249. Pattern mode is a parameterized cooperation. The collaboration represents a collection of parametric classes, contacts and behaviors. By binding the elements in the model (usually class) to the role of the pattern, these class specifiers, contacts, and behaviors can be applied to many cases. The so-called pattern is a template that cooperates. Semantic mode representative is a parameterized cooperation that can be used multiple times in one or more systems. To become a mode, a cooperation must be able to apply in a variety of situations so that you can name it. It is a problem to be solved in a variety of situations in many cases, and the mode is a solution to the problem. Of course, the mode is not the only answer to the problem, but it has been proven to be very effective. Most modes have shortcomings and advantages, depending on the broader aspects of the larger system. The modeling personnel should fully consider these advantages and disadvantages before deciding to use some model. A UML parameterized cooperation represents a structure and behavioral view of a type of mode. The mode also includes a list of other aspects, such as disadvantages and advantages that are not directly modified by UML. In these aspects, many can be expressed in language. See [Gamma -95] to get a full range of understanding of the mode, and you can see some directories of the design mode. Cooperate according to the mode. Cooperation can be used to illustrate the implementation of the design structure. The same type of cooperation can be applied multiple times by parameterizing its elements. The mode is the collaboration of parameterization.

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

New Post(0)