[Checkers] Bottom type qualifier

Michael Ernst mernst at cs.washington.edu
Tue Jun 2 16:05:13 EDT 2009


> > When in particular does a programmer want to use the bottom qualifier?
> > 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 hierarchy,  
> 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,  
> Trusted-Tainted-TaintedOrNot).
> 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 type.
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 mailing list