1 / 16

PointcutDoctor: IDE Support for Understanding and Diagnosing AspectJ Pointcuts

PointcutDoctor: IDE Support for Understanding and Diagnosing AspectJ Pointcuts. Lingdong Ye, Kris De Volder. The Solution. PointcutDoctor extends AJDT to …. The Problem. AspectJ pointcuts are hard to write: global knowledge of the code base is often required

uttara
Download Presentation

PointcutDoctor: IDE Support for Understanding and Diagnosing AspectJ Pointcuts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PointcutDoctor:IDE Support for Understanding and Diagnosing AspectJ Pointcuts Lingdong Ye, Kris De Volder

  2. The Solution PointcutDoctor extends AJDT to … The Problem • AspectJ pointcuts are hard to write: • global knowledge of the code base is often required • AspectJ pointcut and Java language are complex • The current IDE (e.g. AJDT) lacks support for the above problems 1) Show almost matched join point shadows 2) Provide diagnostic information Slide 2 February 28, 2007

  3. 1. Almost matched join points Thread Pooling: Capture join points where a thread is created. Is this pointcut correct? Listing 7.13 - AspectJ in Action : Practical Aspect-Oriented Programming, Ramnivas Laddad. Slide 3 February 28, 2007

  4. 1. Almost matched join points Thread Pooling: Capture join points where a thread is created. AJDT • We need to check the code base to ensure there are no unintended misses. • But current AJDT : • only provides a list of matches (hard to notice something that’s not in this list) • doesn’t consider the evolution of the code base. • java.lang.Thread: • Thread(Runnable) • Thread(Runnable, String) • Thread(ThreadGroup, Runnable) • Thread(ThreadGroup, Runnable, String) • Thread(ThreadGroup, Runnable, String, long) Listing 7.13 - AspectJ in Action : Practical Aspect-Oriented Programming, Ramnivas Laddad. Slide 4 February 28, 2007

  5. 1. Almost matched join points Thread Pooling: Capture join points where a thread is created. AJDT • We need to check the code base to ensure there are no unintended misses. • But current AJDT : • only provides a list of matches (hard to notice something that’s not in this list) • doesn’t consider the evolution of the code base. Listing 7.13 - AspectJ in Action : Practical Aspect-Oriented Programming, Ramnivas Laddad. Slide 5 February 28, 2007

  6. 1. Almost matched join points Thread Pooling: Capture join points where a thread is created. “Almost Matched Join Point Shadows” Pointcut Doctor “Virtual Join Point Shadows” Listing 7.13 - AspectJ in Action : Practical Aspect-Oriented Programming, Ramnivas Laddad. Slide 6 February 28, 2007

  7. 2. Diagnostic information What about this pointcut? Slide 7 February 28, 2007

  8. 2. Diagnostic information AJDT Why doesn’t it match anything? Slide 8 February 28, 2007

  9. 2. Diagnostic information AJDT Slide 9 February 28, 2007

  10. 2. Diagnostic information Pointcut Doctor Slide 10 February 28, 2007

  11. 2. Diagnostic information Pointcut Doctor Slide 11 February 28, 2007

  12. 2. Diagnostic information Pointcut Doctor Slide 12 February 28, 2007

  13. Mouse-hover Explanation Highlighting Explanation 2. Diagnostic information Pointcut Doctor Slide 13 February 28, 2007

  14. Live Demo: Adding sound effect for spacewar Slide 14 February 28, 2007

  15. Conclusion • PointcutDoctor explains a pointcut by providing answers for: • Which join points does/will (doesn’t/won’t) it match? • Why a join point is (not) matched and how to include a join point? • PointcutDoctor helps users to • ascertain whether a given pointcut is correct • diagnose and correct problems • learn the pointcut language on the fly Slide 15 February 28, 2007

  16. Thank you! Project Web Page: http://www.cs.ubc.ca/labs/spl/projects/pointcutdoctor/ Contacts: Kris De Volder: kdvolder@cs.ubc.ca Lingdong Ye: lintonye@gmail.com lintonye@cs.ubc.ca Slide 16 February 28, 2007

More Related