ptolemy.copernicus.kernel
Class NullPointerAnalysis

java.lang.Object
  extended bysoot.toolkits.scalar.AbstractFlowAnalysis
      extended bysoot.toolkits.scalar.BranchedFlowAnalysis
          extended bysoot.toolkits.scalar.ForwardBranchedFlowAnalysis
              extended bysoot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis
                  extended byptolemy.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.12 2004/04/13 17:43:29 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
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, 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
 
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.