[Checkers] <@ReadOnly Object> generic type (fwd)
Michael Ernst
mernst at csail.mit.edu
Wed Mar 26 10:45:01 EDT 2008
Matt-
> > These examples suggest a generalization. For methods with no (possibly
> > inherited) methods with mutable receiver, make "extends Foo" equivalent to
> > "extends @Readonly Foo". Otherwise, "extends Foo" is equivalent to
> > "extends @Mutable Foo".
> >
> > Does this proposal work, or am I missing something?
>
> I believe that it works. (But it should be "for _classes_ with no
> methods with a mutable receiver", right?)
Yes, you are right; thanks for catching my typo.
> Can we generalize it further -- over all type systems -- so that we can
> eventually implement this in the framework rather than special-casing it
> for IGJ and Javari? (This goes back to the idea of handing the framework
> the annotation type hierarchy and having it sort things out
> automatically.) I think "for classes with no methods with a receiver
> bearing a subtype qualifier" works, but only for type systems like
> Javari and IGJ for which Object is not the base type.
Yes, this is my intention: the ultimate supertype should be determined
automatically by the framework. Our discussion is applicable to any type
qualifier system in which the root (the top) of the type qualifier
hierarchy is not the default. Our only examples so far are IGJ and Javari,
but I prefer to see this in the framework, with no extra work at all
required by IGJ and Javari to enable it.
-Mike
More information about the checkers
mailing list