From UML Profiles to EMF Profiles and Beyond (TOOLS'11)
Upcoming SlideShare
Loading in...5
×
 

From UML Profiles to EMF Profiles and Beyond (TOOLS'11)

on

  • 2,895 views

Slides for the conference presentation of the paper "From UML Profiles to EMF Profiles and Beyond" by Philip Langer, Konrad Wieland, Manuel Wimmer, and Jordi Cabot at the TOOLS Conference 2011 in ...

Slides for the conference presentation of the paper "From UML Profiles to EMF Profiles and Beyond" by Philip Langer, Konrad Wieland, Manuel Wimmer, and Jordi Cabot at the TOOLS Conference 2011 in Zurich, Switzerland.

Statistics

Views

Total Views
2,895
Views on SlideShare
2,358
Embed Views
537

Actions

Likes
1
Downloads
49
Comments
1

5 Embeds 537

http://modeling-languages.com 489
http://paper.li 23
url_unknown 22
http://www.slideshare.net 2
http://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Nice explanation. Thanks a lot.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

From UML Profiles to EMF Profiles and Beyond (TOOLS'11) From UML Profiles to EMF Profiles and Beyond (TOOLS'11) Presentation Transcript

  • From UML Profiles to EMF Profiles and BeyondPhilip Langer, Konrad Wieland, Manuel Wimmer, and Jordi Cabot49th International Conference on Objects, Models, Components and PatternsZurich, Switzerland, 29 June 2011 Philip Langer philip.langer@jku.at Department of Telecooperation Johannes Kepler University Linz Altenberger Straße 69 4040 Linz, Austria
  • Overall Goal of This Work“Adopt the notion of UML Profiles to DSMLs residing in EMF” UML Profiles: A Short Introduction  Lightweight Language Extension Mechanism of the UML  A Profile consists of Stereotypes  Stereotypes extend base classes  And may introduce “tagged values”  Profiles are applied to UML models  By applying stereotypes to instances of their base classes  Specifying concrete values for their defined “tagged values” 2
  • UML Profiles: A Short Introduction «profile» EJB «metaclass» «stereotype»Profile specification Component Bean «enumeration» StateKind «stereotype» «stereotype» stateless EntityBean SessionBean stateful state: StateKind «apply» UserModel «SessionBean»Profile application Customer state=stateless 3
  • Motivation Overall goal  “Adopt the notion of UML Profiles to DSMLs residing in EMF” Is combination of profiles with DSMLs a contradiction?  Many debates on Pros and Cons of adopting UML Profiles or DSMLs 4
  • UML Profiles vs DSMLsReuse UML’s language concepts Create a lean language that is and existing UML editors! straight to the point!You’ll have to create the whole You’ll end up with an overloaded infrastructure by yourself! and imprecise language! 5
  • UML Profiles vs DSMLs These debates concern adopting either UML Profiles or DSMLs for creating new languages. What about extending existing languages? It’s your language… just extend your metamodel. 6
  • Motivating Scenario … generates Ruby on Rails. I want to additionally specify “Finder SQL” statements! Data Modeling Language … generates JavaServer Faces. Meta Concrete model Syntax Editor I want to additionally specify the bean scope! … generates DB Schema. Leave it as it is! If you introduce every imaginable feature that I don’t need, I could have used UML in the first place. 7
  • Motivating Scenario I can’t address all your … generates Ruby on Rails. requirements! I want to additionally specify “Finder SQL” statements! Data Modeling Language … generates JavaServer Faces. Meta Concrete model Syntax Editor I want to additionally specify the bean scope! … generates DB Schema. You need a lightweight Leave it as it is! If you introduce everyextension mechanism: Profiles! imaginable feature that I don’t need, I could have used UML in the first place. Other scenarios - No influence on the metamodel - “Concern-specific” annotations 8
  • Benefits of Profiles for DSMLs Lightweight language extension  Introduce additional features  No need for changing the metamodel and the modeling infrastructure Dynamic model extension  Existing models can be extended; even by multiple profiles and stereotypes  Profile applications are separated from the models ( no model pollution) Preventing metamodel pollution  Metamodels represent only information coming from the modeling domain  Concern-specific information is defined in a profile Model-based representation  Profile applications are well-defined ( they can be validated)  Profile applications are just additional models ( reuse existing frameworks) 9
  • The Challenge Okay, so let’s use profiles! But wait, that’s not so easy with EMF! UML EMF Core Profiles M3 «import» Ecore «instanceOf» «instanceOf» «instanceOf» M2 UML aProfile Profile MM «extend» «instanceOf» «instanceOf» «instanceOf» M1 aUML «extend» aProfile Model Application aProfile «instanceOf» aProfile Application 10
  • A Solution*: Metalevel Lifting by Inheritance Metalevel Lifting Profile Definition by Inheritance M3 Ecore «instanceOf » M2 Profile MM «instanceOf » M1 aProfile * In the paper, we discuss an alternative solution as well. 11
  • A Solution*: Metalevel Lifting by Inheritance Metalevel Lifting Profile Definition by Inheritance M3 Ecore «instanceOf » M2 Profile MM «inheritsFrom» «instanceOf » M1 aProfile * In the paper, we discuss an alternative solution as well. 12
  • A Solution*: Metalevel Lifting by Inheritance Metalevel Lifting Profile Definition by Inheritance M3 Ecore «instanceOf » M2 Profile MM «inheritsFrom» «instanceOf » M1 «instanceOf » aProfile aProfile Application * In the paper, we discuss an alternative solution as well. 13
  • EMF Profile Metamodel Standard EMF Profile Ecore Prof ileApplication EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* «import» StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EString 14
  • EMF Profile Metamodel and its Instantiation Standard EMF Profile Ecore Prof ileApplication EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* «import» StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EStringA Profile Specification eClassifiers : Profile eAttributes : Stereotype : EAttribute base : EClass name=“SessionBean” name=“isStateful” name=“Entity” 15
  • EMF Profile Metamodel and its Instantiation Standard EMF Profile Ecore Prof ileApplication EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* «import» StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EStringA Profile Specification «onSave» eSuperTypes eClassifiers : Profile eAttributes : Stereotype : EAttribute base : EClass name=“SessionBean” name=“isStateful” name=“Entity” 16
  • Standard EMF Profile EMF Profile Metamodel and its InstantiationProf ileApplication Ecore EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* «instanceOf» «import» StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EString«instanceOf» «instanceOf» «instanceOf» A Profile Specification eSuperTypes eClassifiers : Profile eAttributes : Stereotype : EAttribute base : EClass name=“SessionBean” name=“isStateful” name=“Entity” «instanceOf» «instanceOf» A Profile Application : Entity : SessionBean stereotype : ProfileApplication appliedTo isStateful=true Applications 17
  • Standard EMF Profile EMF Profile Metamodel and its InstantiationProf ileApplication Ecore M3 M3 M2 EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* M2 «instanceOf» «import» StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EString«instanceOf» «instanceOf» «instanceOf» A Profile Specification eSuperTypes eClassifiers : Profile eAttributes M2 : Stereotype : EAttribute base : EClass name=“SessionBean” name=“isStateful” name=“Entity” «instanceOf» «instanceOf» A Profile Application M1 M1 M1 : Entity : SessionBean : ProfileApplication stereotype appliedTo isStateful=true Applications 18
  • Standard EMF Profile EMF Profile Metamodel and its InstantiationProf ileApplication Ecore M3 M3 M2 EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … … stereotype 0..* 1 Applications 0..* M2 «instanceOf» «import» StereotypeApplication Prof ile appliedTo : EObject M2/3 Stereotype Prof ile iconPath : EString«instanceOf» «instanceOf» «instanceOf» A Profile Specification eSuperTypes eClassifiers : Profile M1/2 eAttributes M2 : Stereotype : EAttribute base : EClass name=“SessionBean” name=“isStateful” name=“Entity” «instanceOf» «instanceOf» A Profile Application M1 M1 M1 : Entity : SessionBean : ProfileApplication stereotype appliedTo isStateful=true Applications 19
  • Example: EJB Profile Specification 20
  • Example: EJB Profile Application 21
  • From UML Profiles to EMF Profiles and Beyond UML Profiles can be specified for UML only  No need for further reuse of profiles for other languages EMF Profiles can be specified for every Ecore-based language  Reuse a profile for more than one language Generic Profiles  Reuse a profile for several “user-selected” DSMLs Meta Profiles  Reuse a profile for all DSMLs 22
  • Generic Profiles Reuse a profile for several “user-selected” DSMLs  Extend generic types instead of concrete types  Bind generic types to concrete types to apply a profile  Use OCL to further restrict valid bindings <<prof ile>> EJB Container, Property «generictype» «generictype» Container Property name : EString «stereotype» «stereotype» «stereotype» SessionBean EntityBean IDAttribute isStatef ul : EBoolean isUserManaged : EBoolean ER ER ER 0..* 0..* 0..* «bind» <Container->Entity, Property->Attribute> Entity Entity Entity Attribute Attribute Attribute name : : String name String name : String name : : String name String name : String 23
  • Meta Profiles Reuse a profile for all DSMLs (at once)  Each “Meta Stereotype” may be applied to every base type  Useful for general annotations  E.g., Model Review Profile «meta-prof ile» ModelReview «meta-stereotype» «meta-metaclass» ReviewDecision EClass Metaprofile reviewer: EString reviewDate. EDate «meta-stereotype» «meta-stereotype» «meta-stereotype» Approved Rework Declined assignedTo: EString reason: EString reason: EString 24
  • Meta Profiles  Reuse a profile for all DSMLs (at once)  Each “Meta Stereotype” may be applied to every base type  Useful for general annotations  E.g., Model Review Profile «meta-prof ile» ModelReview «meta-stereotype» «meta-metaclass» ReviewDecision EClass Metaprofile reviewer: EString reviewDate. EDate «meta-stereotype» «meta-stereotype» «meta-stereotype» Approved Rework Declined assignedTo: EString reason: EString reason: EString Application to a simplified Event-driven Process Chain Model Application to a simplified Use Case Diagram : Approved : Rework : Approved : Declined reviewer : "Homer" reviewer : "Homer" reviewer : "Homer" reviewer : "Homer" reviewDate : 23/06 assignedTo: "Bart" reviewDate : 23/06 reason : "Dough! Every order gets canceled?" reason : "Change to XOR" appliedTo appliedTo appliedTo appliedTo BaseModelBaseModel : UseCase : Include : UseCase: Event : Function : LogicalConnectorname : "order received" name : "check order" type : OR name : "Order Goods" 25 name : "Cancel Order"
  • Implementation Based on the Eclipse Modeling Framework Supports extending every Ecore-based DSML Uses the Decoration Service to show icons in GMF editors Open Source (EPL 1.0)  http://code.google.com/a/eclipselabs.org/p/emf-profiles/ Try EMF Profiles!  Eclipse Update Site http://www.modelversioning.org/emf-profiles-updatesite/ Contact us and get involved!  http://groups.google.com/group/emf-profiles 26
  • Thank Your for Your Attention! Thanks for listening! Have you any questions? Aw, these kids nowadays… END All graphics of characters of “The Simpsons” are downloaded from http://www.simpsoncrazy.com
  • Backup Slides 28
  • Related Work Weaving Models  Powerful mechanism for annotating models  However, they are counter-intuitive and not intended to be used by “users”  Not possible to annotate models in concrete syntax Kolovos et al.: Model Decorations  Additional information is saved in GMF’s notes (text fragments)  Transformations to inject and extract models from these text notes  Only supports annotating GMF  Forces users to create hand-crafted transformations  Users have no feedback whether the text in notes is valid Bruneliere et al: EMF Facet  Allows to define additional derived classes and features  Derived information is transient  Complementary to EMF Profiles  we plan to integrate EMF Profiles to EMF Facet Clark et al: Meta packages  Allows to extend the language XCore  EMF Profiles is more generic because any Ecore-based language can be extended 29
  • Design Alternatives (a) Metalevel Lifting (b) Metalevel Lifting Profile Definition by Transformation by Inheritance Ecore M3 «instanceOf» «instanceOf» «transformedTo» «inheritsFrom» M2 aProfile as MM Profile MM «instanceOf» «instanceOf» M1 aProfile «instanceOf» aProfile aProfile Application Application 30
  • Complete Profile Metamodel Standard EMF Profile Ecore Prof ileApplication EClass EPackage Prof ileApplication abstract: EBoolean base nsURI : EString base eSuperTypes : EClass eClassif iers : EClassif ier … 0..* … 1 0..* StereotypeApplication Prof ile appliedTo : EObject Stereotype Prof ile iconPath : EString <<merge>> <<merge>> Generic Profile Meta Profile EClass Stereotype Prof ile Condition isMeta : EBoolean isMeta : EBoolean 0..* expr : OCLExpression GenericType <<merge>> Complete EMF Profile <<merge>> 31