Commit Graph

5 Commits

Author SHA1 Message Date
Martin Hecker edf4f8ed6f Attempt to fix intraprocedural Nullpointer analysis by respecting phi nodes, and correctly initializing entry variables.
Since  SSAPhiInstructions are never visited by NullPointerTransferFunctionProvider.TransferFunctionSSAVisitor,
we now respect phi instructions present at a given block by providing additional NodeTransferFunctions, improving precision.

Formerly, meets would lead to incorrect results due to incorrect initialization of initial data flow facts.

These are now properly initialized, interpreting
  "State.BOTH" to mean: both "null" and "non-null" are possible values for the given variable, and
  "State.UNKNOWN" to be the absurd assertion.

The initial fact at the entry block assumes variables to be BOTH, other blocks are initialy assumed unreachable and hence their variables to be UNKNOWN.
2016-12-07 17:56:48 +01:00
Julian Dolby a1bc84356d scandriod merge 2014-10-01 21:32:36 -04:00
Juergen Graf cc5162b95f remove some compiler warnings in nullpointer analysis 2014-05-06 23:55:49 +02:00
Juergen Graf 34674387e6 code cleanup of nullpointer analysis
- replace tabs with whitespace
- adjust documentation to refer to renamed stuff
2012-03-30 13:43:57 +02:00
Juergen Graf 2d3052bede intraprocedural nullpointer exception analysis 2011-04-11 16:28:51 +02:00