[Checkers] IGJ checker default annotations
mernst at csail.mit.edu
Sun Mar 2 00:09:23 EST 2008
> Not everything defaults to mutable now. Currently it
> tries to be smart to allow for one to compile his code against the JDK
> as if it's properly annotated. ...
> All lists default to @IGJPlaceHolder a special
> annotation that is a subtype/supertype of all other types.
OK, I didn't realize this. If this helps a lot with checking, then I agree
with your suggestion of making it an option activated via a flag (and
documenting it, of course!).
> it assumes that
> String and boxed primitive types (e.g. Integer, Long) default to
> Mutable; which sometimes cause some errors in cases like when you pass
> such type to equals.
Defaulting String and boxed primitives to immutable (I think "mutable" was
a typo above) certainly seems like the right thing. However, I would refer
to that as a library annotation, not a default. I'm not sure why that
causes a problem with equals, since equals should itself be annotated as
taking a @Readonly parameter.
Do you need to re-run all the case studies once you have made this change,
to collect more accurate numbers?
Perhaps that will indicate other improvements you could make to the
checker. Or perhaps it will indicate that one of the most important
remaining issues is annotating libraries.
More information about the checkers