POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Verification Mechanism for Weaving.

Slides:



Advertisements
Similar presentations
Profiles Construction Eclipse ECESIS Project Construction of Complex UML Profiles UPM ETSI Telecomunicación Ciudad Universitaria s/n Madrid 28040,
Advertisements

Comparison of Several Meta-modeling Tools 2 Yi Lu Computer Science Department McGill University
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
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,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Irina Rychkova. 9/20061 Systemic approach towards model definition Model transformation semantics.
Train Control Language Teaching Computers Interlocking By: J. Endresen, E. Carlson, T. Moen1, K. J. Alme, Haugen, G. K. Olsen & A. Svendsen Synthesizing.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Ontologies Reasoning Components Agents Simulations An Overview of Model-Driven Engineering and Architecture Jacques Robin.
Harmless Advice Daniel S Dantas Princeton University with Prof. David Walker.
AspectJ2EE/Clasa Israel Institute of Technology The Computer Science department Itay Maman.
Whole Platform Tesi di Dottorato di: RICCARDO SOLMI Università degli Studi di Bologna Facoltà di scienze matematiche, fisiche e naturali Corso di Dottorato.
IBM Software Group © 2005 IBM Corporation University of Nantes Eclipse dayMarch 2005 The Eclipse Modeling Framework and the IBM Model Transformation Framework.
A Survey of Software Refactoring Tom Mens, Tom Tourwé
Taming Obliviousness in Aspects with Data-flow Analysis and Design by Contract Tim Molderez and Dirk Janssens Ansymo Antwerp Systems and Software Modelling.
 Copyright 2005 Digital Enterprise Research Institute. All rights reserved. Towards Translating between XML and WSML based on mappings between.
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
VERIFICATION OF ASPECT ORIENTED MODELS BY DON MARTIN JAYASHREE VENKIPURAM PATHANGI PIYUSH SRIVASTAVA REFERENCES F. Mostefaoui and J. Vachon,” Design level.
Agenda 1. Introduction 2. Overview of SU-MoVal 3. OCL-based Model Validation 4. QVT-based Transformations 5. Demo of SU-MoVal 6. Conclusion and Future.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Building Tools by Model Transformations in Eclipse Oskars Vilitis, Audris Kalnins, Edgars Celms, Elina Kalnina, Agris Sostaks, Janis Barzdins Institute.
1 Metamodel Access Protocols for Extensible Aspect-Oriented Modeling Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Shinji Sano(Kyushu Institute.
1 An Aspect-oriented Weaving Mechanism Based on Component-and-Connector Architecture Naoyasu Ubayashi (Kyushu Institute of Technology) February 12, 2008.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development 1.
Overview of Formal Methods. Topics Introduction and terminology FM and Software Engineering Applications of FM Propositional and Predicate Logic Program.
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.
1 Model Compiler Construction Based on Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo)
1 A Parameterized Interpreter for Modeling Different AOP Mechanisms Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Genki Moriyama(Kyushu Institute.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan An Extensible Aspect-Oriented Modeling.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan Pointcut-based Architectural Interface.
VERIFICATION OF ASPECT-ORIENTED MODELS Review of Aspect-Oriented Definitions aspect – crosscutting concern that may involve multiple classes pointcut –
Verification and Validation in the Context of Domain-Specific Modelling Janne Merilinna.
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.
© Siemens AG, CT SE 2, Iris Groher, Markus Voelter C O R P O R A T E T E C H N O L O G Y XWeave – Models and Aspects in Concert 1 XWeave Models.
Architectural Point Mapping for Design Traceability Naoyasu Ubayashi and Yasutaka Kamei Kyushu University, Japan March 26, 2012 FOAL 2012 (AOSD Workshop)
1 A Context Analysis Method for Constructing Reliable Embedded Systems Naoyasu Ubayashi, Toshiki Seto, Hirotoshi Kanagawa, Susumu Taniguchi, and Jun Yoshida.
Automata Based Method for Domain Specific Languages Definition Ulyana Tikhonova PhD student at St. Petersburg State Politechnical University, supervised.
ModelPedia Model Driven Engineering Graphical User Interfaces for Web 2.0 Sites Centro de Informática – CIn/UFPe ORCAS Group Eclipse GMF Fábio M. Pereira.
Graphical Modeling Framework (GMF) Richard C. Gronback Project Lead.
1 Model-based Aspect Weaver Construction Suman Roychoudhury Frédéric Jouault Jeff Gray {roychous, jouault, cis.uab.edu This project is supported.
1 Contract-based Verification for Aspect-oriented Refactoring Naoyasu Ubayashi(Kyushu Institute of Technology) Jinji Piao(Kyushu Institute of Technology)
Gregor v. Bochmann, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher(2009) with material from Amyot User Requirements Notation (URN)
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
® A Proposed UML Profile For EXPRESS David Price Seattle ISO STEP Meeting October 2004.
1 Context-aware Feature-Oriented Modeling with an Aspect Extension of VDM Naoyasu Ubayashi (Kyushu Institute of Technology) Shin Nakajima (National Institute.
Towards an Aspect-oriented Language Module: Aspects for Petri Nets Tim Molderez, Bart Meyers, Dirk Janssens and Hans Vangheluwe Ansymo Antwerp Systems.
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Reflective Aspect-oriented Model.
1 Contractual Consistency Between BON Static and Dynamic Diagrams Ali Taleghani July 30, 2004.
1 Separation of Context Concerns --- Applying Aspect Orientation to VDM Naoyasu Ubayashi (Kyushu Institute of Technology) Shin Nakajima (National Institute.
® IBM Software Group A Metamodeling Approach to Pattern Specification Maged Elaasar 1,2, Dr. Lionel Briand 1, Dr. Yvan Labiche 1 1 Carleton University,
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.
AO Mechanisms in Demeter1 Discussion with Gregor Kiczales at UBC Ontology of AOP Ontology is the study of what there is, an inventory of what exists. An.
AUTOMATIC GENERATION OF MODEL TRAVERSALS FROM METAMODEL DEFINITIONS Authors: Tomaž Lukman, Marjan Mernik, Zekai Demirezen, Barrett Bryant, Jeff Gray ACM.
1 Towards Integrated Tool Support for the User Requirements Notation Jean-François Roy
Model Checking Early Requirements Specifications in Tropos Presented by Chin-Yi Tsai.
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
MACS 2005 First International Workshop on the Modeling and Analysis of Concerns in Software Concern Management for Constructing Model Compilers -- Towards.
SysML v2 Formalism: Requirements & Benefits
Discussion with Gregor Kiczales at UBC
Business Process Measures
Daniel Amyot and Jun Biao Yan
Chapter 20 Object-Oriented Analysis and Design
An Extensible Contract Verifier for AspectJ
Presentation transcript:

POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Verification Mechanism for Weaving in Extensible AOM Languages Naoyasu Ubayashi, Yusaku Maeno, Kazuhide Noda and Genya Otsubo ECOOP2007 July 30, 2007

POSL posl.minnie.ai.kyutech.ac.jp 2 Outline Motivation AspectM: an extensible AOM language Verification mechanism Conclusion

POSL posl.minnie.ai.kyutech.ac.jp 3 1. Motivation

POSL posl.minnie.ai.kyutech.ac.jp Extensible AOM language AOM (Aspect-oriented Modeling) languages can cope with concerns at the early stages of the software development phases. We previously proposed a UML-based AOM language called AspectM. AspectM is an extensible AOML based on MMAP (Metamodel Access Protocol). The extension mechanism in AspectM is effective for constructing domain-specific modeling languages. 4

POSL posl.minnie.ai.kyutech.ac.jp Problems in extensible AOM languages 5 Extensible AOM Language A modeler can extend metamodel. A modeler can add new aspects that include user-defined JPMs. (user-defined pointcuts, etc) Does a pointcut select join points correctly ? Does a base model conform to metamodel ? Does a woven model include cyclic inheritances? It is not necessarily easy to check model consistency and aspect interference. Verification mechanism

POSL posl.minnie.ai.kyutech.ac.jp 6 2. AspectM: an extensible AOM language

POSL posl.minnie.ai.kyutech.ac.jp 7 AspectM AspectM JPM の簡易表も載 せる JPMJoin pointAdvice PA (Pointcut & Advice)operationbefore, after, around CM (Composition)classmerge-by-name NE (New Element)class diagramadd/delete-class OC (Open Class)classadd/delete-attribute, add/delete-operation RN (Rename)class, attribute, operationrename RL (Rlation)classadd/delete-relationship, add/delete-aggregation IH (Inheritance)classadd/delete-inheritance Pointcut cname(‘Customer’) || cname(‘Invoice’) Aspect name : Logging Advice Join Point Type : Open Class Add “log()”method to join point

POSL posl.minnie.ai.kyutech.ac.jp 8 There might be situations in which a modeler wants to introduce domain-specific notations and JPMs. AspectM is nice, but … pointcut- body := !DCEntityContract_UniqueId_isUserAssigned(*) advice-body := >log() {isUserAssigned=false} {isUserAssigned=true}

POSL posl.minnie.ai.kyutech.ac.jp 9 AspectM extension mechanism AspectM metamodel AspectM model introduce a new kind of domain-specific model element modify the AspectM metamodel reflect reify MMAP extension point new model element protocols Reflective Model Editor Base level Meta level Editing-time structural reflection DSL Components

POSL posl.minnie.ai.kyutech.ac.jp 10 MMAP Extension points  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 Primitive predicates  predicates for navigating the AspectM metamodel AspectM metamodel Class Element Aspect Element extension pointexample of extension operations

POSL posl.minnie.ai.kyutech.ac.jp 11 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") 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") meta-class-of member-of meta-class-of member-of value-of Base level Meta level

POSL posl.minnie.ai.kyutech.ac.jp 12 Overview of reflective model editor Base Editor Meta Editor 1.Execute extension operations. 2.Assign a graphic notation to a new model element. 3.Regenerate the metamodel. 4.Restart the base editor. Extension Procedure

POSL posl.minnie.ai.kyutech.ac.jp 13 Overview of Reflective Model EditorDemonstration Base Editor Meta Editor 1.Execute extension operations 2.Assign a graphic notation to a new model element 3.Regenerate the metamodel 4.Restart the base editor Extension Procedure Base Editor Invoke the Meta Editor

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

15 New model elements are added to the pallet Base Editor 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

16 Base Editor Meta Editor Reusable DSL component

POSL posl.minnie.ai.kyutech.ac.jp Verification mechanism

POSL posl.minnie.ai.kyutech.ac.jp What should be checked ? Structural correctness (Syntax check) Intention of a modeler (Semantic check) 18

POSL posl.minnie.ai.kyutech.ac.jp [Syntax Check] Structural correctness Consistency between base models and metamodel –Base models might not conform to metamodel if it evolves (metamodel can be modified by a modeler). –A woven model might not conform to metamodel even if each base model before weaving conforms to metamodel (aspects can be added by a modeler). –A woven model might include inference including name conflicts, multiple inheritance and cyclic inheritance. 19 Extended Metamodel V1 check conformance Extended Metamodel V2 Base model Woven model Extended Metamodel evolution (introduce new elements) weaving check conformance & inference

POSL posl.minnie.ai.kyutech.ac.jp Model structure checker 1. Generate a default schema from the original metamodel. 2. Check whether the metamodel is extended. 3. Redefine the schema if extended. 4. Check whether a base model conforms to the extended metamodel : 2 : 3 : 4 : 5 : 6 : 7 : 8 : 9 : 10 : 11 : 12 : 13 : 14 : 15 :

POSL posl.minnie.ai.kyutech.ac.jp [Semantic Check] Intention of a modeler Assertions for checking (un)favorable properties –Captured join points might not be the points intended by a modeler. –Intended results might not be obtained when a modeler makes a mistake in specifying the precedence. –The mixture of illegal pointcut designators and illegal aspect precedence might cause an unexpected weaving. 21 Woven model check assertions Assertions super_class_of (c1, c2) attribute_of (a, c) operation_of (o, c) advice_of (a, o) class_exist (c) related_to (c1, c2) aggregate(c1, c2) composed_of (c1, c2) specified by predicates base and meta models can be navigated using predicates

POSL posl.minnie.ai.kyutech.ac.jp Assertion checker 1. Translate base and meta models into Prolog facts. 2. Generate Prolog queries from assertions. 3. Check the satisfiability. 22 A model represented in XML <ownedElement name="TransOp" xsi:type="asm:TransactionOperation" /> Prolog facts modelElement( [property('tagName', 'ownedElement'), property('name', 'TransOp'), property('xsi:type', 'asm:TransactionOperation')]) Assertion operation_of ('TransOp', 'C') Translate Check Assertion for checking the effect of a single aspect can be automatically generated.

POSL posl.minnie.ai.kyutech.ac.jp Conclusion

POSL posl.minnie.ai.kyutech.ac.jp 24 Conclusion & Future work We clarified how the metamodel extension affects the verification of the weaving. We proposed a verification mechanism for weaving in extensible AOM languages. Currently, only simple cases are shown. We must prepare verification mechanisms corresponding to the purpose of AO modeling (Behavior modification, Refinement (MDA) …) Constraints specified in metamodel can be useful for verifying a weaving.

POSL posl.minnie.ai.kyutech.ac.jp Constraint preservation In AspectM, pre-/post-conditions and invariants can be specified for rigorous modeling. However, a weaving might break the constraint specified in a model before weaving. 25 What kind of weaving should be allowed ? For example, behavior subtyping ( MDA, … ), and so on. A first step towards verifying model weaver

POSL posl.minnie.ai.kyutech.ac.jp 26 Appendix

POSL posl.minnie.ai.kyutech.ac.jp 27 Base Editor Implementation (1) -- Reflective model editor Metamodel for EMF Map model for GMF Tool model for GMF Graph model for GMF Code Generator for EMF Code Generator for GMF Code of Model Editor Code of Graphic Editor Eclipse Modeling Framework Graphical Modeling Framework Extended Metamodel Interface Graphic Editor Generator Modeler Meta Editor Core Editor Generator

POSL posl.minnie.ai.kyutech.ac.jp 28 Implementation (2) -- Model weaver Base Editor Modeler Prolog Non Woven Model Fact write convert Woven Model Weaving Model Weaver analyze pointcut Model Editor