AOP and Modular Reasoning [ICSE05]
• Start with first-principles definition of modularity
and modular reasoning
– localization, interfaces, enforcement, composition
• Provide example and analysis showing that:
– in the presence of ccc, OOP is not modular
– in the presence of ccc, AOP is modular
• But…
– interfaces depend on system configuration
– AOP makes that explicit
– explains more about what crosscutting means
______
[ICSE05] Kiczales and Mezini.
Kiczales and Mezini - FOAL 2005
1
Crosscutting Structure and Interfaces
class Line {
aspect UpdateSignaling {
private Point p1, p2;
private Display Shape.display;
Point getP1() { return p1; }
Point getP2() { return p2; }
public void Shape.setDisplay(Display d) {
this.display = d;
}
void setP1(Point p1) {
this.p1 = p1;
}
void setP2(Point p2) {
this.p2 = p2;
}
pointcut change(Shape shape):
this(shape) &&
(execution(void Shape.moveBy(int, int) ||
execution(void Shape+.set*(*)));
}
class Point
after(Shape s) returning: change(s) {
Display.update(s);
}
{
private int x = 0, y = 0;
}
int getX() { return x; }
int getY() { return y; }
void setX(int x) {
this.x = x;
}
void setY(int y) {
this.y = y;
}
}
• Aspect cuts interface
– through Point and Line
• What crosscutting means
• The gestalt of AOP
Kiczales and Mezini - FOAL 2005
2
Parts
Kiczales and Mezini - FOAL 2005
3
Composed parts
m
• composition determines
– both interfaces and component structure
Kiczales and Mezini - FOAL 2005
4
Crosscutting Structure and Interfaces
class Line {
aspect UpdateSignaling {
private Point p1, p2;
private Display Shape.display;
Point getP1() { return p1; }
Point getP2() { return p2; }
public void Shape.setDisplay(Display d) {
this.display = d;
}
void setP1(Point p1) {
this.p1 = p1;
}
void setP2(Point p2) {
this.p2 = p2;
}
pointcut change(Shape shape):
this(shape) &&
(execution(void Shape.moveBy(int, int) ||
execution(void Shape+.set*(*)));
}
class Point
after(Shape s) returning: change(s) {
Display.update(s);
}
{
private int x = 0, y = 0;
}
int getX() { return x; }
int getY() { return y; }
void setX(int x) {
this.x = x;
}
void setY(int y) {
this.y = y;
}
}
Kiczales and Mezini - FOAL 2005
•
•
•
•
Parts stay the same
Interfaces are extended
Declarative
What “details” means can change
5
Why paper matters to us
• What theory of AOP should say
– interface depends on configuration
– “aspect control” systems can account for that
– expand “modular” to encompass AOP
• that has been the idea for 10 years
• Stop focusing on advice and simple pointcuts!
– inter-type declarations
– more interesting pointcuts (i.e. dflow, pcflow…)
– the fun is in saying
“there is a well-definable crosscutting interface there,
I’m going to define it and program against it”
– a chance to play with all that fancy semantics
(AOP as a strategic technology)
Kiczales and Mezini - FOAL 2005
6
© Copyright 2026 Paperzz