Rejuvenate Pointcut
   A Tool for Pointcut Expression Recovery in Evolving
                Aspect-Oriented Software


Raffi ...
Motivation
                                      Approach
                                     Evaluation
                ...
Motivation
                                   Approach
                                  Evaluation
                      ...
Motivation
                                   Approach
                                  Evaluation
                      ...
Motivation
                                   Approach
                                  Evaluation
                      ...
Motivation
                                     Approach
                                    Evaluation
                  ...
Motivation
                                     Approach
                                    Evaluation
                  ...
Motivation
                                     Approach
                                    Evaluation
                  ...
Evolution

  // . . .
  void p () {
         int d = f + 4;
  }
  // . . .

  pointcut fragile() : execution(* m*(..));


...
Evolution

  // . . .
  void p () {
         int d = f + 4;
  }
  // . . .

  pointcut fragile() : execution(* m*(..));


...
Evolution

  // . . .
  void p () {
         int d = f + 4;
  }
  // . . .

  pointcut fragile() : execution(* m*(..));


...
Evolution

  // . . .
  void p () {
         int d = f + 4;
  }
  // . . .

  pointcut fragile() : execution(* m*(..));


...
Evolution

  // . . .
  void p () {
         int d = f + 4;
  }
  // . . .

  pointcut fragile() : execution(* m*(..));


...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Pointcut Rejuvenation: Leveraging Commonality

  Phase I: Analysis using Concern Graphs
  Extract commonalities between cu...
Suggestion Ranking Scheme




  Measurements for Suggestion Ranking
      α error: How strong are the relationships betwee...
Suggestion Ranking Scheme
  Measurements for Suggestion Ranking
      α error: How strong are the relationships between ad...
Suggestion Ranking Scheme
  Measurements for Suggestion Ranking
      α error: How strong are the relationships between ad...
P
                  o.w.
  Suggestion Ranking Scheme
     +
(CG P ))|
    Measurements for Suggestion Ranking
            ...
P
                  o.w.
  Suggestion Ranking Scheme
     +
(CG P ))|
    Measurements for Suggestion Ranking
            ...
P
                  o.w.
  Suggestion Ranking Scheme
     +
(CG P ))|
    Measurements for Suggestion Ranking
            ...
P
                  o.w.
  Suggestion Ranking Scheme
     +
(CG P ))|
    Measurements for Suggestion Ranking
            ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Implementation
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Motivation
                                    Approach
                                   Evaluation
                    ...
Upcoming SlideShare
Loading in …5
×

Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software

681 views

Published on

