ptolemy.copernicus.kernel
Class NullPointerAnalysis

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowAnalysis
      extended by soot.toolkits.scalar.BranchedFlowAnalysis
          extended by soot.toolkits.scalar.ForwardBranchedFlowAnalysis
              extended by soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis
                  extended by ptolemy.copernicus.kernel.NullPointerAnalysis

public class NullPointerAnalysis
extends soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis

An analysis that can determine, at any point in the code, if a local variable points to null. This is just a nice wrapper class for soot's BranchedRefVarsAnalysis.

Since:
Ptolemy II 4.0
Version:
$Id: NullPointerAnalysis.java,v 1.17 2005/07/08 19:57:16 cxh Exp $
Author:
Steve Neuendorffer
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Field Summary
 
Fields inherited from class soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis
emptySet, fullSet, kBottom, kNonNull, kNull, kTop, refTypeInstFieldBases, refTypeInstFields, refTypeLocals, refTypeStaticFields, refTypeValues, tempFlowSet, unitToAnalyzedChecksSet, unitToArrayRefChecksSet, unitToGenerateSet, unitToInstanceFieldRefChecksSet, unitToInstanceInvokeExprChecksSet, unitToLengthExprChecksSet, unitToPreserveSet
 
Fields inherited from class soot.toolkits.scalar.BranchedFlowAnalysis
unitToAfterBranchFlow, unitToAfterFallFlow
 
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
filterUnitToBeforeFlow, graph, unitToBeforeFlow
 
Constructor Summary
NullPointerAnalysis(soot.toolkits.graph.UnitGraph g)
           
 
Method Summary
 boolean isAlwaysNullBefore(soot.Local local, soot.Unit unit)
          Return the set of other fields and locals that must reference the same object as the given field, at a point before the given unit.
 boolean isNeverNullBefore(soot.Local local, soot.Unit unit)
          Return the set of other fields and locals that must reference the same object as the given local, at a point before the given unit.
 
Methods inherited from class soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis
anyRefInfo, copy, entryInitialFlow, flowThrough, getEquivalentValue, getKRefIntPair, isAlwaysNonNull, merge, newInitialFlow, refInfo, refInfo, treatTrapHandlersAsEntries
 
Methods inherited from class soot.toolkits.scalar.ForwardBranchedFlowAnalysis
doAnalysis, isForward
 
Methods inherited from class soot.toolkits.scalar.BranchedFlowAnalysis
getBranchFlowAfter, getFallFlowAfter, getFlowBefore
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
customizeInitialFlowGraph, getFlowBefore, merge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullPointerAnalysis

public NullPointerAnalysis(soot.toolkits.graph.UnitGraph g)
Method Detail

isAlwaysNullBefore

public boolean isAlwaysNullBefore(soot.Local local,
                                  soot.Unit unit)
Return the set of other fields and locals that must reference the same object as the given field, at a point before the given unit.


isNeverNullBefore

public boolean isNeverNullBefore(soot.Local local,
                                 soot.Unit unit)
Return the set of other fields and locals that must reference the same object as the given local, at a point before the given unit.