190 likes | 291 Vues
Bridging UML profiles and Domain Specific Languages. Two major approaches appears in Model Engineering: UML approach : It uses profiles to model domain specific concepts . Approach based on DSL (Domain Specific Languages):
E N D
Bridging UML profiles and Domain Specific Languages • Two major approaches appears in Model Engineering: • UML approach : It uses profiles to model domain specific concepts . • Approach based on DSL (Domain Specific Languages): It aims at representing every domain with a specific metamodel. • We need interoperability between these approaches: • A tool which can perform automatic transformations between UML models defined using a profile for a metamodel and models conforming to this metamodel.
UML MMa MOF Ma THE TOOL Ma.uml* The tool * Uses UML Profile for MMa
UML Profiles (1/2) • UML profiles are dedicated to the strategic intention to formalize and support the development of applications with UML : • It allows designers to customize UML to their particular domain or purpose . • It defines virtual UML subclasses by associating stereotypes, tag definitions and constraints to provide an additional meaning to UML classes. Mapping table • Profiles are generally represented by mapping tables which show maps between profiled MetaModel elementets and UML ones.
Each element of the profile maps to a specific MetaModel element The mapping table is completed by mapping details: They define more precisely each map between UML and MOF elements. Each mapping details contains subsections covering these topics: tags, mapping properties, constraints, and limitations. Tags are used for MOF properties not directly supported by UML. Some MOF details cannot be rendered in UML using this profile. Those details are described by limitations. UML Profiles (2/2) Tags Feature Map UML Model Constraints Limitations
Each element of the profile maps to a specific MOF element. Table below show some mapping element . UML Profile For MOF (1/2) UML Profile For MOF : mapping table
UML Profile For MOF (2/2) Tags • Each element of the profile maps to a specific MOF element as shown in the mapping table above. • The mapping table is completed by mapping details. Feature Map UML Model Constraints Limitations
UML Profile for Data Modeling (1/2) • Stereotypes for Various Persistent Storage Mechanisms • Example of physical data model for a relational database using the profile
UML Profile for Data Modeling (2/2) Stereotypes for Classes
ProfileMeta MMa MOF Ma UML MMWeaver ProfileForMMa MWeaver T1Atl Ma.uml* The tool configuration (1/3) weaving * Uses UML Profile for MMa transformation conforming
ProfileMeta MMa MOF Ma UML MMWeaver ProfileForMMa MWeaver T2Atl Ma.uml* The tool configuration(2/3) weaving * Uses UML Profile for MMa transformation conforming
TMMtoUML TUMLtoMM TAMWtoATL Mprofile Muml MMM Muml MMM MAMW MMA The tool configuration(3/3) Muml =TAMWtoATL (MMM , Mprofile ) =TUMLtoMM( MMM ) TUMLtoMM =TAMWtoATL (MMA , MAMW , Mprofile )
Profile MetaModel • The definition of each virtual UML subclass which corresponds to a definition of a Profile element (in particular a class of the metamodel profiled) can be done in several ways . • An UML element can take more than one stereotype to define the same element of the metamodel profiled. However, it can also take different stereotypes to define different elements. • We should have the possibility to navigate the UML elements used by the Profile and have access to some of their attributes and values Profile MetaModel
The ProfileForMOF Model • profile ProfileForMOF : MOF { …… define AssociationEnd { UML!AssociationEnd { tag documentation ; -- AssociationEnd.annotation } nested{ ref name; ref namespace; ref constraint; ref participant; ref multiplicity {range { lower , upper } }; ref ordering : literal {ok_ordered (true) , ok_unordered (false)} ; -- isOrdered is mapped to ordering (where true corresponds to ordered) ref isUnique : boolean = true; ref aggregation : literal {ak_composite , ak_aggregate ,ak_none}; ref isNavigable; ref changeability : literal {ck_changeagle (true), ck_frozen(false) , ck_addOnly(false)}; } } …… }
Using AMW for mapping details (1/4) • Five types of correspondences: • LinkDef • LinkElem • Nested • IfNested • NewType
MOF UML Using AMW for mapping details (2/4) • Example : AssociationEnd AssociationEnd multiplicity multiplicity lower range upper lower isOrdered upper isUnique : True True <- ok_ordered False <- ok_unordered ordering : OrderingKind {ok_ordered , ok_unordered }
Using AMW for mapping details (3/4) • Example: The Weaving Model EPackage Model Profile ProfileForMOF Pro Model … ProfileDefinition AliasType LinkDef AliasType ProfileDefinition Association LinkDef Association EClass MultiplicityType ProfileDefinition AssociationEnd LinkDef AssociationEnd EAttribute lower EAttribute upper ProfileElement LinkElem EAttribute isOrdered UmlConcept AssociationEnd NewType EAttribute isUnique TagDefinition isUnique Nested Left lower NestedReference multiplicity EClass AssociationEnd Right lower … Node range Nested EReference multiplicity Node lower Left upper Node upper Right upper … NestedReference ordering IfNested Node ok_ordered Nested … Node ok_unordered Left ok_ordered The Profile For MOF <left model> Nested The MOF Metamodel <right model> Left ok_unordered … left lower … Right lower
Using AMW for mapping details (4/4) • Weaving model of the profile for MOF
Using ATL transformations • Two ATL transformations
Some Links • http://www.jeckle.de/uml_spec.htm • http://www3.software.ibm.com/ibmdl/pub/software/rational/web/whitepapers/2003/tp185.pdf • http://www.omg.org/mda/specs.htm#Profiles • http://www.agiledata.org/essays/umlDataModelingProfile.html • http://mdr.netbeans.org/uml2mof/profile.html