edu.umd.cs.findbugs.ba

Class LiveLocalStoreAnalysis

public class LiveLocalStoreAnalysis extends BackwardDataflowAnalysis<BitSet> implements Debug

Dataflow analysis to find live stores of locals. This is just a backward analysis to see which loads reach stores of the same local.

This analysis also computes which stores that were killed by a subsequent store on any subsequent reachable path. (The FindDeadLocalStores detector uses this information to reduce false positives.)

Author: David Hovemeyer

Constructor Summary
LiveLocalStoreAnalysis(MethodGen methodGen, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs)
Method Summary
voidcopy(BitSet source, BitSet dest)
BitSetcreateFact()
voidinitEntryFact(BitSet result)
voidinitResultFact(BitSet result)
booleanisStoreAlive(BitSet fact, int local)
Return whether or not a store of given local is alive.
booleanisTop(BitSet fact)
Return whether or not given fact is the special TOP value.
booleankilledByStore(BitSet fact, int local)
Return whether or not a store of given local was killed by a subsequent (dominated) store.
static voidmain(String[] argv)
voidmakeFactTop(BitSet fact)
voidmeetInto(BitSet fact, Edge edge, BitSet result)
booleansame(BitSet fact1, BitSet fact2)

Constructor Detail

LiveLocalStoreAnalysis

public LiveLocalStoreAnalysis(MethodGen methodGen, ReverseDepthFirstSearch rdfs, DepthFirstSearch dfs)

Method Detail

copy

public void copy(BitSet source, BitSet dest)

createFact

public BitSet createFact()

initEntryFact

public void initEntryFact(BitSet result)

initResultFact

public void initResultFact(BitSet result)

isStoreAlive

public boolean isStoreAlive(BitSet fact, int local)
Return whether or not a store of given local is alive.

Parameters: fact a dataflow fact created by this analysis local the local

isTop

public boolean isTop(BitSet fact)
Return whether or not given fact is the special TOP value.

killedByStore

public boolean killedByStore(BitSet fact, int local)
Return whether or not a store of given local was killed by a subsequent (dominated) store.

main

public static void main(String[] argv)

makeFactTop

public void makeFactTop(BitSet fact)

meetInto

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

same

public boolean same(BitSet fact1, BitSet fact2)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.