The UML has a number of rules that specify what a well-formed model should look like.
The UML rules for Names, Scope, Visibility, Integrity and Execution.
Common Mechanisms
It can be classified in to:
Specifications Adornments Common Divisions Extensibility Mechanisms |
Specification provides a textual statement describing interesting aspects of a system
Adornments
- Textual/graphical items added to the basic notation of an element
- They are used for explicit visual representation of those aspects of an element that are beyond the most important
Similarly, a class notation may highlight most important aspects of a class, i.e., name, attributes and operations. To show access specifies for the attributes and methods of a class adornments such as +, -, # are used.
Common Divisions:
- In modeling, object-oriented systems get divided in multiple ways.
- For example, class vs. object, interface vs. implementation
- An object uses the same symbol as its class with its name underlined
Extensibility Mechanisms
Extensibility mechanisms allow extending the language in controlled ways. They include Sterotypes, Tagged Values and Constraints
Extensibility mechanisms can be classified in to
Stereotypes Tagged Values Constraints |
- Stereotypes are used to create new building blocks from existing blocks
- New building blocks are domain-specific
- Stereotypes are used to extend the vocabulary of a system
- Graphically represented as a name enclosed by guillemets (« »)
Tagged Values
- Tagged values are used to add to the information of the element (not of its instances)
- Stereotypes help to create new building blocks, whereas tagged values help to create new attributes
- These are commonly used to specify information relevant to code generation, configuration management and so on
- Constraints are used to create rules for the model
- Rules that impact the behavior of the model, and specify conditions that must be met
- Can apply to any element in the model, i.e., attributes of a class, relationship
- Graphically represented as a string enclosed by braces {....} and placed near the associated elements or connected to that elements by dependency relationships
Social Plugin