[Checkers] Bottom type qualifier
mahmood at MIT.EDU
Tue Jun 2 16:26:14 EDT 2009
Sorry, I forgot about the difference between programmer and type
system designer. I cannot think of a single case where the programmer
explicitly write the annotation. That's why I wanted the explicit
bottom qualifier to be a package scope annotation.
Needless to say that in the cases with a single-line hierarchy (e.g.
interning, nullness), the bottom qualifier (e.g. Interned, NonNull)
needs to be public.
On Jun 2, 2009, at 4:05 PM, Michael Ernst wrote:
>>> When in particular does a programmer want to use the bottom
>>> I believe you, but some concrete examples would be useful.
>> In practice, this is an issue under two conditions:
>> 1. typical condition: There is a value that is a subtype of
>> everything, e.g. null value for most checkers.
>> 2. additional condition: the hierarchy is not a single-line
>> i.e. there are some incomparable qualifiers. Otherwise, a bottom
>> exists by default.
>> As for examples, the only one I can think of now is handling null in
>> almost all checkers (e.g. IGJ, Prototype-NonPrototype-PrototypeOrNot,
>> I can see how numerical literals would be bottom values as well for
>> some unit qualifiers, e.g. DistanceInMile-DistanceInKm.
> These feel like examples where the user should not have to write a
> So keeping the bottom type private might be sufficient, so long as the
> checker can use it internally. In this case, the type system designer
> wouldn't even have to create it explicitly.
> I was really asking for examples where a programmer needs to write the
> bottom type qualifier. Do such examples exist?
More information about the checkers