Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software
-
Upload
raffi-khatchadourian -
Category
Technology
-
view
476 -
download
0
description
Transcript of Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software
![Page 1: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/1.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Rejuvenate Pointcut1
A Tool for Pointcut Expression Recovery in EvolvingAspect-Oriented Software
Raffi Khatchadourian, Awais [email protected],[email protected]
Ohio State University, Lancaster University
September 29, 2008
1This material is based upon work supported in part by EuropeanCommission grants IST-33710 (AMPLE) and IST-2-004349 (AOSD-Europe).
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 2: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/2.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Outline
1 Brief Introduction to AOP
2 Rejuvenation Approach
3 Simple Motivating ExamplePhase I: AnalysisPhase II: Rejuvenation
4 Downloads
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 3: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/3.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
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
![Page 4: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/4.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
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
![Page 5: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/5.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
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
![Page 6: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/6.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
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
![Page 7: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/7.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Example PCEs
execution(* Foo.*(..))
execution(* Foo.methodA())
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 8: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/8.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Example PCEs
execution(* Foo.*(..))
execution(* Foo.methodA())
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 9: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/9.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 10: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/10.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 11: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/11.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 12: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/12.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 13: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/13.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 14: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/14.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Fragile Pointcut Problem
Constructing optimal pointcut expressions that capture trueintentions of where a CCC applies can be difficult.
Ideally, pointcut expressions (PCEs) should remain valid asthe software evolves.
However, situations arise where base-code alterations inducethe 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 includedin the new version of the PCE upon evolution?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 15: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/15.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
The Idea
Capture rich program element relationships in a concern graphadapted for AOP.
Associate graph elements with join point shadows containedin 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
![Page 16: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/16.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
The Idea
Capture rich program element relationships in a concern graphadapted for AOP.
Associate graph elements with join point shadows containedin 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
![Page 17: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/17.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
The Idea
Capture rich program element relationships in a concern graphadapted for AOP.
Associate graph elements with join point shadows containedin 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
![Page 18: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/18.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
The Idea
Capture rich program element relationships in a concern graphadapted for AOP.
Associate graph elements with join point shadows containedin 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
![Page 19: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/19.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
The Idea
Capture rich program element relationships in a concern graphadapted for AOP.
Associate graph elements with join point shadows containedin 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
![Page 20: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/20.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
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
![Page 21: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/21.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
Concern Graph
A.m2()
A.f
gets_field
A.n()
gets_field
A
declares_method
declares_field
declares_method
A.m1()
declares_method
gets_field
p
contains
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 22: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/22.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
An Aspect
package p;
public aspect B {
before () : execution (* m*(..)) {
}
}
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 23: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/23.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
Concern Graph
A.m2()
A.f
gets_field
A.n()
gets_field
A
declares_method
declares_field
declares_method
A.m1()
declares_method
gets_field
p
contains
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 24: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/24.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
Base-code
// . . .void o() {
int d = f + 4;
}
// . . .
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 25: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/25.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
Concern Graph
A.m2()
A.f
gets_field
A.n()
gets_field
A.o()
gets_field
A
declares_method
declares_field
declares_method declares_method
A.m1()
declares_method
gets_field
p
contains
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 26: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/26.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Phase I: AnalysisPhase II: Rejuvenation
Patterns and Suggestions
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 27: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/27.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Tool and Material Downloads
Tool research prototype publicly available athttp://code.google.com/p/rejuvenate-pc.
Research related material publicly available athttp://sites.google.com/site/pointcutrejuvenation.
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut
![Page 28: Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software](https://reader037.fdocuments.net/reader037/viewer/2022110120/5583947fd8b42a282c8b56a7/html5/thumbnails/28.jpg)
Brief Introduction to AOPRejuvenation Approach
Simple Motivating ExampleDownloads
Question for SCAM
Do more expressive PCE languages truly solve the fragile pointcutproblem?
Raffi Khatchadourian, Awais Rashid Rejuvenate Pointcut