Aspect-Oriented Programming (AOP) strives to localize the scattered and tangled implementations of crosscutting concerns (CCCs) by allowing developers to declare that certain actions (advice) should be taken at specific points (join points) during the execution of software where a CCC (an aspect) is applicable. However, it is non-trivial to construct optimal pointcut expressions (a collection of join points) that capture the true intentions of the programmer and, upon evolution, maintain these intentions. We demonstrate an AspectJ source-level inferencing tool called Rejuvenate Pointcut, which helps developers maintain pointcut expressions over the lifetime of a software product. A key insight into the tool’s construction is that the problem of maintaining pointcut expressions bears strong similarity to the requirements traceability problem in software engineering; hence, the underlying algorithm was devised by adapting existing approaches for requirements traceability to pointcut maintenance. The Eclipse IDE-based tool identifies intention graph patterns pertaining to a pointcut and, based on these patterns, uncovers other potential join points that may fall within the scope of the pointcut with a given confidence. This work represents a significant step towards providing tool-supported maintainability for evolving aspect-oriented software.
Unraveling Multimodality with Large Language Models.pdf
Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software
1. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Rejuvenate Pointcut1
A Tool for Pointcut Expression Recovery in Evolving
Aspect-Oriented Software
Raffi Khatchadourian, Awais Rashid
khatchad@cse.ohio-state.edu,awais@comp.lancs.ac.uk
Ohio State University, Lancaster University
September 29, 2008
1
This material is based upon work supported in part by European
Commission grants IST-33710 (AMPLE) and IST-2-004349 (AOSD-Europe).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
2. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Outline
1 Brief Introduction to AOP
2 Rejuvenation Approach
3 Simple Motivating Example
Phase I: Analysis
Phase II: Rejuvenation
4 Downloads
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
3. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Aspect-Oriented Programming
AOP reduces scattering and tangling of crosscutting concern
(CCCs) implementations.
Developer specifies behavior (advice).
Advice is composed at specific execution points (join points).
Join points specified via pointcut expressions (PCEs).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
4. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Aspect-Oriented Programming
AOP reduces scattering and tangling of crosscutting concern
(CCCs) implementations.
Developer specifies behavior (advice).
Advice is composed at specific execution points (join points).
Join points specified via pointcut expressions (PCEs).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
5. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Aspect-Oriented Programming
AOP reduces scattering and tangling of crosscutting concern
(CCCs) implementations.
Developer specifies behavior (advice).
Advice is composed at specific execution points (join points).
Join points specified via pointcut expressions (PCEs).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
6. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Aspect-Oriented Programming
AOP reduces scattering and tangling of crosscutting concern
(CCCs) implementations.
Developer specifies behavior (advice).
Advice is composed at specific execution points (join points).
Join points specified via pointcut expressions (PCEs).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
7. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Example PCEs
execution(* Foo.*(..))
execution(* Foo.methodA())
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
8. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Example PCEs
execution(* Foo.*(..))
execution(* Foo.methodA())
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
9. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
10. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
11. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
12. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
13. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
14. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture true
intentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid as
the software evolves.
However, situations arise where base-code alterations induce
the invalidity of existing PCEs.
PCEs must be amended as a result.
But which join points should be included?
Can we automatically infer join points that should be included
in the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
15. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
The Idea
Capture rich program element relationships in a concern graph
adapted for AOP.
Associate graph elements with join point shadows contained
in the PCE.
Extract patterns from finite, acyclic paths in the graph.
Place wildcards in place of the associated elements.
Apply the patterns to the evolved version of the base-code.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
16. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
The Idea
Capture rich program element relationships in a concern graph
adapted for AOP.
Associate graph elements with join point shadows contained
in the PCE.
Extract patterns from finite, acyclic paths in the graph.
Place wildcards in place of the associated elements.
Apply the patterns to the evolved version of the base-code.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
17. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
The Idea
Capture rich program element relationships in a concern graph
adapted for AOP.
Associate graph elements with join point shadows contained
in the PCE.
Extract patterns from finite, acyclic paths in the graph.
Place wildcards in place of the associated elements.
Apply the patterns to the evolved version of the base-code.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
18. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
The Idea
Capture rich program element relationships in a concern graph
adapted for AOP.
Associate graph elements with join point shadows contained
in the PCE.
Extract patterns from finite, acyclic paths in the graph.
Place wildcards in place of the associated elements.
Apply the patterns to the evolved version of the base-code.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
19. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
The Idea
Capture rich program element relationships in a concern graph
adapted for AOP.
Associate graph elements with join point shadows contained
in the PCE.
Extract patterns from finite, acyclic paths in the graph.
Place wildcards in place of the associated elements.
Apply the patterns to the evolved version of the base-code.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
20. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
Base-code
package p ;
public class A {
int f ;
void m1 () {
int a = f + 1;
}
void m2 () {
int b = f + 2;
}
void n () {
int c = f + 3;
}
}
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
21. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
Concern Graph
p
contains
A
declares_method declares_method declares_method
A.m2() declares_field A.n() A.m1()
gets_field gets_field gets_field
A.f
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
22. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
An Aspect
package p ;
public aspect B {
before () : execution (* m *(..) ) {
}
}
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
23. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
Concern Graph
p
contains
A
declares_method declares_method declares_method
A.m2() declares_field A.n() A.m1()
gets_field gets_field gets_field
A.f
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
24. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
Base-code
// . . .
void o () {
int d = f + 4;
}
// . . .
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
26. Brief Introduction to AOP
Rejuvenation Approach Phase I: Analysis
Simple Motivating Example Phase II: Rejuvenation
Downloads
Patterns and Suggestions
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
27. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Tool and Material Downloads
Tool research prototype publicly available at
http://code.google.com/p/rejuvenate-pc.
Research related material publicly available at
http://sites.google.com/site/pointcutrejuvenation.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
28. Brief Introduction to AOP
Rejuvenation Approach
Simple Motivating Example
Downloads
Question for SCAM
Do more expressive PCE languages truly solve the fragile pointcut
problem?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut