Towards a Standard Interface for Runtime Inspection in AOP Environments OOPSLA Workshop on Tool for AOSD, Seattle, November 2002 Katharina Mehner and Awais.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Chapter 4 Loops Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved
2006 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
1 Classes and Objects in Java Basics of Classes in Java.
1 Inheritance Classes and Subclasses Or Extending a Class.
1 Multithreaded Programming in Java. 2 Agenda Introduction Thread Applications Defining Threads Java Threads and States Examples.
Design Patterns.
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
© 2005 by Prentice Hall Chapter 13 Finalizing Design Specifications Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Program Verification Using the Spec# Programming System ETAPS Tutorial K. Rustan M. Leino, Microsoft Research, Redmond Rosemary Monahan, NUIM Maynooth.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
© Near Infinity Corporation Using AOP for Enterprise Auditing of J2EE Applications AOSD Practitioners Report March 17, 2005.
AspectWerkz 2 - and the road to AspectJ 5 Jonas Bonér Senior Software Engineer BEA Systems.
1 Resonance: Dynamic Access Control in Enterprise Networks Ankur Nayak, Alex Reimers, Nick Feamster, Russ Clark School of Computer Science Georgia Institute.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
0 - 0.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Making the System Operational
Lecture 10 Flow of Control: Loops (Part 2) COMP1681 / SE15 Introduction to Programming.
ZMQS ZMQS
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Week 2 The Object-Oriented Approach to Requirements
Software change management
Debugging operating systems with time-traveling virtual machines Sam King George Dunlap Peter Chen CoVirt Project, University of Michigan.
11 Contracts CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 6)
Campus02.at don't stop thinking about tomorrow DI Anton Scheibelmasser Setubal ICINCO /25 Device integration into automation systems with.
1 Quality of Service Issues Network design and security Lecture 12.
Campaign Overview Mailers Mailing Lists
Eiffel: Analysis, Design and Programming Bertrand Meyer (Nadia Polikarpova) Chair of Software Engineering.
ABC Technology Project
Trap Diagnostic Facility Todays Software Diagnostic Tool with innovative features for the z/OS software developer Arney Computer Systems.
Component-Based Software Engineering Main issues: assemble systems out of (reusable) components compatibility of components.
1 public class Newton { public static double sqrt(double c) { double epsilon = 1E-15; if (c < 0) return Double.NaN; double t = c; while (Math.abs(t - c/t)
Requirements Analysis Moving to Design b521.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Software processes 2.
Global Analysis and Distributed Systems Software Architecture Lecture # 5-6.
Chapter 5 Test Review Sections 5-1 through 5-4.
This work was partially funded by the RNTL initiative (LUTIN project) 1 Refactoring to Object-Oriented Design Patterns Mikal Ziane (LIP6 and Université.
Chapter 5 Loops Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 15 Programming and Languages: Telling the Computer What to Do.
Week 1.
Lilian Blot CORE ELEMENTS SELECTION & FUNCTIONS Lecture 3 Autumn 2014 TPOP 1.
We will resume in: 25 Minutes.
1 Unit 1 Kinematics Chapter 1 Day
13-1 © Prentice Hall, 2004 Chapter 13: Designing the Human Interface (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
16/02/06Internet based monitoring and control of embedded systems 1 EES.5413 February 16, 2005 Remi Bosman System Architecture & Networking Department.
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
L6:CSC © Dr. Basheer M. Nasef Lecture #6 By Dr. Basheer M. Nasef.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 3 Loops.
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
Joel Phinney March 31, ◦ Concerns  Separation of Concerns, Tangled and Scattered Concerns, Cross-Cutting Concerns, Aspects ◦ Aspect-Oriented Software.
CCC: An Aspect-Oriented Intermediate Language on.Net Platform Yingfei Xiong and Feng Wan University of Electronic Science and Technology of China, China.
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.
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.
Aspect-Oriented Programming with the Eclipse AspectJ plug-in
Towards Effective Adaptive User Interfaces Design
CSE 1020:Software Development
Presentation transcript:

Towards a Standard Interface for Runtime Inspection in AOP Environments OOPSLA Workshop on Tool for AOSD, Seattle, November 2002 Katharina Mehner and Awais Rashid

K. Mehner 2Lancaster University Motivation During development and maintenance programmers need to develop an understanding of structure and behaviour Programmers cannot easily determine the effects of aspects –Quantification: Aspects apply to many places –Obliviousness: Components unaware of aspects –Aspect interference

K. Mehner 3Lancaster University Example – Dynamic binding class B extends A { public void m(){ //override A.m() } class Application{ static void main(String args[]){ A a1 = new A; A a2 = new B; a1.m(); a2.m(); } class A{ public void m(){ //do something } aspect TraceA{ after(): call (void A.m()){ System.out.println(“ } aspect TraceB after(): execution (void B.m()){ System.out.println(“execution of B.m()”) } Which code do aspects affect? Code is affected by which aspects? ? ?

K. Mehner 4Lancaster University Editor support (1) class B extends A { public void m(){ //override A.m() } class Application{ static void main(String args[]){ A a1 = new A; A a2 = new B; a1.m(); a2.m(); } class A{ public void m(){ //do something } aspect TraceA{ after(): call (void A.m()){ System.out.println(“ } aspect TraceB after(): execution (void B.m()){ System.out.println(“execution of B.m()”) } Automated tool support can identify affected method declarations

K. Mehner 5Lancaster University Editor support (2) class B extends A { public void m(){ //override A.m() } class Application{ static void main(String args[]){ A a1 = new A; A a2 = new B; a1.m(); a2.m(); } class A{ public void m(){ //do something } aspect TraceA{ after(): call (void A.m()){ System.out.println(“ } aspect TraceB after(): execution (void B.m()){ System.out.println(“execution of B.m()”) } Automated tool support can identify affected method call sites

K. Mehner 6Lancaster University Running the example class B extends A { public void m(){ //override A.m() } class Application{ static void main(String args[]){ A a1 = new A; A a2 = new B; a1.m(); a2.m(); } class A{ public void m(){ //do something } aspect TraceA{ after(): call (void A.m()){ System.out.println(“ } aspect TraceB after(): execution (void B.m()){ System.out.println(“execution of B.m()”) } >> call to A.m() >> execution of B.m() >> Aspects depend on dynamic binding Effects of dynamic binding not statically computable

K. Mehner 7Lancaster University Many more problems… Aspect behaviour is highly dynamic –Depending on dynamic binding –Conditions on joinpoints evaluated at runtime –Dynamic aspects –Aspects introducing new join points –Aspects changing inheritance structure Inter-Aspect relations –Interference –Dependencies Limitations for formal analysis –Static analysis of dynamic binding NP-hard –Similar results for all dynamic issues

K. Mehner 8Lancaster University Outline Requirements Proposed solution State-of-the-art runtime inspection Runtime inspection for AOP Example revisited

K. Mehner 9Lancaster University Requirements Problems are highly dynamic Get missing information from execution! Cumbersome and error prone without tool support –Macros and printlines –Forgetting statement and branches (“sampling errors“) Debuggers –Only show one state at a time –No history recording nor a complete picture –Stepwise only is timeconsuming Automated Tracing –Recording history Test case generation (not addressed here) –Coverage by user chosen input error prone

K. Mehner 10Lancaster University Proposed solution: Tool support Runtime information is essential Used by many different tools –Debugging, Tracing, Monitoring,… General instead of adhoc solution Standardization for –Implementation/Architecture –Control model –Data format –Debug information –Visualizations

K. Mehner 11Lancaster University Events Inspection Control Reflection State-of-the-art runtime inspection Events –Predefined list of observable events (program continues) –Event records (limited information) –Filters Inspection –Entire state (only available if program stopped) –No history recording

K. Mehner 12Lancaster University Events Inspection Control Reflection State-of-the-art runtime inspection Control –Stop/continue on events, break-, watchpoints –Step –Stop/continue individual threads –Record & replay Reflection –Separate API

K. Mehner 13Lancaster University Events Inspection Control Reflection What extensions are needed? Cover aspect states Extend granularity of execution steps Runtime changes to aspect order Extensions for every layer of runtime inspection How to we determine –New event types? –State information needed? –Execution granularity and break-/watchpoints? Base it on a general approach Aspect events

K. Mehner 14Lancaster University A Generic AOP model Open issues –Granularity of aspect event model –Granularity of aspect state model Runtime perception influenced by implementation approaches Uniform Approach Based on Generic AOP model

K. Mehner 15Lancaster University Example: Advice weaves Statics: predefined event types, matches, predicates, … Dynamics: Chain of related actions –Match Matched Event, Parameters Quantifying predicate (Pointcut) Condition evaluation List of triggered activities Order/Conflict Resolution –Execution of activities Recursion: Triggers new chains…

K. Mehner 16Lancaster University Event model for advices Advices triggered by OO events –Extend existing event record with chain Chain accessible indepently from OO events –Create new events for actions in chain Trade-Off Conflict resolution –results in order –be more explicit Configurable events

K. Mehner 17Lancaster University Example Revisited:Tracing Method Calls TimeEvent typeCallerCalleeMethod/ Advice Matched Event Advice List Point cut Condi tions …………….………… 1M_Entrymaina1: Avoid m() 2M_Exitmaina1: Avoid m() class Application{ static void main(String args[]){ A a1 = new A; A a2 = new B; a1.m(); a2.m(); } When does the match take place? OO event model insufficient! Detach message sent from method call! aspect TraceA{ after(): call (void A.m()){ System.out.println(“ }

K. Mehner 18Lancaster University Trace format for AspectJ advice TEvent typeCallerCalleeMethod/A dvice Matched Event Advice List Pointc ut Cond itions … 3JP_MatchRef [1,2]TraceA. after(): call(void m()) After() :call (void m()) - 4Advice_ Activ TraceA. after(): call(void m()) 5Advice_ Exec TraceAafter(): call (void m()) 6M_EntryTraceAOutprintln()

K. Mehner 19Lancaster University UML trace

K. Mehner 20Lancaster University Useful trace information Compare traces with static analysis Add partial information to editor Classification of runtime information

K. Mehner 21Lancaster University Conclusion Runtime information can improve understanding of aspects Adapt runtime inspection models from other areas of software development Make the right choices for extensions based on generic AOP model

K. Mehner 22Lancaster University The end