[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-dev] pointcut diagnosis plug point
- From: Adrian Colyer <adrian.colyer@xxxxxxxxx>
- Date: Thu, 5 Oct 2006 09:24:51 +0100
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:references:mime-version:x-priority:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=szprC+4DpuuIulkcAca0z7dyV93o2MbBkAJfaJM/9GOKBZpYc+nP0+cm0i3iAF/SxGuhhHGs+L1O2ipms+/9873mwGE3WUAZL7IQbLYGTMuLcYvRIYK875AyqFGg2fjZWVVLQgQb6T27RPotYAQHzA9cakGhU4fazYyV40xnbnk=
About a year ago I started work on a "pointcut reader" that could
produce a "plain english" sentence describing what a pointcut
expression would match. It's still half-finished on my hard-drive,
must polish it off and make it available soon... The second part of
that was something that would tell you which join points the
pointcut expression matched in a given codebase. The third part was
the "explain" feature that for a given pointcut and join point would
explain why the pointcut expression matched (or not) The matching
algorithm that AspectJ uses is pretty amenable to giving this kind of
output because it proceeds logically through the signatures of the
join point etc.
A general analyzer mechanism for the "adviceDidNotMatch" message
would be harder. adviceDidNotMatch is a result of attempting to match
the pointcut at every join point shadow and failing on every
occasion. So to explain this, we'd have to output (probably) hundreds
of "this pointcut expression did not match join point ... because ...
" messages. I think the interface for this one has to be something
along the lines of :
explain join point matching for [pointcut-expression] (at join point
kind(s) [list of kind])? (within <type-pattern> | withincode
Which could be supported in some form on the command-line, and
integrated into AJDT.
On 3 Oct 2006, at 20:02, Wes wrote:
A user complained that it took a while to figure out why something
call(* *(one, two)) && args(one)
wasn't working. It strikes me that there are some pointcuts that can
be statically analyzed for these kinds of errors. For ease of
I'd like there to be a way to plug in analyzers and have them
selected messages (e.g., adviceDidNotMatch). The analyzer would get a
reference to the world/pointcut after simplification and message sink.
Good analyzers could be contributed and incorporated. This might also
be a way to evolve better LTW-specific messages.
Would that be good/hard?
aspectj-dev mailing list