• Keine Ergebnisse gefunden

The UML CS profile supports almost the same data concept as it is implemented in SDL-2000. There are only minor deviations. All pre-defined data types that are available in SDL-2000 are also available in this profile.

6.3.1.1 COMPOSITE AND PRIMITIVE DATA TYPES

In addition to the primitive types, also composite types like structures (struct) and unions are available. Primitive data types are defined by means of literals and operations which define a specific behavior on data types based in these literals. Structures compose several data types into one cohesive package. Each of the elements of the structure (field) is directly accessible and can be modified without interfering with the other. Unions are similar to structures with the difference that only one single element (variant) can be accessed at the time. If a value is assigned to a union variant, all other variants are overwritten.

6.4 Summary

(a) Struct (b) Union (c) Primitive Type with operator definition Figure 58: Definition of Primitive and Composite Types

Figure 58 lists three types of data type definition. The data type on the left is a definition of data types being extended with the stereotype struct. This indicates that the owned attributes – named i and j – are field entries of the composite type. The data type in the middle is a union composite type defining the same data types. This is indicated by the applied stereotype union. The data type on the right is a primitive data type that defines the value domain, the literals 0 and 1 and specifies an operation and which operates on these values. This operation takes two values of type myBool and returns a result of type myBool. The implementation of the operation is not shown here. However, the operation’s method shall only be described by means of an activity.

6.3.1.2 VALUE AND OBJECT TYPES

Furthermore, there are two different types of data type semantics available: value types and object types. The difference lies in the handling of assignments. An assignment of a value-type implies that the value of the data type is copied to its target. In contrast, object-type assignments copy the reference value of the data type to the target data type.

Following Figure 59 shows an example of a structured data type including its declaration as a value and object type.

(a) Struct definition (b) Process defining a value-type and object-type Figure 59: Declaration of Composite Data Type and Type Semantics

6.4 Summary

In this chapter, an overview of the UML CS profile has been given. This covered the architectural and behavioral concepts as well as timer mechanism and data types. This overview has provided a user’s view of the profile which is not implicitly clear and visible from the following profile definition in the following chapter itself.

In the first section, the architectural concept has been explained. This is the agent concept that allows a hierarchical decomposition of a structural specification into smaller parts. The communication base and the available construct have been depicted and an informal description has been given. The second section has described the behavioral concept of the profile. The main theoretical formalism used for this is the communicating extended finite state machine (CEFSM). The graphical elements to define a finite state machine have been discussed and the communication and activity concepts were listed.

Besides of the available concepts in UML, the focus of the overview lied on the new language features described in Chapter 5. In the third section, the data type concepts and its capability to define new operators and composite types have been presented.

7 Profile Definition

The profile described in this thesis is driven by the formality, experience and intelligibility of SDL.

However, this profile is not limited to SDL and it does not constitute a simple one-to-one mapping to SDL. In particular, there are several additional high-level modeling constructs available which cannot be specified in SDL such as an input via a specific port, from a specific agent or ports with an individual input queue. In addition, there are some language features available in SDL that cannot be specified with UML CS currently.

In this chapter, the stereotypes of the profile are semi-formally defined. The first section provides an introduction to the overall profile’s design. The subsequent sections describe the conceptual parts of the overall profile: The second section describes the stereotypes that extend several UML metaclasses for the structural specification and description of a communicating system. The third section describes the stereotypes for the UML Behavior by state machines and activities. The fourth section describes the stereotypes for UML Actions. The fifth section defines the stereotype for using random operations;

the sixth section provides the definitions of the stereotype extensions for timer definition and manipulation. The seventh section covers the stereotypes for data type definition. The stereotype definition consists of a syntax and informal semantics and additional information. The constraints of the stereotypes are defined by means of a formal specification language – the Object Constraint Language (OCL). This enables UML modeling tools to check automatically if these constraints are satisfied during a communication protocol’s specification and description process.

Im Dokument UML Profile for Communicating Systems (Seite 98-101)