Invited tool demonstration at the 8th International Conference on Aspect-Oriented Software Development (AOSD '09), Charlottesville, VA, USA, March 2-6, 2009.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
681
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rejuvenate Pointcut: A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software

  1. 1. Rejuvenate Pointcut A Tool for Pointcut Expression Recovery in Evolving Aspect-Oriented Software Raffi Khatchadourian1 Phil Greenwood2 Awais Rashid2 Guoqing Xu1 1 Ohio State University 2 Lancaster University International Conference on Aspect-Oriented Software Development, 2009 A
  2. 2. Motivation Approach Evaluation More Information Outline 1 Motivation 2 Approach 3 Evaluation 4 More Information Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  3. 3. Motivation Approach Evaluation More Information Base-code package p ; public class A { int f ; void m1 () { int a = f + 1; } Two methods whose name begins with the void m2 () { character m. int b = f + 2; } void n () { int c = f + 3; } } Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  4. 4. Motivation Approach Evaluation More Information Base-code package p ; public class A { int f ; void m1 () { Two methods whose int a = f + 1; name begins with the } character m. void m2 () { One method whose name int b = f + 2; does not begin with the } character m. void n () { int c = f + 3; } } Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  5. 5. Motivation Approach Evaluation More Information Base-code package p ; public class A { int f ; Two methods whose void m1 () { name begins with the int a = f + 1; character m. } One method whose name void m2 () { does not begin with the int b = f + 2; character m. } All method bodies access void n () { a field f. int c = f + 3; } } Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  6. 6. Motivation Approach Evaluation More Information Along Came a Pointcut pointcut fragile() : execution(* m*(..)); Base-code V1 Selects m1() and m2() but not n(). Assume pointcut is correct in V1. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  7. 7. Motivation Approach Evaluation More Information Along Came a Pointcut pointcut fragile() : execution(* m*(..)); Base-code V1 Selects m1() and m2() but not n(). Assume pointcut is correct in V1. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  8. 8. Motivation Approach Evaluation More Information Along Came a Pointcut pointcut fragile() : execution(* m*(..)); Base-code V1 Selects m1() and m2() but not n(). Assume pointcut is correct in V1. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  9. 9. Evolution // . . . void p () { int d = f + 4; } // . . . pointcut fragile() : execution(* m*(..)); Base-code V2 Same pointcut selects m1() and m2() but not n() and p(). Fragile! CCC applies to p() in V2 but not selected! How to identify such join points as code evolves?
  10. 10. Evolution // . . . void p () { int d = f + 4; } // . . . pointcut fragile() : execution(* m*(..)); Base-code V2 Same pointcut selects m1() and m2() but not n() and p(). Fragile! CCC applies to p() in V2 but not selected! How to identify such join points as code evolves?
  11. 11. Evolution // . . . void p () { int d = f + 4; } // . . . pointcut fragile() : execution(* m*(..)); Base-code V2 Same pointcut selects m1() and m2() but not n() and p(). Fragile! CCC applies to p() in V2 but not selected! How to identify such join points as code evolves?
  12. 12. Evolution // . . . void p () { int d = f + 4; } // . . . pointcut fragile() : execution(* m*(..)); Base-code V2 Same pointcut selects m1() and m2() but not n() and p(). Fragile! CCC applies to p() in V2 but not selected! How to identify such join points as code evolves?
  13. 13. Evolution // . . . void p () { int d = f + 4; } // . . . pointcut fragile() : execution(* m*(..)); Base-code V2 Same pointcut selects m1() and m2() but not n() and p(). Fragile! CCC applies to p() in V2 but not selected! How to identify such join points as code evolves?
  14. 14. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method A.f declares_field A contains p gets_field declares_method A.n() gets_field declares_method A.m1() Would execution(* A.n()) also be suggested?
  15. 15. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method A.f declares_field A contains p gets_field declares_method A.n() gets_field declares_method A.m1() Would execution(* A.n()) also be suggested?
  16. 16. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method A.f declares_field A contains p gets_field declares_method A.n() gets_field declares_method A.m1() Would execution(* A.n()) also be suggested?
  17. 17. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method A.f declares_field A contains p gets_field declares_method A.n() gets_field declares_method A.m1() Would execution(* A.n()) also be suggested?
  18. 18. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method declares_field A.f gets_field A.n() declares_method A contains p gets_field declares_method gets_field A.p() declares_method A.m1() Would execution(* A.n()) also be suggested?
  19. 19. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method declares_field A.f gets_field A.n() declares_method A contains p gets_field declares_method gets_field A.p() declares_method A.m1() Would execution(* A.n()) also be suggested?
  20. 20. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method declares_field A.f gets_field A.n() declares_method A contains p gets_field declares_method gets_field A.p() declares_method A.m1() Would execution(* A.n()) also be suggested?
  21. 21. Pointcut Rejuvenation: Leveraging Commonality Phase I: Analysis using Concern Graphs Extract commonalities between currently selected join points. Phase II: Rejuvenation Apply extracted patterns to new version of the base-code. A.m2() gets_field declares_method declares_field A.f gets_field A.n() declares_method A contains p gets_field declares_method gets_field A.p() declares_method A.m1() Would execution(* A.n()) also be suggested?
  22. 22. Suggestion Ranking Scheme Measurements for Suggestion Ranking α error: How strong are the relationships between advised shadows compared to ones captured by a pattern? β error: How well does the pattern express the same intentions as the pointcut?
  23. 23. Suggestion Ranking Scheme Measurements for Suggestion Ranking α error: How strong are the relationships between advised shadows compared to ones captured by a pattern? β error: How well does the pattern express the same intentions as the pointcut? All Join Point Shadows
  24. 24. Suggestion Ranking Scheme Measurements for Suggestion Ranking α error: How strong are the relationships between advised shadows compared to ones captured by a pattern? β error: How well does the pattern express the same intentions as the pointcut? ω a join point shadow; code correspondi All Join Point Shadows A a piece of advice Apce a pointcut bound to advice A; a set of Apce a subsequent revision of Apce P the original program, the underlying b P a subsequence revision of program P ΩP the set of join point shadows containe IG P a finite graph representing structura tween program elements in P π an acyclic path (sequence of arcs) in I ΠP a set of acyclic paths derived from pro
  25. 25. P o.w. Suggestion Ranking Scheme + (CG P ))| Measurements for Suggestion Ranking if |Apce | = 0 α error: How strong are the relationships between advised + ths(CG P ))| shadows compared to ones captured by a pattern? (2 β error: o.w. How well does the pattern express the same intentions as the pointcut? =0 ω a join point shadow; code correspondi A All Join Point Shadows a piece of advice (3 Apce a pointcut bound to advice A; a set of Apce a subsequent revision of Apce π )) + err β (ˆ , Apce )abs(ˆ ) original program, the underlying b ˆ π P πthe (4 P a subsequence revision of program P ΩP the set of join point shadows containe tribute equations. IG P a finite graph representing structura tween program elements in P π an acyclic path (sequence of arcs) in I ΠP a set of acyclic paths derived from pro
  26. 26. P o.w. Suggestion Ranking Scheme + (CG P ))| Measurements for Suggestion Ranking if |Apce | = 0 α error: How strong are the relationships between advised + ths(CG P ))| shadows compared to ones captured by a pattern? (2 β error: o.w. How well does the pattern express the same intentions as the pointcut? =0 ω a join point shadow; code correspondi A All Join Point Shadows a piece of advice (3 Apce a pointcut bound to advice A; a set of Apce a subsequent revision of Apce π )) + err β (ˆ , Apce )abs(ˆ ) original program, the underlying b ˆ π P πthe (4 P a subsequence revision of program P ΩP the set of join point shadows containe tribute equations. IG P a αfinite graph representing structura tween program elements in P π an acyclic path (sequence of arcs) in I ΠP a set of acyclic paths derived from pro
  27. 27. P o.w. Suggestion Ranking Scheme + (CG P ))| Measurements for Suggestion Ranking if |Apce | = 0 α error: How strong are the relationships between advised + ths(CG P ))| shadows compared to ones captured by a pattern? (2 β error: o.w. How well does the pattern express the same intentions as the pointcut? =0 ω a join point shadow; code correspondi A All Join Point Shadows a piece of advice (3 Apce a pointcut bound to advice A; a set of Apce a subsequent revision of Apce π )) + err β (ˆ , Apce )abs(ˆ ) original program, the underlying b ˆ π P πthe (4 P a subsequence revision of program P ΩP the set of join point shadows containe tribute equations. IG P a αfinite graph representing structura tween program elements in P π an acyclic path (sequence of arcs) in I ΠP a set of acyclic paths derived from pro
  28. 28. P o.w. Suggestion Ranking Scheme + (CG P ))| Measurements for Suggestion Ranking if |Apce | = 0 α error: How strong are the relationships between advised + ths(CG P ))| shadows compared to ones captured by a pattern? (2 β error: o.w. How well does the pattern express the same intentions as the pointcut? =0 ω a join point shadow; code correspondi A All Join Point Shadows a piece of advice (3 Apce a pointcut bound to advice A; a set of β Apce a subsequent revision of Apce π )) + err β (ˆ , Apce )abs(ˆ ) original program, the underlying b ˆ π P πthe (4 P a subsequence revision of program P ΩP the set of join point shadows containe tribute equations. IG P a αfinite graph representing structura tween program elements in P π an acyclic path (sequence of arcs) in I ΠP a set of acyclic paths derived from pro
  29. 29. Motivation Approach Evaluation More Information Suggestion Confidence Each suggestion is associated with a confidence value ([0,1]). A suggestion inherits the confidence of the pattern that produced it. A pattern’s confidence is calculated using a combination of α, β, and the depth of the patterns. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  30. 30. Motivation Approach Evaluation More Information Suggestion Confidence Each suggestion is associated with a confidence value ([0,1]). A suggestion inherits the confidence of the pattern that produced it. A pattern’s confidence is calculated using a combination of α, β, and the depth of the patterns. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  31. 31. Motivation Approach Evaluation More Information Suggestion Confidence Each suggestion is associated with a confidence value ([0,1]). A suggestion inherits the confidence of the pattern that produced it. A pattern’s confidence is calculated using a combination of α, β, and the depth of the patterns. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  32. 32. Implementation
  33. 33. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  34. 34. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  35. 35. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  36. 36. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  37. 37. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  38. 38. Motivation Approach Evaluation More Information But How Well Does It Work? Correlation analysis (Phase I) on 20+ AspectJ benchmarks. Average confidence was 0.66. Applied to 4 multi-versioned AspectJ projects (Phase II). Rejuvenated pointcuts in major releases (26 in total). Able to identify 94% of new shadows introduced in later versions On average, appearing in the top 4% of results. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  39. 39. Motivation Approach Evaluation More Information 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. Full evaluation available in corresponding technical report. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  40. 40. Motivation Approach Evaluation More Information 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. Full evaluation available in corresponding technical report. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut
  41. 41. Motivation Approach Evaluation More Information 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. Full evaluation available in corresponding technical report. Khatchadourian, Greenwood, Rashid, Xu Rejuvenate Pointcut

×