1 / 26

A Reflective Aspect-oriented Model Editor Based on Metamodel Extension

MiSE2007 @ ICSE2007. A Reflective Aspect-oriented Model Editor Based on Metamodel Extension. Naoyasu Ubayashi and Genya Otsubo. May 20, 2007. Outline. AspectM. Motivation Management of Metamodel Extension Reflective Model Editor + Demonstration Related Work Conclusion.

ranger
Download Presentation

A Reflective Aspect-oriented Model Editor Based on Metamodel Extension

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MiSE2007 @ ICSE2007 A Reflective Aspect-oriented Model Editor Based on Metamodel Extension Naoyasu Ubayashi and Genya Otsubo May 20, 2007

  2. Outline AspectM Motivation Management of Metamodel Extension Reflective Model Editor + Demonstration Related Work Conclusion

  3. 1. Motivation

  4. What is Aspect Orientation ? • Aspect-oriented programming (AOP) can separate crosscutting concerns including logging, error handling and transaction. • These concerns are modularized as aspects. logging

  5. AO Mechanism -- JPM--- JPM: Join Point Mechanism advice join point pointcut logging code program execution points including method calls and field access points extract a set of join points related to a specific crosscutting concern from all join points raise effects at the join points AspectJ aspect Logging { pointcut publiccall (): call (public * *(..)); before() : publiccall() {logging(); } }

  6. Towards AO Modeling Recently, aspect orientation has been proposed for coping with concerns at the early stages of the software development phases including requirements analysis, domain analysis, and architecture design phases. We previously proposed a UML-based aspect-oriented modeling language called AspectM.

  7. Advice Join Point Type : Open Class Add “log()”method to join point Aspects at the modeling-level are typically static structures AspectM Aspect name : Logging Pointcut cname(‘Customer’) || cname(‘Invoice’) AspectM JPMの簡易表も載せる ・DC におけるLogging の例(AspectMエディタで作成)。ただし、ここではモデル拡張していない版。 ・モデルweavingがわかるようにアニメーションにする

  8. AspectM is nice, but … {isUserAssigned=false} {isUserAssigned=true} {isUserAssigned=false} pointcut-body:= !DCEntityContract_UniqueId_isUserAssigned(*) advice-body := <<DCLoggerOperation>>log() There might be situations in which a modeler wants to introduce domain-specific notations and JPMs. ・同じくDC におけるLogging 例。ただし、こちらはモデル拡張した版。 ・こちらもアニメーションにする

  9. Need to extend the AspectM metamodel MOF is not easy ! However, … • The metamodel is too complex ! • It is difficult for a modeler to extend and modify the metamodel !

  10. Our Approach We provide a model management method for extending the metamodel. MMAP & Reflective Model Editor DSL Components (Components for constructing UML-based DSL) Lightweight mechanism for extending the metamodel Componentization of metamodel extension

  11. 2. Management of Metamodel Extension

  12. AspectM metamodel AspectM model Concept -- MMAP, Reflective Model Editor and DSL Components Meta level reify modify the AspectM metamodel protocols extension point DSL Components MMAP Editing-time structural reflection Base level reflect introduce a new kind of domain-specific model element new model element Reflective Model Editor

  13. MMAP AspectM metamodel Extension points Class Element • Class, Attribute, Operation • PA, CM, NE, OC, RN, RL, IH Extension operations • define subclasses • add attributes to subclasses • create associations among subclasses • add constraints using OCL Aspect Element Primitive predicates • predicates for navigating the AspectM metamodel extension point example of extension operations 分かりやすい図に 置き換え!

  14. Metamodel navigation DCEntityContract_UniqueId_isUserAssigned (c): meta-class-of ("DCEntityContract", c) && member-of (a, c) && meta-class-of ("UniqueId", a) && member-of ("isUserAssigned", "UniqueId") && value-of ("true", "isUserAssigned") member-of meta-class-of meta-class-of Meta level member-of Base level value-of

  15. 3. Reflective Model Editor

  16. Overview of Reflective Model Editor Base Editor Extension Procedure Meta Editor Execute extension operations Assign a graphic notation to a new model element Regenerate the metamodel Restart the base editor

  17. Demonstration Invoke the Meta Editor Overview of Reflective Model Editor Base Editor Extension Procedure Meta Editor Execute extension operations Assign a graphic notation to a new model element Regenerate the metamodel Restart the base editor Base Editor

  18. Add a constraint using OCL A class can have at most one UniqueId. self.owner.feature ->select(oclIsTypeOf(UniqueId))->size() <= 1 Show an extension point Rebuild the Base Editor Create a new metaclass Execute extension operations (add attribute, association, …) Assign a graphic notation Meta Editor

  19. This violates the constraint A class can have at most one UniqueId. self.owner.feature ->select(oclIsTypeOf(UniqueId))->size() <= 1 Base Editor can detect this error New model elements are added to the pallet Base Editor

  20. Reusable DSL component Meta Editor Base Editor

  21. Implementation (1) -- Reflective Model Editor Core Editor Generator Modeler Eclipse Modeling Framework Code Generator for EMF Metamodel for EMF Code of Model Editor Meta Editor Map model for GMF Extended Metamodel Graphical Modeling Framework Tool model for GMF Base Editor Code Generator for GMF Code of Graphic Editor Graph model for GMF Graphic Editor Generator Interface 英語版に置き換え!

  22. Implementation (2) -- Model Weaver Model Weaver Model Editor Weaving write Non Woven Model Woven Model Base Editor analyze pointcut convert Fact Modeler Prolog 追加

  23. 4. Related Work

  24. Related Work AODM (Aspect-oriented Domain Modeling) based on GME (Generic Modeling Environment) [J.Gray, et al. GPCE2003] ETMOP (Edit-Time Metaobject Protocol) [A.D.Eisenberg and G.Kiczales, AOSD2007]

  25. 5. Conclusion

  26. Conclusion • We proposed the notion of MMAP, reflective model editor and DSL components. • Future work • Verification of the metamodel extension • Verification of the model weaving

More Related