Re: Completeness and Correctness of AspectJ Weaving
Pascal Costanza <[email protected]> Thu, 22 Jan 2009 16:06:08 +0100
| Newsgroups | gmane.comp.programming.aspect.general |
|---|---|
| Message-ID | <[email protected]> |
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). > 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. Pascal -- = Pascal Costanza, mailto:[email protected], http://p-cos.net Vrije Universiteit Brussel Programming Technology Lab Artificial Intelligence Lab Pleinlaan 2, B-1050 Brussel, Belgium _______________________________________________ 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