[aosd-discuss] motivation for call vs execution pointcut/join point distinction

Christopher Dutchyn cdutchyn at cs.ubc.ca
Mon Apr 11 16:15:58 EST 2005


Alexandre Vasseur <avasseur at gmail.com>

> A question is thus: if a system allows you to define (in a simple and
> performant way ) "method call" event, would you need "method
> execution" events and why ?

First, in relation to OO languages: there is a semantic difference between 
call and execution join points: in particular, dispatch occurs between 
call join points and execution join points [it's obvious given a 
continuation semantics].  That is, changing 'target' around a call may 
cause a different implementation to be selected; changing 'this' around an 
execution cannot [you might want to try this yourself].  Hence, trying to 
describe an execution as sometime after a call makes it impossible to 
alter target without affecting dispatch.  This is admittedly atypical, so 
we look at another problem.

The execution may not have a simple relationship to the call.  In the 
simple case [personal communication with Jim Hugunin], various other join 
points can occur in-between: those caused by other advice [relatively 
straightforward to recognize given advice-execution jps] but also static 
and object initialization [because AspectJ performs class-loads in the 
faulting thread!]. In the extreme situation, consider around call advice 
that pushes the proceed (the execution join point) into a delayed 
evaluation (a Runnable in AspectJ, a lambda in AspectScheme), that is 
triggered later [see Ramnivas' book for egs].  Then, the call has returned 
before the execution happens.  This is a problem...


Christopher Dutchyn
UBC Computer Science




More information about the discuss mailing list