1 Model Compiler Construction Based on Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo)

Slides:



Advertisements
Similar presentations
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Advertisements

An Aspect-Oriented Approach For Web Application Access Control Presented by: Mohamed Hassan Carleton University Carleton University
© 2007 ATLAS Nantes 1 Atlas Model Weaver Use Case: Aspect Oriented Modeling Marcos Didonet Del Fabro Atlas Group (INRIA & LINA), Université de Nantes,
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
1 Model-driven development of SOA with Web services – using QVT technology Master thesis by Berge Stillingen Department of Informatics, University of Oslo.
Page 1 Model Based Software Development - a pragmatic view Mikkel Lauritsen Intentia R&D A/S
Secure Middleware (?) Patrick Morrison 3/1/2006 Secure Systems Group.
Review Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Review What have we done during the course? Where to learn more? What is for the.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
Generative Programming. Generic vs Generative Generic Programming focuses on representing families of domain concepts Generic Programming focuses on representing.
LUCENTIA Research Group Department of Software and Computing Systems Using i* modeling for the multidimensional design of data warehouses Jose-Norberto.
Deriving AO Software Architectures using the AO-ADL Tool Suite Luis Fernández, Lidia Fuentes, Mónica Pinto, Juan A. Valenzuela Universidad de Málaga
MDA Guide Version CYT. 2 Outline OMG Vision and Process Introduction to MDA How is MDA Used? MDA Transformations Other MDA Capabilities Using the.
Software Engineering Muhammad Fahad Khan
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 18 Slide 1 Software Reuse.
Executable UML The Models are the Code - Executable UML CS387 Paul Krause.
Workshop on Integrated Application of Formal Languages, Geneva J.Fischer Mappings, Use of MOF for Language Families Joachim Fischer Workshop on.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
MDA and QVT  Tom Gullion, Director of Product Management, Together Products.
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
Introduction to MDA (Model Driven Architecture) CYT.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
A REFACTORING TOOL FOR DESIGN PATTERNS WITH MODEL TRANSFORMATIONS Zekai Demirezen Yasemin Topaloğlu Ege University Department of Computer Engineering
Secure Systems Research Group - FAU Securing Service-Oriented Architectures using a Model-driven Approach Nelly A Delessy.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
2nd TTCN-3 User Conference, June The TTCN-3 Metamodel – A Basis for Tool Integration Ina Schieferdecker TU Berlin/Fraunhofer Fokus Hajo Eichler,
1 Metamodel Access Protocols for Extensible Aspect-Oriented Modeling Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Shinji Sano(Kyushu Institute.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.
Hyper/J and Concern Manipulation Environment. The need for AOSD tools and development environment AOSD requires a variety of tools Life cycle – support.
1 A Parameterized Interpreter for Modeling Different AOP Mechanisms Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Genki Moriyama(Kyushu Institute.
ISO/IEC CD and WD : Core Model and Model Mapping ISO/IEC JTC1/SC32/WG September 2005, Toronto SC32/WG2 Japan (Kanrikogaku Ltd) Masaharu.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan An Extensible Aspect-Oriented Modeling.
August/2007 Helton Souza Lima SBCARS 1 Automatic Generation of Platform Independent Built-in Contract Testers Helton Souza Lima Franklin Ramalho Patricia.
Generative Programming. Automated Assembly Lines.
Model Driven Development An introduction. Overview Using Models Using Models in Software Feasibility of MDA MDA Technologies The Unified Modeling Language.
A language to describe software texture in abstract design models and implementation.
1 Model Evolution with Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo) Shinji Sano, Yusaku.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
Dr. Darius Silingas | No Magic, Inc. Domain-Specific Profiles for Your UML Tool Building DSL Environments with MagicDraw UML.
December 4, ICSSEA’03 The SmartTools Software Factory The MDA approach and Generative programming for Software Development:
© Siemens AG, CT SE 2 C O R P O R A T E T E C H N O L O G Y 1 Model-Driven Development for Pluggable Collaborations Iris Groher, Stephan Bleicher, Christa.
1 Model-based Aspect Weaver Construction Suman Roychoudhury Frédéric Jouault Jeff Gray {roychous, jouault, cis.uab.edu This project is supported.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Devon M. Simmonds SERP’08, July-14-17, Las Vegas 1 Aspect-oriented Approaches to Model Driven Engineering Devon M. Simmonds Computer Science Department.
Model transformation with a dedicated imperative language IRISA Rennes (France) - Triskell team Jean-Marc Jézéquel Didier Vojtisek Jean-Philippe Thibault.
MDD approach for the Design of Context-Aware Applications.
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Verification Mechanism for Weaving.
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Reflective Aspect-oriented Model.
MDA and Separation of Aspects: An approach based on multiples views and Subject Oriented Design Quercus Software Engineering Group Computer Science Department.
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University.
Aspect-oriented Code Generation Approaches Abid Mehmood & Dayang N. A. Jawawi Department of Software Engineering Faculty of Computer Science and Information.
Page 1 Hitachi Ltd. – FhI FOKUS TTCN-3 User Conference, June 2005 MDA based approach for generation of TTCN-3 test specifications Hideto Ogawa, Hitachi.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
CHESS Methodology and Tool Federico Ciccozzi MBEES Meeting Sälen, January 2011 January 2011.
RoleEP: Role Based Evolutionary Programming for Cooperative Mobile Agent Applications Naoyasu UBAYASHI ( Toshiba Corporation) Tetsuo TAMAI ( University.
Software Engineering Lecture 7
An Interface Mechanism for Encapsulating Weaving in Class-based AOP
MACS 2005 First International Workshop on the Modeling and Analysis of Concerns in Software Concern Management for Constructing Model Compilers -- Towards.
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Towards Effective Adaptive User Interfaces Design
Towards Automatic Model Synchronization from Model Transformation
Evaluating Compuware OptimalJ as an MDA tool
Software Design Lecture : 14.
Presentation transcript:

1 Model Compiler Construction Based on Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo) Shinji Sano, Yusaku Maeno, Satoshi Murakami (Kyushu Institute of Technology) 29 September 2005 GPCE 2005 Generative Programming and Component Engineering

2 Overview  Motivation  AspectM  Model compiler construction using AspectM  Discussion  Related work  Conclusion

3 1. Motivation

4 Issues to be tackled Model-based development is a software development method in which models are created before source code is written. Although the method is effective, we have to modify models when we face evolution such as change of platforms. These modifications crosscut over many places in the models, and tend to cause unexpected errors. New platforms New requirements Optimization Multiple concerns!

5 How does MDA deal with this problem ? Analysis Design Coding CIM PIM PSM Source code MDA: Model-Driven ArchitecturePIM: Platform Independent Model CIM: Computation Independent ModelPSM: Platform Specific Model OOSDMDA model compiler We can regard PIMs as new kinds of reusable software components because they can be reused even if a platform is changed.

6 But, … Although MDA is effective for software development, it mainly focuses on platform-specific concerns. We have to modify models when we face evolution related to other kinds of concerns including application- specific optimization, security policies, and deployment. It is necessary to allow a modeler to customize transformation rules because model modifications for dealing with these concerns may be specific to an application. Multiple concerns Extensibility

7 Motivating example -- A simple bulletin board system

8 Example Original Platform Concern Optimization Concern make a product that is executable on the Struts platform optimize memory usage loggin g add a logging function for debugging loggin g modifications crosscut over many places Logging Concern delete application-specific

9 Our Approach We propose a method for constructing an extensible model compiler based on aspect-orientation. Aspect-orientation is useful for platform descriptions because they crosscut over many model elements. A modeler can extend model transformation rules by defining new aspects in the process of modeling. Aspect UML model weave Extensible model compiler UML model Aspect UML model PIM PSM AspectM

10 2. AspectM

11 Aspect orientation AOP is based on the JPM (Join Point Model). Join point Pointcut Advice program execution points including method invocations and field access points a means of extracting a set of join points related to a specific crosscutting concern from all join points a means of raising effects at the join points

12 Aspect orientation at the modeling-level (example) classA attributes operations classB attributes operations classC attributes operations join point (class) classA || classB (extract join point whose name is classA or classB) pointcut classA attributes new attributes operations new operations advice add new attributes add new operations Extension of JPMs (Join Point Models) in AOP classB attributes new attributes operations new operations join point (class) join point (class)

13 JPMs for model transformations JPMJoin pointPointcutAdvice PAoperation Example 1) setX || setY 2) set* 3) classA || classB 4) class* before, after, around CMclass merge-by-name NEclass-diagramadd-class delete-class OCclassadd-operation, delete-operation, add-attribute, delete-attribute RNclass, operation, attribute rename RLclassadd-inheritance, delete-inheritance, add-aggregation, delete-aggregation, add-relationship, delete-relationship PA ( pointcut & advice ), CM ( composition ), NE ( new element ), OC ( open class ), RN ( rename ), RL ( relation )

