Upload
grant-carr
View
214
Download
0
Embed Size (px)
Citation preview
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
Juan Pablo Zamora Zapata Juan Pablo Zamora Zapata Francis BordeleauFrancis Bordeleau
Defining UML Profiles Defining UML Profiles and Model Mappings and Model Mappings
in the Context of the MDAin the Context of the MDA
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
UML ProfilesUML Profiles
UML provides built-in UML provides built-in profileprofile facilities that allow for the tailoring of facilities that allow for the tailoring of UML for different platforms (such as CORBA, J2EE or .NET) or UML for different platforms (such as CORBA, J2EE or .NET) or domains (such as real-time or business process modeling). domains (such as real-time or business process modeling).
The definition of a UML profile involves three main steps The definition of a UML profile involves three main steps 1. 1. Inclusion of UML metaclasses (or UML metamodel packages) thatInclusion of UML metaclasses (or UML metamodel packages) that can be used within the profile.can be used within the profile.2. 2. Creation of new model elements defined as extensions of UMLCreation of new model elements defined as extensions of UML metaclasses using stereotypes.metaclasses using stereotypes.3. 3. Definition of constraints on the use of model elements and theirDefinition of constraints on the use of model elements and their relationshipsrelationships
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
UML ProfilesUML Profiles
The basic mechanisms to create UML Profiles are The basic mechanisms to create UML Profiles are stereotypesstereotypes and and tagged valuestagged values. .
Stereotypes are used to create new model elements, as extensions of Stereotypes are used to create new model elements, as extensions of UML metaclasses. In a class diagram, the name of a stereotype is UML metaclasses. In a class diagram, the name of a stereotype is shown within a pair of guillemets (e.g. <<stereotype>>) above the shown within a pair of guillemets (e.g. <<stereotype>>) above the class name. class name.
The definition of stereotypes may also involve the definition of The definition of stereotypes may also involve the definition of tagged valuestagged values that can be used to define properties of the stereotype, that can be used to define properties of the stereotype, and the definition of and the definition of constraintsconstraints that can be used to formalize certain that can be used to formalize certain aspects of the stereotype.aspects of the stereotype.
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
UML Spec ProfileUML Spec Profile
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
UML RRRT Design Capsule DiagramUML RRRT Design Capsule Diagram
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
UML RRRT Design ProfileUML RRRT Design Profile
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
Mapping DefinitionMapping Definition
The definition of a mapping is performed in three main steps:The definition of a mapping is performed in three main steps:
1.1. Analysis of the concepts defined in the profiles. Analysis of the concepts defined in the profiles. 2.2. Definition of conceptual relationships between the Definition of conceptual relationships between the elements elements of the profiles. Informal identification on how of the profiles. Informal identification on how each model each model element in the source profile can be element in the source profile can be associated with a model associated with a model element from the target profileelement from the target profile3.3. Formalize the relationships in a well-defined Profile Formalize the relationships in a well-defined Profile
Mapping package. Embed the element’s Mapping package. Embed the element’s association, association, traceable naming and constrain definition traceable naming and constrain definition (if needed) in the (if needed) in the definition of a set of mapping definition of a set of mapping stereotypes. stereotypes.
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
Model Element MappingModel Element Mapping
Supported byModel Element Graphical
RepresentationUMLSpec
UML RRRTDesign
Classifiers:Class (Active and Data Classes) (Data Classes)
<<Capsule>>
Interface
<<Protocol Class>><<Port>>
Relationships:Generalization
Realization
Composition
Dependency
Aggregation
Association
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
Example of MappingsExample of Mappings
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
ClassMap ClassMap <<TransformationMap>><<TransformationMap>> Definition Definition
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
1) ClassMap <<TransformationMap>>2) ClassToCapsuleMapping <<ClassifierMapping>>
3) AttributeMapping <<FeatureMapping>>4) AttributeTypeMapping <<ClassifierMapping>>5) AttributeMapping <<FeatureMapping>>6) AttributeTypeMapping <<ClassifierMapping>> 7) OperationMapping <<FeatureMapping>>8) ParameterMapping << FeatureMapping >>9) ParameterTypeMapping << FeatureMapping >>10) OperationReturnTypeMapping << FeatureMapping >>11) OperationMapping << FeatureMapping >>12) ParameterMapping << FeatureMapping >>13) ParameterTypeMapping << FeatureMapping >>14) ParameterMapping << FeatureMapping >>15) ParameterTypeMapping << FeatureMapping >>16) OperationReturnTypeMapping << FeatureMapping >>
Model Element MappingModel Element MappingTransformationTransformationMapMap
UMLUMLSpecSpec
ProfileProfile
UMLUMLRRRTRRRTDesignDesignProfileProfile
ClassMapClassMap
ClassMap ClassMap <<TransformationMap>><<TransformationMap>> Execution Execution
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
OutlineOutline
• UML ProfilesUML Profiles– UML Spec ProfileUML Spec Profile– UML Rational Rose RealTime (RRRT Profile)UML Rational Rose RealTime (RRRT Profile)
• MappingsMappings
• Transformation MapsTransformation Maps
• Transformation Map Execution ExampleTransformation Map Execution Example
• ConclusionConclusion
RTAS 2003 Workshop on Model-Driven Embedded SystemsWashington, D.C., May 27-30, 2003
ConclusionConclusion
This short paper describes the two UML profiles that we use for the This short paper describes the two UML profiles that we use for the definition of a specification-to-design mapping in the context of the definition of a specification-to-design mapping in the context of the OMG SWRadio standardization effort. OMG SWRadio standardization effort.
We also introduce the concept of UML model mapping and outline the We also introduce the concept of UML model mapping and outline the mapping we defined between the UML RRRT Design profile and the mapping we defined between the UML RRRT Design profile and the UML Spec profile. This mapping allows making the transition between UML Spec profile. This mapping allows making the transition between a UML spec and a UML RRRT Design in a systematic and traceable a UML spec and a UML RRRT Design in a systematic and traceable manner. manner.
The approach presented in this paper is model driven and follows the The approach presented in this paper is model driven and follows the guidelines defined by the OMG’s Model Driven Architectureguidelines defined by the OMG’s Model Driven Architecture