[Soot-list] Soot typing issue: local gets the null_type

Patrick LAM plam at sable.mcgill.ca
Wed Apr 5 17:34:42 EDT 2006


On Wed, 5 Apr 2006, Todd Wallentine wrote:

> Here is some sample code that shows this behavior:
> public class Test {
>          public static void main(String[] args) {
>                  Foo f = new Foo();
>                  f = null;
>                  f.inc();
>          }
> }

Hi Todd,

The Soot typing code is correctly deducing that f.inc() will occur on
'null'.  It could, of course, deduce a more general type, but I understand
that the Soot typing algorithm will deduce the narrowest possible type,
which is 'null' in this case.

Is it possible to make Bandera handle null types appropriately?  That
would seem to be the best solution.  The input code isn't especially
meaningful either, as it'll always result in a NullPointerException.

pat




More information about the Soot-list mailing list