359C 10/1/05 Eric Wohlstadter Introductions –Name –Degree objective/Year –Research Area (or interests) Syllabus Aspect-Oriented Programming –AspectJ –AspectC.

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

ASTA Aspect Software Testing Assistant Juha Gustafsson, Juha Taina, Jukka Viljamaa University of Helsinki.
©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.
Secure Systems Research Group - FAU Aspect Oriented Programming Carlos Oviedo Secure Systems Research Group.
Aspect-Oriented Programming In Eclipse ® Aspect-Oriented Programming in Eclipse with AspectJ Dr Helen Hawkins and Sian January.
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.
359D 9/1/06 Eric Wohlstadter Course Format –Discussions –Assignments Aspect-Oriented Programming –AspectJ Introductions.
University of British Columbia Software Practices Lab 2005 CASCON A Fluid AOP Editor Terry Hon Gregor Kiczales.
359D 16/1/07 Eric Wohlstadter What is Middleware? What is Aspect-Oriented Programming? Introductions Course Format –Discussions –Assignments.
1 Aspect Oriented Programming Programming Languages Seminar Presenter: Barış Aktemur University of Illinois 18 Feb Mostly taken from Bedir Tekinerdogan’s.
October - December 2013CSC5021: The Problem With Aspects (J P Gibson)1 The Problem With Aspects (AOP) A style of programming that attempts to abstract.
Aspect-Oriented Software Development (AOSD) Tutorial #2 AspectJ Basics.
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 Software Development (AOSD) Tutorial #2 AspectJ Basics.
(c) Copyright Palo Alto Research Center Incroporated. All rights reserved.1 AO Tools: State of the (AspectJ™) Art and Open Problems Mik Kersten.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Software modularity group Gregor Kiczales Professor and NSERC/Xerox/Sierra Systems Software Design Chair University of British Columbia Principal Scientist.
More on AspectJ. aspect MoveTracking { private static boolean _flag = false; public static boolean testAndClear() { boolean result = _flag; _flag = false;
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.
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
Introduction to Aspect- Oriented Programming CS 3360 Gregor Kiczales, et. al. Getting started with AspectJ, CACM, 44(10):59-65, October Fall 2012.
An Introduction to AOP Original slides developed by Julie Waterhouse and Mik Kersten for OOPSLA 2004 AspectJ Tutorial ( kerstens.org/mik/publications/aspectj-
Outline Introduction Problem Statement Object-Oriented Design Aspect-Oriented Design Conclusion Demo.
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.
Session 2: AspectJ Mark Stobbe September 13,
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
CISB594 – Business Intelligence
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
1 An Aspect-oriented Weaving Mechanism Based on Component-and-Connector Architecture Naoyasu Ubayashi (Kyushu Institute of Technology) February 12, 2008.
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,
Research Methods and Techniques Lecture 8 Technical Writing 1 © 2004, J S Sventek, University of Glasgow.
Methodology: The AOP Refactoring Process Aspect-Oriented Refactoring of the Apache Cocoon Shared-Object Resource Allocation System Jeff Dalton Advisor:
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.
HE 520: Higher Education Laws and Regulations Unit One Seminar Pre-Seminar Welcome to HE 520: Higher Education Laws and Regulations, Unit One Seminar Seminar.
AOP-1 Aspect Oriented Programming. AOP-2 Aspects of AOP and Related Tools Limitation of OO Separation of Concerns Aspect Oriented programming AspectJ.
Devon M. Simmonds Computer Science Department, CSC592 1 Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington
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.
Inter-Type Declarations in AspectJ Awais Rashid Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
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.
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)
Aspect Mining Jin Huang Huazhong University of Science & Technology, China
AOP and observer pattern. Design pattern General reusable solution to a commonly occurring problem in software design Not a finished design that can be.
aspectj tools new and noteworthy Mik Kersten University of British Columbia Adrian Colyer IBM Hursley OOPSLA, October
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.
University of British Columbia Software Practices Lab Uniform Support for Modeling Crosscutting Structure Maria Tkatchenko Gregor Kiczales Work supported.
AspectJ Development Tools Mik Kersten University of British Columbia October 28, 2003.
Structuring OS Aspects how do small aspects compose? Yvonne Coady, Gregor Kiczales, Mike Feeley, Norm Hutchinson, Joon Suan Ong University of British Columbia.
Course Overview Stephen M. Thebaut, Ph.D. University of Florida Software Engineering.
An Interface Mechanism for Encapsulating Weaving in Class-based AOP
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Structuring Adaptive Applications using AspectJ and AOM
software modularity group
Presentation transcript:

359C 10/1/05 Eric Wohlstadter Introductions –Name –Degree objective/Year –Research Area (or interests) Syllabus Aspect-Oriented Programming –AspectJ –AspectC

Course Format Two research papers per class Paper review for three out of four papers per week Each paper will be presented by a student in a short (10-15 minute) informal slide presentation Class discussion Introduction to new topics Throughout the term students are required to complete a programming or research project

Paper Reviews Between 3/4 and 1 page. –Suggestion: Times New Roman Font, single spacing, with 1 inch margins. Use a minimum of spacing between sections. Reviews will be graded on a 0-2 point scale and returned the following day of class Paper summary and answers to 5 questions

Question #1 Who will benefit from the research described in this paper and in what way will they benefit? Describe the individual's role (ex. programmer) the task performed by the individual (ex. debugging aspect-oriented programs), and the benefit (ex. makes clear how aspect-code relates to object-model)

Question #2 What are two contributions claimed by the paper authors?

Question #3 For each each contribution claim, describe how the claim is validated and whether you think the validation is convincing.

Question #4 Do you think each contribution is novel? Why or why not? If you are not familiar with the area, base your judgment on the credibility of any novelty arguments put forth in the paper. Also, use any other papers read in class as a basis.

Question #5 What opportunities for future research can you see in this area? If you are not familiar with the area, you can base your answer on a future research direction outlined in the paper.

Term Project Research proposal or a programming project Related to a topic covered in class Projects can be completed individually or in groups A one page preliminary proposal is required for both project options Group projects must include an additional 1/2 page describing how responsibility is to be divided 20 minute (+10 mins per person) class presentation at the end of the term

Research Project Ten page research proposal Argue why current work does not address a significant problem in software development You are not required to have a fully developed solution, only a proposed new direction The paper will consist of the following sections: Introduction, Background, Proposed Research, Proposed Validation It is required that at least ten sources not discussed in class are referenced in the paper References must come from certain acceptable conferences or journals (see web page) or checked with me before being used

Programming Project Become familiar with the tools, languages, and platforms that enable the adaptation of existing software The project presentation can be a traditional slide presentation or a "live" software demonstration Students giving a traditional slide presentation will demo their software to me in office hours Submission of all source code and an informal two page documentation is required

Attendance Attendance is required You will not be able to submit paper reviews for classes which you did not attend Exceptions will be made for students with documented medical excuses or academic related travel obligations

Grading Project proposal 10% Paper or Implementation 40% Project Presentation 20% Reviews/Presentation 30%

Software Adaptation Topics Aspect-Oriented Programming Interception Aspect-Oriented Middleware Adaptive Middleware/Servers Kernel Transport/Session Layer Context Sensitivity Resource Management Software Architecture Verification Gaming

Consider developing… a simple drawing application (JHotDraw)

Intuitively thinking of objects? Points, Lines… Drawing surfaces GUI Widgets … Display 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) Shape moveBy(int, int) *

class Point extends Shape { private int x = 0, y = 0; int getX() { return x; } int getY() { return y; } void setX(int x) { this.x = x; display.update(this); } void setY(int y) { this.y = y; display.update(this); } fair design modularity but poor code modularity 1 Display 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) Shape moveBy(int, int) * But some concerns “don’t fit” i.e. a simple Observer pattern crosscutting

aspect ObserverPattern { private Display Shape.display; pointcut change(): call(void Shape.moveBy(int, int)) || call(void Shape+.set*(..)); after(Shape s) returning: change() && target(s) { s.display.update(); } } ObserverPattern 2 Point getX() getY() setX(int) setY(int) moveBy(int, int) Line getP1() getP2() setP1(Point) setP2(Point) moveBy(int, int) Shape moveBy(int, int) Code looks like the design

execution(void Line.setP1(Point)) Pointcuts a pointcut is a predicate on dynamic join points that: –can match or not match any given join point –says “what is true” when the pointcut matches –can optionally expose some of the values at that join point a means of identifying dynamic join points matches method execution join points with this signature

execution(void Line.setP1(Point)) || execution(void Line.setP2(Point)); Pointcut Composition whenever a Line executes a “void setP1(Point)” or “void setP2(Point)” method pointcuts compose like predicates, using &&, || and !

execution(void Shape.moveBy(int, int)|| execution(void Shape+.set*(*)); Semantic Pointcuts whenever moveBy is executed in the Shape class or a “set” method in any Shape subclass is executed Observer Pattern Pointcut

pointcut change(Shape shape): this(shape) && (execution(void Shape.moveBy(int, int)) || execution(void Shape+.set*(*)); Values at Join Points pointcut can explicitly expose certain values demonstration, not detailed explanation parameter mechanism being used

Intertype Declaration ObserverPattern aspect ObserverPattern { private Display Shape.display; static void setDisplay(Shape s, Display d) { s.display = d; } pointcut change(Shape shape): this(shape) && (execution(void Shape.moveBy(int, int)) || execution(void Shape+.set*(*))); after(Shape shape): change(shape) { shape.display.update(s); }

Advice ObserverPattern aspect ObserverPattern { private Display Shape.display; static void setDisplay(Shape s, Display d) { s.display = d; } pointcut change(Shape shape): this(shape) && (execution(void Shape.moveBy(int, int)) || execution(void Shape+.set*(*))); after(Shape shape): change(shape) { shape.display.update(s); }

class Shape { private Display display; abstract void moveBy(int, int); } class Line extends Shape { private Point p1, p2; Point getP1() { return p1; } Point getP2() { return p2; } void setP1(Point p1) { this.p1 = p1; display.update(this); } void setP2(Point p2) { this.p2 = p2; display.update(this); } class Point extends Shape {... } Without AspectJ “display updating” is not modular –evolution is cumbersome –changes are scattered –have to track & change all callers –it is harder to think about

ObserverPattern is modular –all changes in single aspect –evolution is modular –it is easier to think about With AspectJ class Line extends Shape { private Point p1, p2; Point getP1() { return p1; } Point getP2() { return p2; } void setP1(Point p1) { this.p1 = p1; } void setP2(Point p2) { this.p2 = p2; } class Point extends Shape { private int x = 0, y = 0; int getX() { return x; } int getY() { return y; } void setX(int x) { this.x = x; } void setY(int y) { this.y = y; } aspect ObserverPattern { private Display Shape.display; static void setDisplay(Shape s, Display d) { s.display = d; } pointcut change(Shape shape): this(shape) && (execution(void Shape.moveBy(int, int)) || execution(void Shape+.set*(*))); after(Shape shape): change(shape) { shape.display.update(s); }

AspectC - problem overview some elements crosscut layers –in particular, some align with specific execution paths path-specific customizations –concern scattering –dynamic context passing –associated layer violations

we want to modularize path-specific customizations AspectC constructs solution overview pointcut path_name(p1); explicit path structure & context before function_f(p2) && path_name(p1) { /* regular C code */ } attach code to points on path localize crosscutting concerns aspect path_spec_cust { }

OS refresher layers and abstractions –virtual memory layer abstractions: virtual addresses (VM object, VM pages, page map) focus issue: nonresident page means page fault… –file system layer abstractions: files (logical blocks, buffer cache) focus issue: services VM page faults prefetching –the crosscutting concern we want to modularize –amortize disk costs according to pattern of access normal access pattern  prefetch window around address sequential  prefetch after address

Conclusion Questions? Reading for Wednesday (Read both, review AspectC paper) –Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. ECOOP –Yvonne Coady, Gregor Kiczales, Mike Feeley and Greg Smolyn. Using AspectC to improve the modularity of path-specific customization in operating system code. FSE