14 AspectM AspectM is an aspect-oriented modeling language that supports six kinds of JPMs. In AspectM, an aspect can be described in either a diagram or an XML format. AspectM provides the two kinds of aspects: ordinary aspect and component aspect. A component aspect is a special aspect for composing aspects. An aspect can have parameters for supporting generic facilities. By filling parameters, an aspect for a specific purpose is generated.

15 Example of AspectM descriptions > addAttributeX classeAandB : class { pointcut-body=“cname(classA) || cname(classB)” } merge [classAandB] : add-attribute { advice-body=“attributeX” } aspect cname(classA) || cname(classB) attributeX classA classB classC classA new attributes advice add new attributes pointcut classA || classB classB new attributes

16 AspectM Tools UML diagrams Aspect diagrams Model Editor (Eclipse UML) AspectM metamodel (EMF) XMI (PIM) XMI XSLT style sheet XMI (PSM) XSLT style sheet Java code Model Compiler

17 AspectM metamodel

18 Implementation of model compiler Aspect diagram (XML) XSLT processor XSLT style sheet for converting aspect (XML) to XSLT style sheet XSLT style sheet for converting UML (XML) to UML (XML) UML diagram (XML) XSLT processor (Weaver) UML diagram (XML) The first transformation phase The second transformation phase Model Compiler

