From Metaobject Protocols to Versatile Kernels for AOP
Éric T anter
PhD Thesis Defense
Universidad de Chile
DCC - CWR
Université de Nantes
OBASCO - EMN/INRIA
Santiago, Chile - November 8th 2004
From Metaobject Protocols to Versatile Kernels for AOP ric T anter - - PowerPoint PPT Presentation
Santiago, Chile - November 8th 2004 From Metaobject Protocols to Versatile Kernels for AOP ric T anter PhD Thesis Defense Universit de Nantes Universidad de Chile DCC - CWR OBASCO - EMN/INRIA Thesis Committee President Prof. Eric
Universidad de Chile
DCC - CWR
OBASCO - EMN/INRIA
Santiago, Chile - November 8th 2004
President
Principal Examiners
Committee Members
Advisors
2
3
4
cost, rigidity, complexity
aspect languages
R AOP ?
5
R AOP ?
6
7
[Smith82]
8
meta base
9
abstraction, encapsulation, localized extension
10
11
[Kiczales92]
12
P A A A WEAVER SYSTEM
13
points of reference in a base program that aspects can affect
14
“ AOP is a goal, for which reflection is one powerful tool”
“ AOP is a principled subset of reflection” “ AOP is not reflection”
[Kiczales+97]
Relation
[Douence04] [Kiczales01]
15
16
R AOP ?
17
base object metaobject reification metalink hook control flow
base meta
18
A a =
A a = metaobj.handle( new Call(this, o,
new Object[]{new Integer(5)}));
19
leads to tangled metalevel
meta base meta base
20
21
[OOPSLA03]
22
23
scope: global, class, object activation: predicate control: before, after, replace ...
Event Condition Action
meta base
linkC linkB linkA
24
25
[SCCC04]
26
somLink = API.links().addLink(MsgReceive.class, ...); somLink.setControl(Control.BEFORE_AFTER); _mo_somLink.beforeMsgReceive([m, r, args]); .. _mo_somLink.afterMsgReceive([m, r, args, res]);
somLink.setMOCall(Control.BEFORE, Scheduler.class, “enter”, nameP, argsP); somLink.setMOCall(Control.AFTER, Scheduler.class, “exit”); _mo_somLink.enter(“put”, [ o ]); .. _mo_somLink.exit();
[ECOOP04]
27
2,125 4,250 6,375 8,500 2 4 8 16 32 64 128
standard MOP specialized MOP
consumers time (ms)
as efficient as hand-made source code modification
1 2 3 4 2 4 8 16 32 64 128
speedup
28
R AOP ?
29
different models domain-specific vs. general-purpose
depending on tackled concern (domain) positive reports [Rashid01]
30
Compatibility Reuse of weaver
API application compose weave translate compose translate
L1 L2 KERNEL
application weave compose weave
L1 L2
?!?
31
cut: where action: what binding: association, instantiation
[Masuhara+03,Wand+04]
32
[EIWAS04]
33
[GPCE05]
in cflow?
34
35
schedule: BoundedBuffer with: MyScheduler
36
37
bytecode transformation (Javassist [Chiba00,Chiba+03])
Core Reflex / API (180 classes) Standard library: operations, base metaobjects... T
[Reflection01,OOPSLA03,GPCE05]
38
39
[SCCC01,EWMOS02] [OOPSLA03] [ECOOP04] [SCCC04]
40
41
balance trade-off between genericity/specificity
flexible metalink, MOP specialization
in between low-level and high-level tools portable, efficient, applicable implementation
influence of “real-world constraints” trade-off structure/adaptation fully-static and fully-dynamic contexts
42
identification of the need and analysis first prototype, including composition combine power of reflection and guidance of aspect languages
AO models: prototypes, basic blocks finer-grained, more precise, interactions back to applications: Grid computing, Web apps, ...
DSALs: design, composition and interactions
with: Noury Bouraqadi, Denis Caromel (2), Pierre Cointe, Peter Ebraert (2), Luis Mateu, Jacques Noyé (6), José Piquer (3), Leonardo Rodríguez (2), Marc Ségura, Michael Vernaillen
I n t . C o n f e r e n c e s
A Versatile Kernel for Multi-Language AOP” @GPCE’05
Behavioral Reflection: a Case Study” @SCCC’04
T emporal Selection of Reification” @OOPSLA ’03
Altering Java Semantics via Bytecode Manipulation” @GPCE’02
Applying Separation of Concerns” @SCCC’01
I n t . W o r k s h o p s
Versatile AOP Kernel” @EIWAS’04
A Concern-based Approach to Software Evolution” @DAW/AOSD’04
A Flexible Approach to Runtime Inspection” @ASARTI/ECOOP’03
ransparent Adaptation of Migration Policies” @EWMOS/ECOOP’02
Quest for their Holy Application” @PhDOOS/ECOOP’02
also: François Nollen, Angel Núñez, Guillaume Pothier, Rodolfo T