1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University.

Slides:



Advertisements
Similar presentations
Mohamed ElBendary and John Boyland University of Wisconsin-Milwaukee.
Advertisements

Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 32 Slide 1 Aspect-oriented Software Development.
1 An Aspect-Aware Outline Viewer Michihiro Horie and Shigeru Chiba Tokyo Institute of Technology, Japan.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Secure Systems Research Group - FAU Aspect Oriented Programming Carlos Oviedo Secure Systems Research Group.
University of British Columbia Software Practices Lab Fluid AOP Join Point Models Terry Hon Gregor Kiczales.
University of British Columbia Software Practices Lab 2005 CASCON A Fluid AOP Editor Terry Hon Gregor Kiczales.
ASPECT ORIENTED SOFTWARE DEVELOPMENT Prepared By: Ebru Doğan.
University of British Columbia Software Practices Lab CAS Seminar 06 Fluid AJ - A Simple Fluid AOP Tool Terry Hon Gregor Kiczales.
Aspect Oriented Programming Written by Michael Beder.
Harmless Advice Daniel S Dantas Princeton University with Prof. David Walker.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Tool support for crosscutting concerns of API documentation Michihiro Horie, Shigeru Chiba Tokyo Institute of Technology, Japan.
1 Metamodel Access Protocols for Extensible Aspect-Oriented Modeling Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Shinji Sano(Kyushu Institute.
Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) 1 A Small Extension to Java for Class Refinement ACM SAC'08, March 18, 2008.
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.
Modularizing Web Services Management with AOP María Agustina Cibrán, Bart Verheecke { Maria.Cibran, System and Software Engineering.
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.
Joel Phinney March 31, ◦ Concerns  Separation of Concerns, Tangled and Scattered Concerns, Cross-Cutting Concerns, Aspects ◦ Aspect-Oriented Software.
1 Model Evolution with Aspect-oriented Mechanisms Naoyasu Ubayashi (Kyushu Institute of Technology) Tetsuo Tamai (University of Tokyo) Shinji Sano, Yusaku.
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
AOSD1 Aspect-Oriented Software Design Karl Lieberherr Theo Skotiniotis.
TRANSPARENT EXTENSION OF SINGLE- USER APPLICATIONS TO MULTI-USER REAL-TIME COLLABORATIVE SYSTEMS An Aspect Oriented Approach to Framework Integration ICEIS.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
AspectWrapper CHALFOUN Pierre et BUIST Éric. Overview Introduction – what and why In a nutshell – main components Our approach – how we did it Demo –
Introduction Better Faster Cheaper (pick any two) On-going issue that continues to motivate research in software engineering Applications: –continue to.
Virtual Support for Dynamic Join Points C. Bockisch, M. Haupt, M. Mezini, K. Ostermann Presented by Itai Sharon
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Region Pointcut for AspectJ Shumpei Akai Shigeru Chiba Muga Nishizawa.
AspectJ – AOP for Java Tom Janofsky. Instructor at Penn State Abington Consultant with Chariot Solutions JUG Member.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
1 Contract-based Verification for Aspect-oriented Refactoring Naoyasu Ubayashi(Kyushu Institute of Technology) Jinji Piao(Kyushu Institute of Technology)
Topics for exam in AOSD Basic concepts: tangling, scattering, joinpoint, advice, cross-cutting, weaving AspectJ: syntax, pointcut notations, around, proceed,
Demeter Aspects We study techniques for the emerging area of Aspect-Oriented Software Development and focus on the following areas:  Aspectual Collaborations.
Aspect Oriented Development Alex Beatty.  Purpose  Cross-cutting Concerns  Join Points, Pointcuts, and Advices  Weaving  Invasive vs. Non-Invasive.
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
AOP-Driven Variability in Software Product Lines Vander Alves, Ayla Dantas, and Paulo Borba Informatics Center – UFPE – Brazil
POSL (Principles of Software Languages) Gr. Kyushu Institute of Technology, Japan 1 A Verification Mechanism for Weaving.
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.
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
Applying Aspect-Orientation in Designing Security Systems Shu Gao Florida International University Center for Advanced Distributed Systems Engineering.
1 Separation of Context Concerns --- Applying Aspect Orientation to VDM Naoyasu Ubayashi (Kyushu Institute of Technology) Shin Nakajima (National Institute.
R R R A Brief Introduction to Aspect-Oriented Programming.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Spring 2012.
AspectScope: An Outline Viewer for AspectJ Programs Michihiro Horie, Shigeru Chiba Tokyo Institute of Technology, Japan.
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
PPL 2004, Gamagori, AICHI1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech, Japan) Shigeru Chiba (Tokyo Tech, Japan)
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 Generation of the API Documentation for AspectJ
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Discussion with Gregor Kiczales at UBC
Distributed Dynamic Weaving is a Crosscutting Concern
Structuring Adaptive Applications using AspectJ and AOM
An Extensible Contract Verifier for AspectJ
Aspects at the Design Level
AspectAda Aspect-Oriented Programming for Ada95
Presentation transcript:

1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University of Tokyo, Japan) Tetsuo Tamai(University of Tokyo, Japan) June 15, 2004 RAM-SE’04 ECOOP 2004 Workshop on Reflection, AOP and Meta- Data for Software Evolution

2 Overview 1. Motivation -- Join Point Model evolution 2. MOPs for Join Point Model extensions 3. Towards reflection for AOP 4. Related work 5. Conclusion

3 1. Motivation

4 Software evolution in AOP AOP is effective in unanticipated software evolution because crosscutting concerns can be added or removed without making invasive modifications to original programs. core concerns added removed core concerns core concerns concern space evolution crosscutting concerns

