[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [aspectj-dev] pointcut diagnosis plug point
- From: "Alex Popescu" <the.mindstorm.mailinglist@xxxxxxxxx>
- Date: Mon, 23 Oct 2006 00:51:07 +0300
- Delivered-to: firstname.lastname@example.org
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aoFdlm2nMF31Th3Lv30Z97SVBRLtY0VtKBED0Y79atHvNg+Sk/jqOZgC2Xzf/DfMJRyrGsZ4s49R2u+uPWpQmD/IFolG8nkapJQlTcvA6Wt+JiTS2BPV/JBhXvoBZzI+wr5g2oPtROeSC12xD4iHbr4V/fsxFci0t4+bUtTprc8=
On 10/5/06, Adrian Colyer <adrian.colyer@xxxxxxxxx> wrote:
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.
Adrian this seems extremely interesting and I am wondering if you got
the time to push it a bit. I was also thinking about a tool to do the
reverse: use something like a small pointcut DSL (I am not sure how
small it is :-) ) and generate the AspectJ pointcut. Many people I
have worked with (and even myself) are sometimes mistakenly using the
AspectJ pointcut syntax, so I am thinking that a higher level
definition may help.
.w( the_mindstorm )p.
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
> invoked on
> 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
aspectj-dev mailing list