[Checkers] Checker for JCIP @GuardedBy annotation

Jeremy Manson jeremy.manson at gmail.com
Mon Jun 15 14:10:44 EDT 2009

Hi Mike,

I don't actually have any projects with it either.  I think there is
something of a chicken-egg problem here, which is that without the
checker, people don't actually find it useful to put in the
annotations.  Now that there is a checker, I will ask around a bit and
see if someone wants to use it in their project.

The C++ compiler folks here have gotten some good mileage out of
cribbing the JCiP annotations and writing a checker for them, so I
would expect there to be some interest from internal Java users, too.



On Fri, Jun 12, 2009 at 10:44 AM, Michael Ernst<mernst at cs.washington.edu> wrote:
> Jeremy-
> At JavaOne, you asked me whether the Checker Framework's pluggable type
> systems could check JCIP's @GuardedBy annotation.  They did not at the
> time, but spurred by your encouragement and that of other people at
> JavaOne, Mahmood Ali (cc'ed) wrote a checker for the JCIP GuardedBy
> annotation, as a type-checker built on the Checker Framework.  (We already
> had a checker for an @Immutable annotation that is essentially the same as
> the JCIP one.)
> Mahmood has checked a couple of projects that already had a few @GuardedBy
> annotations.  De found no errors with those particular annotations.  We
> will look into additional projects.  The biggest difficulty with such a
> case study is knowing what the intended locking semantics is.  If you have
> projects where you know that information, we would be happy to try our
> checker on your codebase.  Or, we can give you the checker so that you can
> try it yourself.
>                    -Mike

More information about the checkers mailing list