19 3. Model compiler construction using AspectM

20 Application-specific model compiler UML model Weaver (XSLT processor) Weaver (XSLT processor) UML model Aspect Extended application-specific model compiler

21 Example Original Platform Concern Optimization Concern make a product that is executable on the Struts platform optimize memory usage loggin g add a logging function for debugging loggin g Logging Concern delete application-specific

22 Aspect for platform concern > MergeClasses inputClasses : class { pointcut-body=“cname(Message) || cname(MessageProfile)” } merge [inputClasses] : merge-by-name { advice-body=“PostMessage” } aspect Step1: merge PIMs Step 2: transform the merged class to an action form bean class Step 2: transform the merged class to an action form bean class 1) merge PIM classes 2) change the name of merged class 3) inherit ActionForm 4) add setter/getter Platform: Struts

23 Component, Generics concat( concat( Step1 Step2 component generics

24 Aspect for optimization concern <aspect name="DeleteAttribute" type="ordinary" jpm="OC"> <pointcut name="postMessageClass" type="class"> cname(PostMessage) <advice name="deleteDate" adviceType="delete-attribute" ref-pointcut="postMessageClass"> date > DeleteAttribute postMessageClasse : class { pointcut-body=“cname(PostMessage)” } merge [postMessageClasse] :delete-attribute { advice-body=“date” } aspect

25 Aspect for logging concern <aspect name="LoggingSetter" type="ordinary" jpm="PA"> <pointcut name="allSetter" type="method"> oname(set*) <advice name="logSetter" adviceType="before" ref-pointcut="allSetter"> Log.write() > LoggingSetter allSetter : method { pointcut-body=“oname(set*)” } merge [allSetter] : before { advice-body=“Log.write()” } aspect

26 Towards product-line engineering Aspects are useful for product-line engineering in which a variety of PSMs are generated from a single set of PIMs. Aspect library for.NET Aspect library for J2EE Aspect library for other platforms : Aspect library for product-line B Aspect library for product-line A Aspect library for other product-lines : Application-specific aspects UML diagrams defined by modelers Application-specific aspects UML diagrams Product X Product Y weave

27 4. Discussion

28 Scalability ? Aspect libraries that support de facto standard platforms such as J2EE and.NET. Aspect libraries that support platform- independent model transformations commonly applied to many applications. It is not realistic for a modeler to define all of the aspects needed to construct a model compiler from scratch. ① fusion of classes having certain kinds of patterns ② generation of setter/getter methods ③ change of naming conventions

29 Are six JPMs enough ? It is still not clear whether all kinds of model transformations can be described by the six JPMs. We think that there are situations for which new kinds of JPMs must be introduced. It would be better if a modeler can modify the AspectM metamodel using the model editor. This function can be considered as a modeling-level reflection, a kind of compile- time reflection.

30 Is AspectM really AOP language ? AspectM can describe not only model transformation concerns but also ordinary crosscutting concerns such as logging. AspectM unifies (lightweight) meta-programming with ordinary aspect-orientation by extending the idea of JPMs. aspect-orientation lightweight meta-programming JPMs Someone might claim that AspectM is not an aspect- oriented language but a meta language for model transformations.

31 5. Related work

32 Related work Aspect-oriented domain modeling (AODM) [J. Gray et. al. 2003] AODM introduced a language called ECL that provides facilities for adding model elements such as attributes and relations. In Draco, software development processes were considered as a series of transformations. Draco [J. Neighbors 1984] Persistence as an Aspect [A.Rashid and R.Chitchyan 2003] Aspect-oriented mechanisms (+ reflection) for describing database concerns are proposed. QVT [OMG] QVT (Queries, Views, and Transformations) is a model transformation language.

33 6. Conclusion

34 Conclusion We proposed a method for constructing an extensible model compiler that can deal with application-specific model transformations. A modeler can extend model transformation rules by defining new aspects in the process of modeling.