on the assessment of pointcut design in evolving aspect-oriented software

61
On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software 1 Raffi Khatchadourian 12 Phil Greenwood 2 Awais Rashid 2 1 Department of Computer Science & Engineering Ohio State University Columbus, OH USA 2 Computing Department Lancaster University Lancaster UK Workshop on Assessment of Contemporary Modularization Techniques, 2008 1 This material is based upon work supported in part by European Commission grants IST-33710 (AMPLE) and IST-2-004349 (AOSD-Europe). 2 This work was partially administered during this author’s visit to the Computing Department, Lancaster University, United Kingdom.

Upload: raffi-khatchadourian

Post on 19-Jun-2015

456 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

On the Assessment of Pointcut Design in EvolvingAspect-Oriented Software1

Raffi Khatchadourian12 Phil Greenwood2 Awais Rashid2

1Department of Computer Science & EngineeringOhio State UniversityColumbus, OH USA

2Computing DepartmentLancaster University

Lancaster UK

Workshop on Assessment of Contemporary ModularizationTechniques, 2008

1This material is based upon work supported in part by EuropeanCommission grants IST-33710 (AMPLE) and IST-2-004349 (AOSD-Europe).

2This work was partially administered during this author’s visit to theComputing Department, Lancaster University, United Kingdom.

Page 2: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Outline

1 Brief Introduction to AOP

2 Problem StatementDefinitions

3 ProposalMetricsFormalism

4 ExampleScenarioMetrics

5 Conclusion and Future Work

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 3: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 4: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 5: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 6: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 7: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 8: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

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).

Example

execution(* Foo.*(..))execution(* Foo.methodA())

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 9: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 10: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 11: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 12: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 13: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 14: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

The Problem

Constructing optimal PCEs can be difficult.

Fragile Pointcuts

PCEs should capture correct join points not only in the currentversion of the base-code but future versions as well.

Capturing true intentions of where a CCC applies mayalleviate fragility.

PCEs often in terms of low-level programming elements.High-level specifications must be translated.

Question

Can we measure how well a PCE captures a developer’s intentions?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 15: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 16: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 17: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 18: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 19: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 20: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Intentions

“High”-level intention: A natural language description of whereCCC applies.

Example

Advise whenever data is sent over a network connection

Low-level intention: A description of where a CCC applies in termsof structural program element relationships.

Example

Advise calls to methods that write to field networkConn

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 21: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Pointcut Expressions

Join point shadow: Base-code corresponding to a join point.

Pointcut: A set of join point shadows.

Conservative Approach

Assume any dynamic condition always evaluates to true.

Example

execution(* x()) ≡ {C.x() {..}, D.x() {..}}

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 22: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Pointcut Expressions

Join point shadow: Base-code corresponding to a join point.

Pointcut: A set of join point shadows.

Conservative Approach

Assume any dynamic condition always evaluates to true.

Example

execution(* x()) ≡ {C.x() {..}, D.x() {..}}

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 23: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Pointcut Expressions

Join point shadow: Base-code corresponding to a join point.

Pointcut: A set of join point shadows.

Conservative Approach

Assume any dynamic condition always evaluates to true.

Example

execution(* x()) ≡ {C.x() {..}, D.x() {..}}

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 24: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Definitions

Pointcut Expressions

Join point shadow: Base-code corresponding to a join point.

Pointcut: A set of join point shadows.

Conservative Approach

Assume any dynamic condition always evaluates to true.

Example

execution(* x()) ≡ {C.x() {..}, D.x() {..}}

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 25: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metrics: Two DimensionsBase-code

Intention

PCE

II

IMetric I: Coverage

How well does PCE coverentire intention?

Metric II: Precision

How well does PCEcapture solely theintention?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 26: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metrics: Two DimensionsBase-code

Intention

PCE

II

IMetric I: Coverage

How well does PCE coverentire intention?

Metric II: Precision

How well does PCEcapture solely theintention?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 27: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metrics: Two DimensionsBase-code

Intention

PCE

II

IMetric I: Coverage

How well does PCE coverentire intention?

Metric II: Precision

How well does PCEcapture solely theintention?

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 28: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Intention Matching Approach

Capture rich program element relationships in a concerngraph[1] adapted for AOP.

Express intentions as patterns over finite, acyclic paths in thegraph.

Apply the patterns to the extended concern graph.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 29: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Intention Matching Approach

Capture rich program element relationships in a concerngraph[1] adapted for AOP.

Express intentions as patterns over finite, acyclic paths in thegraph.

Apply the patterns to the extended concern graph.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 30: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Intention Matching Approach

Capture rich program element relationships in a concerngraph[1] adapted for AOP.

Express intentions as patterns over finite, acyclic paths in thegraph.

Apply the patterns to the extended concern graph.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 31: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 32: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 33: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 34: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 35: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 36: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 37: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 38: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 39: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 40: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 41: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 42: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 43: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

MetricsFormalism

Metric Formalisms

Formalism

Apce A pointcut expressionπ̂ A pattern

CG+P An extended concern graph

Paths(CG+P) Finite acyclic paths in CG+

P

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 44: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

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, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 45: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

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, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 46: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

An Intention

Low-level Intention of where CCC Applies

To advise all method executions that read from field A.f

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 47: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

An Aspect

package p;

public aspect B {

before () : execution (* m*(..)) {

}

}

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 48: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

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, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 49: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M1

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2()}|= 1

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 50: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M1

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2()}|= 1

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 51: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M1

M1(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Apce |

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2()}|= 1

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 52: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M2

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2(), A.n()}|

=2

3

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 53: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M2

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2(), A.n()}|

=2

3

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 54: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

ScenarioMetrics

Metric M2

M2(π̂,Apce) =|Apce ∩Match(π̂,Paths(CG+

P))||Match(π̂,Paths(CG+

P))|

=|{A.m1(), A.m2()} ∩ {A.m1(), A.m2(), A.n()}|

|{A.m1(), A.m2(), A.n()}|

=2

3

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 55: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Conclusion

Capturing true intentions of where a CCC applies mayalleviate fragility.

Would like to measure how well a PCE captures a developer’sintentions.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 56: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Conclusion

Capturing true intentions of where a CCC applies mayalleviate fragility.

Would like to measure how well a PCE captures a developer’sintentions.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 57: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Future Work

Automatic inference of low-level intentions from high-levelones?

How to encode all high-level intentions?

Do metrics help alleviate fragility?

Implementation/evaluation.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 58: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Future Work

Automatic inference of low-level intentions from high-levelones?

How to encode all high-level intentions?

Do metrics help alleviate fragility?

Implementation/evaluation.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 59: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Future Work

Automatic inference of low-level intentions from high-levelones?

How to encode all high-level intentions?

Do metrics help alleviate fragility?

Implementation/evaluation.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 60: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

Future Work

Automatic inference of low-level intentions from high-levelones?

How to encode all high-level intentions?

Do metrics help alleviate fragility?

Implementation/evaluation.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software

Page 61: On the Assessment of Pointcut Design in Evolving Aspect-Oriented Software

Brief Introduction to AOPProblem Statement

ProposalExample

Conclusion and Future Work

References

M. P. Robillard and G. C. Murphy.Concern graphs: finding and describing concerns usingstructural program dependencies.In International Conference on Software Engineering, 2002.

Raffi Khatchadourian, Phil Greenwood, Awais Rashid On the Assessment of Pointcut Design in AO Software