1 An Aspect-Aware Outline Viewer Michihiro Horie and Shigeru Chiba Tokyo Institute of Technology, Japan.

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

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.
Java.sun.com/javaone/sf | 2004 JavaOne SM Conference | Session BUS JavaOne 2004 What is AOP? Gregor Kiczales AspectMentor.com and University of.
Aspect-Oriented Programming Gregor Kiczales University of British Columbia © Copyright 2004, Gregor Kiczales. All rights reserved.
359C 10/1/05 Eric Wohlstadter Introductions –Name –Degree objective/Year –Research Area (or interests) Syllabus Aspect-Oriented Programming –AspectJ –AspectC.
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.
1 Introduction to Software Engineering Lecture 42 – Communication Skills.
Aspect-oriented programming Laura Ricci A.A
Aspect-Oriented Software Development (AOSD) Tutorial #2 AspectJ Basics.
Software modularity group Gregor Kiczales Professor and NSERC/Xerox/Sierra Systems Software Design Chair University of British Columbia Principal Scientist.
Aspect-Oriented Software Development (AOSD) Tutorial #3 AspectJ - continued.
Session 15 Modeling Traceability of Concerns in Architectural Views Mark Stobbe October 29,
Aspect-Oriented Programming with AspectJ™ AspectJ.org Xerox PARC Erik Hilsdale Gregor Kiczales with Bill Griswold, Jim Hugunin, Wes Isberg, Mik Kersten.
Aspect-Oriented Software Development (AOSD) Tutorial #3 AspectJ - continued.
A Formal Model of Modularity in Aspect-Oriented Programming Jonathan Aldrich : Objects and Aspects Carnegie Mellon University.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
An Introduction to AOP Original slides developed by Julie Waterhouse and Mik Kersten for OOPSLA 2004 AspectJ Tutorial ( kerstens.org/mik/publications/aspectj-
Behavioral Patterns  Behavioral patterns are patterns whose purpose is to facilitate the work of algorithmic calculations and communication between classes.
1 Aspects and Modularity: The Hope and the Challenge Jonathan Aldrich Institute for Software Research International School of Computer Science Carnegie.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
Introduction to Aspect Oriented Programming Presented By: Kotaiah Choudary. Ravipati M.Tech IInd Year. School of Info. Tech.
Aspect Oriented Programming (AOP) in.NET Brent Krueger 12/20/13.
Aspect Oriented Programming Razieh Asadi University of Science & Technology Mazandran Babol Aspect Component Based Software Engineering (ACBSE)
Change Impact Analysis for AspectJ Programs Sai Zhang, Zhongxian Gu, Yu Lin and Jianjun Zhao Shanghai Jiao Tong University.
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.
Aspect Oriented Programming Sumathie Sundaresan CS590 :: Summer 2007 June 30, 2007.
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 Pointcut-based Architectural Interface.
Aspect Oriented Programming Gülşah KARADUMAN.
Kiczales and Mezini - FOAL AOP and Modular Reasoning [ICSE05] Start with first-principles definition of modularity and modular reasoning –localization,
Ptolemy.cs.iastate.edu Balances expressiveness and modular reasoning for aspect-oriented software development. Developer I really need to separate my crosscutting.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
A Distributed Aspect-Oriented System for J2EE Applications Muga Nishizawa and Shigeru Chiba (Tokyo Institute of Technology, Japan) Background - As benefits.
Design Rules for Increasing Modularity with CaesarJ Carlos Eduardo Pontual Advisor: Paulo Borba 17/06/2010.
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.
Aspect-Oriented Programming and Modular Reasoning G. KiczalesM. Mezini Presented by Alex Berendeyev.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
1 Contract-based Verification for Aspect-oriented Refactoring Naoyasu Ubayashi(Kyushu Institute of Technology) Jinji Piao(Kyushu Institute of Technology)
Applying Translucid Contracts for Modular Reasoning about Aspect and Object Oriented Events Mehdi Bagherzadeh Gary T. Leavens Robert Dyer Foundations of.
Alloy-based Lightweight Verification for Aspect-oriented Architecture Naoyasu Ubayashi(Kyushu Institute of Technology) Yuki Sato(Kyushu Institute of Technology)
AOP and observer pattern. Design pattern General reusable solution to a commonly occurring problem in software design Not a finished design that can be.
1 CSE 331 Model/View Separation and Observer Pattern slides created by Marty Stepp based on materials by M. Ernst, S. Reges, D. Notkin, R. Mercer, Wikipedia.
Comparison of Different AOP Approaches Presented by: Xiaojing Wang.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
AOSD'04, Lancaster, UK 1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech) Shigeru Chiba (Tokyo Tech) Michiaki Tatsubori.
R R R A Brief Introduction to Aspect-Oriented Programming.
CSC450 Software Engineering Devon M. Simmonds University of North Carolina, Wilmington 1.
AspectScope: An Outline Viewer for AspectJ Programs Michihiro Horie, Shigeru Chiba Tokyo Institute of Technology, Japan.
AOP with AspectJ Awais Rashid, Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
1 An AOP Implementation Framework for Extending Join Point Models Naoyasu Ubayashi(Kyushu Institute of Technology, Japan) Hidehiko Masuhara(University.
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
Implementing Distribution and Persistence Aspects with AspectJ WAS CLASS.
AspectJ Development Tools Mik Kersten University of British Columbia October 28, 2003.
PPL 2004, Gamagori, AICHI1 Remote Pointcut - A Language Construct for Distributed AOP Muga Nishizawa (Tokyo Tech, Japan) Shigeru Chiba (Tokyo Tech, Japan)
An Interface Mechanism for Encapsulating Weaving in Class-based AOP
Aspect-Oriented Generation of the API Documentation for AspectJ
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
A Brief Introduction to Aspect-Oriented Programming
Aspect-oriented programming
Presentation transcript:

1 An Aspect-Aware Outline Viewer Michihiro Horie and Shigeru Chiba Tokyo Institute of Technology, Japan

2 Our purpose Problem: difficulty to understand relationships between programs and aspects  Obliviousness: aspects and classes separately specified  Must understand whole system to understand one class Solution:  Overcome program and aspects separation in visualization  But keep obliviousness in the code  To ensure code/visualization consistency: need for automatic tools

3 AJDT AJDT shows  Join points selected by pointcuts For AJDT,  AOP is an event-based programming.  AJDT shows the locations of events. No modular reasoning  Broken encapsulation  Developers must see the internal implementation of a class to understand the program behavior.

4 Our solution: AspectScope Overcomes the limitations of AJDT Preserves modular reasoning  More abstract reasoning  Helps better understand programs

5 AspectScope An outline viewer of a class  Eclipse plug-in for AspectJ  It shows the outline of a class woven with an aspect Modules = classes, methods and fields Generates javadoc comments for modules  Document how and when aspects extend their behavior ここに AspectScope の図 outline javadoc

6 Modular reasoning AspectScope enables modular reasoning  No show of source code (the implementation of methods)  Encapsulation is preserved.  Still shows enough information to help understanding In AspectScope, a n aspect is an extension to a class.  AspectScope shows an extension by an aspect as part of “the specification of a module interface”.

7 Modular reasoning Concrete benefit:  Abstracts the differences between some kinds of pointcuts, to simplify visualization  Concrete example: unified representation of “execution pointcuts” and “call pointcuts”

8 Execution pointcut visualized by AspectScope  AspectScope indicates… an advice extends the behavior of a callee method. after(): execution(void Point.setX(int)) { Display.update(); }

9 Call pointcut(also get & set) AJDT indicates..  An advice intercepts a call in a caller method. AJDT Editor after(): call(void Point.setX(int)) { Display.update(); } Caller class

10 Call pointcut(also get & set) Unlike AJDT, AspectScope indicates...  An advice extends the behavior of a callee method. AspectScope after(): call(void Point.setX(int)) { Display.update(); } Callee class

11 Aspects as conditional extensions In AspectScope, aspects are module extensions  But can be conditional: within and cflow pointcuts  Extension only if a caller satisfies a condition after(): call(void Point.setX(int)) && within(Line) { Display.update(); } Conditional extension

12 javadoc comments Automatically generated or gathered from from source code of methods and advices From the implementation of setX() From the pointcut definition From the advice definition

13 Explaining pointcuts Interprets all AspectJ’s pointcuts into “developer English” pointcut move() : call(void Shape+.set*(int)) || call(void Shape+.moveBy(..)); after(): move() && within(Line) { Display.update(); } Wild cards *, +, and.. are expanded to concrete name. void setX(int)

14 Concrete example 1: Observer aspect An advice is executed when a setter method is called. Shape … Point setX(int x) setY(int y) … Line setP1(Point p1) setP2(Point P2) … Rectangle … Display update() … * 1 pointcut change() : call(void Shape+.set*(..)); after(): change() && !cflowbelow(change()) { Display.update(); } The advice is not executed when setX() is called within setP1() in Line.

15 AspectScope vs. AJDT AJDT Editor AJDT shows join point shadow at a caller side. AspectScope AspectScope shows how setP1() is extended for notifying an observer of updates.

16 Concrete example 2: Logging aspect Print a log message just before a method in Canvas calls draw() in Graphics. class Canvas { Image image; : void paint(Graphics g) { : g.draw(image); : } : } aspect LoggingAspect { before(): call(* Graphics.draw(..)) && within(Canvas) { System.out.println(“log”); }

17 AspectScope vs. AJDT AJDT Editor AspectScope AspectScope shows the extension to a callee-side method. AJDT shows a caller-side expression. before() : call(void Graphics.draw(Image)) && within(Canvas) { System.out.println(…); }

18 Related Work Aspect-Aware Interface [Kiczales et al. ‘05]  It shares basic ideas with AspectScope.  Conceptual framework for modular reasoning. This paper does not mention call, get, and set pointcuts. No javadoc comments. Not a practical development tool, unlike AspectScope. Classbox/J [Bergel et al. ‘05]  Similar to the interpretation of aspects by AspectScope.  Enables an extension only effective to a particular module.

19 Conclusion AspectScope: A programming tool for AspectJ  An outline viewer of a class  It shows the outline of a class woven with an aspect Declared methods and fields javadoc comments for the methods and fields How and when the aspect extends their behavior  It enables modular reasoning

20 public aspect UpdateSignaling { Point Point.getLocation() { … } : } Intertype declaration  AspectScope indicates appended methods and fields.