[PRL] AOP questions

John Clements clements at brinckerhoff.org
Tue Mar 29 23:19:13 EST 2005


On Mar 29, 2005, at 10:57 PM, Doug Orleans wrote:
>
>> 2) "Join Points":
>> 	It appears to me that join points are not truly points, but are 
>> rather
>> contiguous subsequences.  I say this because of the existence of 
>> things
>> like "around" and "after" pcds, which don't make sense for a 
>> definition
>> of join points as single points in a program's execution.  Is this
>> fair?
>
> "around" and "after" are kinds of advice, not kinds of pointcuts.  Or
> maybe they sit somewhere in between.  They're sort of like
> combinators-- they say how to put together a join point with its
> advice.  (In Socrates, "around" is just a way of affecting advice
> precedence, and "before" and "after" are just macros for "begin" and
> "begin0".)

No, I know that "around" and "after" are not pointcuts; they're forms 
of advice.  But for them to make any sense, join points can't be single 
points---they have to be intervals.  Let me be concrete.  Suppose that 
I run my program with a pointcut that selects calls to method 'm()'.  
Let's be _really_ concrete and say that the method m() is called just 
once during the execution, and it begins at step 2790 and ends at step 
2902.  So in this case, the pointcut designates exactly one join point. 
Okay, suppose I specify "before" advice for this pointcut.  Well, it 
will hopefully get inserted before step 2790.  What if I specify 
"after" advice for this pointcut?  Well, it had better end up after 
step 2902.  For this reason, I believe that a "join point" must be 
defined as an execution interval, and not as a simple "point".

> --Doug
>
> P.S. Not all AOP methodologies are about dynamic join points,
> e.g. points in the program execution; some are about static join
> points, e.g. points in the program expression.  So I don't think it's
> accurate to say that "AOP insists on modeling evaluation as a series
> of execution states", because some AOP doesn't model execution at all.

Yes; I have much less (bad) to say about the static join points. They 
make sense to me, as something that could be reasoned about in a 
somewhat maneageable way.

Also, in the interest of full disclosure, it's only fair to point out 
that continuation marks expose exactly the same sort of information 
that dynamic join points do;  in fact, it's this correlation that makes 
continuation marks applicable to AOP.

Seriously, though, I would like to reiterate my claim that AOP appears 
to me to be a more heavyweight scriptable debugger with a type system.  
You say "pointcut", I say "conditional breakpoint"... what's the 
difference?

john




More information about the PRL mailing list