5 But, … Software evolution would be restricted if new crosscutting concerns cannot be described with the existing JPMs (join point models). core concerns new type of crosscutting concerns cannot be added core concerns core concerns concern space evolution crosscutting concerns

6 JPM --- Essence of AOP Join points Means of identifying the join points (pointcut) Means of raising effects at the join points (advice)

7 When do we need new kinds of JPMs? We want to extend the existing JPMs slightly in order to adapt to application-specific purposes. We want to use more than one JPM simultaneously.

8 Motivating example aspect ProtocolCheck { pointcut someProtocol(): call(void *.someMethod*()) ; before() : someProtocol() { code for logging } } Version 1 classA someMethodA() aspect ProtocolCheck AspectJ JPM classB someMethodB() classC someMethodC()

9 Motivating example (cont.) aspect ProtocolCheck { pointcut someProtocol(): call(void *.someMethod*()) ; before() : someProtocol() { code for logging } pointcut someProtocolError(): !calling-sequence(void *.{someMethodA(), someMethodB(), someMethodC()}) ; before() : someProtocolError() { code for error handling } } Version 2 AspectJ JPM classA someMethodA() aspect ProtocolCheck classB someMethodB() classC someMethodC() we want to add a checking for calling sequence (someMethodA -> someMethodB -> someMethodC) But, we cannot add a new pointcut because we cannot extend AspectJ JPM. But, we cannot add a new pointcut because we cannot extend AspectJ JPM.

10 Current AOP languages … Each of current AOP languages is based on a few fixed set of JPMs. Many different JPMs have been proposed, and they are still evolving so that they better modularize various crosscutting concerns. There are crosscutting concerns that may not be modularized with current JPMs.

11 Our research Goal: Computational Reflection for AOP Base level (program based on JPM) Meta level (implementation of JPM) reify reflect MOPs for JPM extensions This talk focuses on MOPs for JPM extensions (our initial result). We developed X-ASB (eXtensible Aspect Sand Box), a framework for rapid-prototyping new JPMs.

12 2. MOPs for Join Point Model extensions

13 eval-program MOPs for JPM extensions [Program execution model] policy of program execution (AspectJ-like policy, traversal policy, etc.) [Join point model] join point pointcut (evaluator for selecting join point) advice (computation at a join point) lookup-A-ID lookup-B-ID effect-A A-ID effect-B B-ID MOP B - program X - computation or program X JP - join point ID A - means of identifying ID B EFF A EFF B - means of effecting META - weaving parameter register-pcd register-jp AOP Language Model Masuhara & Kiczales model [ECOOP 2003]

14 Steps for modular weaver construction Step 1: define kinds of join points Step 2: define kinds of pointcuts Step 3: define a body of weaver, and computation at join points

15 Construction of AspectJ-like weaver eval-program register-jp register-pcd lookup-A-ID lookup-B-ID effect-A effect-B call-method join point program execution tree weaver MOPs Weaver [written in Scheme] (define weaver (lambda (pgm meta) (register-jp) (register-pcd) (eval-program pgm meta))) Step 1: define kinds of join points (define register-jp (lambda () (register-one-jp 'call-method generate-call-jp))) Step 2: define kinds of pointcuts (define register-pcd (lambda () (register-one-pcd 'call call-pcd?))) Step 3: define a body of weaver, and computation at join points (define call-method (lambda (mname obj args) (computation-at-jp ((lookup-jp-generator 'call-method) mname obj args) null))) (define computation-at-jp (lambda (jp param) (let* ((A-ID (lookup-A-ID jp param)) (B-ID (lookup-B-ID jp param))) (effect-B B-ID jp (lambda () (effect-A A-ID jp param)) param))))

16 Extension of AspectJ-like weaver (define register-pcd (lambda () (register-one-pcd 'calling-sequence calling-sequence-pcd?))) A new pointcut designator (calling-sequence) can be added to AspectJ-like weaver eval-program register-jp register-pcd lookup-A-ID lookup-B-ID effect-A effect-B call-method join point program execution tree weaver MOPs

17 3. Towards reflection for AOP

18 Evolution of JPMs Evolution by language developers Evolution by application developers The effectiveness in software evolution would be restricted if language developers must extend JPMs whenever application programmers need new kinds of JPMs. Reflection for AOP It would be better for application programmers to be able to add new JPMs using MOPs within the base language.

19 Reflection in X-ASB (class sample-protocol-error-detection object (method int m1 () (...)) (method int m2 () (...)) (after (calling-sequence (not (list 'm1 'm2 'm3))) (write 'invalid-calling-sequence) (newline))) (class sample-calling-sequence object (method void register-pcd () (meta register-one-pcd 'calling-sequence 'calling-sequence-pcd?) (super register-pcd)) (method boolean calling-sequence-pcd?...)) Scheme-based language Base level Meta level --- power of reflection is still limited

20 4. Related Work

21 Related Work XAspect [Shonle, Lieberherr, and Shah, 2003]: extensible domain-specific AOP language that adopts plug-in mechanisms. Adding a new plug-in module, we can use a new kind of aspect-oriented facility. Josh [Chiba and Nakagawa, 2004]: open weaver that can define a new pointcut construct as a boolean function. Using X-ASB, we can add not only new pointcut constructs but also new kinds of join points and advice.

22 5. Conclusion

23 Conclusion We proposed mechanisms for extending JPMs in order to support unanticipated software evolution. Using X-ASB, we can introduce new kinds of JPMs when we face new kinds of crosscutting concerns that cannot be handled by existing JPMs.