|
1
|
- Long Talk
- Kenn Hussey
- IBM Rational Software
|
|
2
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
3
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
4
|
- Unified Modeling Language, an Object Management Group (OMG) standard
- A language for specifying, visualizing, and documenting models of
software systems
- Current version is 2.1.1
|
|
5
|
- Unified Modeling Language 2.x
- A component of the Model Development Tools (MDT) Modeling subproject at
Eclipse
- Current release, 2.0.3, is based on UML 2.1.1
- Next release tentatively scheduled for June 2007 (Europa)
|
|
6
|
- UML2 provides
- a useable implementation of the UML metamodel to support the
development of modeling tools
- a common XMI schema to facilitate interchange of semantic models
- test cases as a means of validating the specification
- validation rules as a means of defining and enforcing levels of
compliance
- UML2 includes a customized EMF code generator that can handle UMLisms
like redefinition, subsetting, and derived unions
|
|
7
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
8
|
- The modeling concepts in UML are organized into language units
- A language unit is a collection of tightly coupled modeling concepts
that deal with a particular aspect of a system
- Language units are further partitioned into packages (merge increments)
- Language units are used as the foundation for defining compliance in UML
|
|
9
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
10
|
- The modeling concepts in UML are also partitioned into horizontal layers
of capability referred to as compliance points
- A compliance level is ultimately merged into a single UML package
which defines a shared namespace for all compliance levels
- UML specifies five pre-defined compliance levels, namely L0, LM, L1, L2,
and L3
- UML2 is based on the L3 compliance level of UML
|
|
11
|
- Level 0 is the most basic compliance level for UML
- Contains the basic ability to model structure
- Has the same modeling capability as EMOF but does not include the other
MOF capabilities such as reflection, identity, or extensions
- Level 0 is a good starting point for extending UML with additional
behavior using MOF
|
|
12
|
|
|
13
|
- Level M is the Metamodel constructs compliance level from
InfrastructureLibrary
- Adds an extra language unit for more advanced class-based structures
used for building metamodels (using CMOF), such as UML itself
|
|
14
|
|
|
15
|
- Level 1 extends the capabilities provided by Level M
- Adds language units for use cases, interactions, structures, actions,
and activities
|
|
16
|
|
|
17
|
|
|
18
|
- Level 2 extends the language units already provided in Level 1
- Adds language units for deployment, state machine modeling, and profiles
|
|
19
|
|
|
20
|
|
|
21
|
- Level 3 represents the complete UML
- Extends the language units provided by Level 2
- Adds new language units for modeling information flows, templates, and
model packaging
|
|
22
|
|
|
23
|
|
|
24
|
|
|
25
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
26
|
- A directed relationship between two packages which indicates that the
contents of the two packages are to be combined
- Can be viewed as an operation that takes the contents of two packages
and produces a new package that combines the contents of the packages
involved in the merge
- By selecting which increments to merge, it is possible to obtain a
custom definition of a concept for a specific end
|
|
27
|
- merged element contained by merged package before the merge
- receiving element contained by receiving package before the merge
- resulting element contained by resulting package after the merge
- merged package target of the merge, contains merged elements
- receiving package source of the merge, contains receiving elements
- resulting package result of the merge, contains resulting elements
|
|
28
|
- The semantics of package merge are defined by a set of constraints and
transformation rules
- When a merged element and a receiving element represent the same entity,
their contents are conceptually merged into a single resulting element
according to the rules of package merge
- UML2 provides a utility that will enforce these constraints and apply
these transformations
|
|
29
|
|
|
30
|
|
|
31
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
32
|
- Redefinition refers to the ability for one element to redefine another
in the context of a generalization hierarchy
- A redefining element must be consistent with the redefined element, but
may add specific constraints or other details particular to the
specializing classifier
- The detailed semantics of redefinition vary for each specialization of RedefinableElement
in UML
- The UML2 API and code generator provide support for Java code to
enforce these redefinition constraints
|
|
33
|
|
|
34
|
|
|
35
|
|
|
36
|
|
|
37
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
38
|
- A property may be marked as the subset of another, as long as every
element in the context of the subsetting property conforms to the
corresponding element in the context of the subsetted property
- The collection of values associated with an instance of the subsetting
property must be included in, or the same as, the collection of values
associated with an instance of the corresponding subsetted property
- The UML2 API and code generator provide support for Java code to enforce
these subset constraints
|
|
39
|
|
|
40
|
|
|
41
|
|
|
42
|
|
|
43
|
|
|
44
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
45
|
- If a property is derived, then its value(s) can be computed from other
information
- A property may be marked as being a derived union
- The collection of values denoted by the property in some context is
derived by being the strict union of all of the values denoted, in the
same context, by properties defined to subset it
- If a derived union property is not multivalued, the values of all the
subsets must be either the same or null
- The UML2 API and code generator provide support for Java code to enforce
these derived union constraints
|
|
46
|
|
|
47
|
|
|
48
|
|
|
49
|
|
|
50
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
51
|
- UML provides a mechanism that allows metaclasses from an existing
metamodel to be adapted for different purposes
- A profile is a kind of package that extends a reference metamodel
- A stereotype is a kind of class that may extend one or more metaclasses
via extension relationships, as part of a profile
- It is possible to interchange profiles, together with models to which
they have been applied, via XMI
- UML2 provides support for defining and interchanging profiles
|
|
52
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
53
|
- Use terminology that is adapted to a particular platform or domain
- Specify a syntax for constructs that do not have a notation
- Specify a different notation for symbols that already exist
- Add semantics that are left unspecified in UML
- Add semantics that do not exist in UML
- Add constraints that restrict the way one may use UML
- Add information that can be used when transforming a model to another
model or code
|
|
54
|
- One of the strengths of the latest version of UML is that it can be
customized to meet the needs of a given application or domain
- There are two official ways of customizing UML
- lightweight extensions using profiles
- heavyweight, or first-class, extensions using MOF
- UML2 supports these kinds of extensions but also provides two
lighter-weight alternatives which well call featherweight and middleweight
extensions
|
|
55
|
- Assume we want to customize UML for modeling testing systems
- Well (ab)use some concepts from the UML Testing Profile and JUnit
- Test Suite a package containing text contexts to test a system
- Test Context a class owning test cases to test a component
- Test Case an operation specifying tests to realize an objective
- Well examine how to extend UML2 for this domain using the four
different approaches
|
|
56
|
|
|
57
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
58
|
- Featherweight extensions are done by adorning model elements with keywords
- A keyword is a label for a model element that is typically displayed
within guillemots
- UML2 stores these keywords in Ecore annotations
|
|
59
|
|
|
60
|
|
|
61
|
|
|
62
|
|
|
63
|
|
|
64
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
65
|
- Lightweight extensions are done by creating profiles/stereotypes and
applying them to model elements
- Stereotypes can be used to add keywords, constraints, images, and
properties (tagged values) to model elements
- Metadata for profiles must be defined and deployed
- UML2 stores stereotype applications as dynamic EMF objects
|
|
66
|
|
|
67
|
|
|
68
|
|
|
69
|
|
|
70
|
|
|
71
|
|
|
72
|
|
|
73
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
74
|
- Middleweight extensions are done by creating a metamodel that extends
the UML2 metamodel via specialization
- An API and schema for the new metamodel must be generated, implemented,
and deployed
- The implementation classes in the specialized metamodel extend the UML2
implementation classes (discouraged)
- The API and resource implementation must conform with the UML2 API and
resource implementation
|
|
75
|
|
|
76
|
|
|
77
|
|
|
78
|
|
|
79
|
|
|
80
|
|
|
81
|
|
|
82
|
|
|
83
|
|
|
84
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
85
|
- Heavyweight extensions are done by creating a metamodel that merges
packages from UML
- An API and schema for the new metamodel must be generated, implemented,
and deployed
- The implementation classes in the specialized metamodel do not extend
the UML2 implementation classes
- The API and resource implementation need not conform with the UML2 API
and resource implementation
|
|
86
|
|
|
87
|
|
|
88
|
|
|
89
|
|
|
90
|
|
|
91
|
|
|
92
|
|
|
93
|
|
|
94
|
|
|
95
|
|
|
96
|
|
|
97
|
|
|
98
|
|
|
99
|
- Background
- Language Units
- Compliance Levels
- Package Merge
- Redefinition
- Subsets
- Derived Unions
- Profiles
- Extending UML(2)
- Featherweight Extensions
- Lightweight Extensions
- Middleweight Extensions
- Heavyweight Extensions
- Summary
|
|
100
|
- UML can be extended to suit the needs of your application or domain
- The UML2 component of MDT supports several customization mechanisms,
each having their own pros and cons
- The choice of which approach to take will depend on the amount of
overlap between your domain and UML
- Domains having little or nothing in common with UML can be supported
with a domain specific language (DSL) developed with EMF
|
|
101
|
- UML, XMI, and MOF are trademarks of the Object Management Group
- Java and all Java-based trademarks are trademarks of Sun Microsystems,
Inc. in the United States, other countries, or both
- Other company, product, or service names may be trademarks or service
marks of others
|