edu.umd.cs.findbugs.ba.deref

Class UnconditionalValueDerefAnalysis

public class UnconditionalValueDerefAnalysis extends BackwardDataflowAnalysis<UnconditionalValueDerefSet>

Dataflow analysis to find values unconditionally derefenced in the future.

Author: David Hovemeyer

Field Summary
static booleanASSUME_NONZERO_TRIP_LOOPS
static booleanCHECK_ANNOTATIONS
static booleanCHECK_CALLS
static booleanDEBUG
static booleanDEBUG_CHECK_CALLS
static booleanIGNORE_DEREF_OF_NCP
static booleanVERBOSE_NULLARG_DEBUG
Constructor Summary
UnconditionalValueDerefAnalysis(ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs, CFG cfg, Method method, MethodGen methodGen, ValueNumberDataflow vnaDataflow, AssertionMethods assertionMethods)
Constructor.
Method Summary
voidclearDerefsOnNonNullBranches(IsNullValueDataflow invDataflow)
HACK: use the given is-null dataflow to clear deref sets for values that are known to be definitely non-null on a branch.
voidcopy(UnconditionalValueDerefSet source, UnconditionalValueDerefSet dest)
UnconditionalValueDerefSetcreateFact()
voidinitEntryFact(UnconditionalValueDerefSet result)
voidinitResultFact(UnconditionalValueDerefSet result)
booleanisTop(UnconditionalValueDerefSet fact)
static voidmain(String[] args)
voidmakeFactTop(UnconditionalValueDerefSet fact)
voidmeetInto(UnconditionalValueDerefSet fact, Edge edge, UnconditionalValueDerefSet result)
voidmeetInto(UnconditionalValueDerefSet fact, Edge edge, UnconditionalValueDerefSet result, boolean onlyEdge)
booleansame(UnconditionalValueDerefSet fact1, UnconditionalValueDerefSet fact2)
voidsetTypeDataflow(TypeDataflow typeDataflow)

Field Detail

ASSUME_NONZERO_TRIP_LOOPS

public static final boolean ASSUME_NONZERO_TRIP_LOOPS

CHECK_ANNOTATIONS

public static final boolean CHECK_ANNOTATIONS

CHECK_CALLS

public static final boolean CHECK_CALLS

DEBUG

public static final boolean DEBUG

DEBUG_CHECK_CALLS

public static final boolean DEBUG_CHECK_CALLS

IGNORE_DEREF_OF_NCP

public static final boolean IGNORE_DEREF_OF_NCP

VERBOSE_NULLARG_DEBUG

public static final boolean VERBOSE_NULLARG_DEBUG

Constructor Detail

UnconditionalValueDerefAnalysis

public UnconditionalValueDerefAnalysis(ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs, CFG cfg, Method method, MethodGen methodGen, ValueNumberDataflow vnaDataflow, AssertionMethods assertionMethods)
Constructor.

Parameters: rdfs the reverse depth-first-search (for the block order) dfs TODO cfg the CFG for the method method TODO methodGen the MethodGen for the method vnaDataflow assertionMethods AssertionMethods for the analyzed class

Method Detail

clearDerefsOnNonNullBranches

public void clearDerefsOnNonNullBranches(IsNullValueDataflow invDataflow)
HACK: use the given is-null dataflow to clear deref sets for values that are known to be definitely non-null on a branch.

Parameters: invDataflow the IsNullValueDataflow to use

copy

public void copy(UnconditionalValueDerefSet source, UnconditionalValueDerefSet dest)

createFact

public UnconditionalValueDerefSet createFact()

initEntryFact

public void initEntryFact(UnconditionalValueDerefSet result)

initResultFact

public void initResultFact(UnconditionalValueDerefSet result)

isTop

public boolean isTop(UnconditionalValueDerefSet fact)

main

public static void main(String[] args)

makeFactTop

public void makeFactTop(UnconditionalValueDerefSet fact)

meetInto

public void meetInto(UnconditionalValueDerefSet fact, Edge edge, UnconditionalValueDerefSet result)

meetInto

public void meetInto(UnconditionalValueDerefSet fact, Edge edge, UnconditionalValueDerefSet result, boolean onlyEdge)

same

public boolean same(UnconditionalValueDerefSet fact1, UnconditionalValueDerefSet fact2)

setTypeDataflow

public void setTypeDataflow(TypeDataflow typeDataflow)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.