Re: Completeness and Correctness of AspectJ Weaving

Günter Kniesel <[email protected]> Thu, 22 Jan 2009 16:23:39 +0100
Newsgroups gmane.comp.programming.aspect.general
Message-ID <[email protected]>
Pascal Costanza schrieb:
> =

> On 22 Jan 2009, at 15:52, G=FCnter Kniesel wrote:
> =

>> Pascal Costanza schrieb:
>>> On 21 Jan 2009, at 20:21, DIMA MOHAMMED ALHADIDI wrote:
>>>> Hi,
>>>> Is AspectJ has a complete and correct weaving taking into =

>>>> consideration aspect interference and interaction?
>>>> What I mean by completeness that every aspect advice must be applied =

>>>> at all the join points matched by the associated pointcut whereas =

>>>> what I mean by correctness that every aspect advice must be applied =

>>>> only at the join points that match the associated pointcut.
>>> There is no such thing as an assurance that all aspects are triggered =

>>> at a specific join point. If several pieces of advice apply at a join =

>>> point, the first may, for example, throw an exception, which means =

>>> that the other ones are not called. Or, the first may be a piece of =

>>> around advice that doesn't proceed (or worse, proceeds only =

>>> conditionally). Etc.
>>
>> Pascal,
>>
>> you're right, an advice might do odd things so another one might
>> never have a chance to execute.
> =

> I don't think throwing an exception is an odd thing to do.
> =

> Another typical example is a caching aspect, that looks up a result in a =

> cache if it was already computed, and only proceeds if it hasn't been =

> computed yet. This may interfere with an aspect that wants to know how =

> often a method has been called, for example (and where, for example, it =

> isn't clear whether it should count the invocations or the actual =

> computations, because the original developer didn't account for the =

> possibility that there could be a distinction between those two cases).

Well, isn't the result odd for the one who is faced with such an
unanticipated interference by another aspect? But let's not get
into discussion about terminology. The question that Dima asked
did not refer to this level of interference (which I use to call
"application semantics interference") but to weaving interference,
which is much more basic because without complete and correct
weaving application semantics will be compromised anyway.


>> However, completeness and correctness *of aspect weaving* refer to
>> a more basic level: Whether the advice is woven wherever it should
>> and only there.
> =

> Of course.

Well, that's not so obvious an not the case in the last version of AspectJ
that  we tried out in detail. Just try the example from our paper on the
current release...
http://www.iai.uni-bonn.de/~gk/papers/kniesel-weavingInteractions-taosd2007=
-preprint.pdf

G=FCnter

_______________________________________________
discuss mailing list    -    [email protected]

To unsubscribe and change options, go to:
http://aosd.net/mailman/listinfo/discuss_aosd.net

Check out the AOSD.net Wiki: http://aosd.net/wiki