edu.umd.cs.findbugs.ba

Class StackDepthAnalysis

public class StackDepthAnalysis extends ForwardDataflowAnalysis<StackDepth>

A really simple forward dataflow analysis to find the depth of the Java operand stack. This is more of a proof of concept for the dataflow analysis framework than anything useful.

See Also: Dataflow DataflowAnalysis

Field Summary
static intBOTTOM
static intTOP
Constructor Summary
StackDepthAnalysis(ConstantPoolGen cpg, DepthFirstSearch dfs)
Constructor.
Method Summary
voidcopy(StackDepth source, StackDepth dest)
StackDepthcreateFact()
voidinitEntryFact(StackDepth entryFact)
voidinitResultFact(StackDepth result)
booleanisTop(StackDepth fact)
static voidmain(String[] argv)
Command line driver, for testing.
voidmakeFactTop(StackDepth fact)
voidmeetInto(StackDepth fact, Edge edge, StackDepth result)
booleansame(StackDepth fact1, StackDepth fact2)

Field Detail

BOTTOM

public static final int BOTTOM

TOP

public static final int TOP

Constructor Detail

StackDepthAnalysis

public StackDepthAnalysis(ConstantPoolGen cpg, DepthFirstSearch dfs)
Constructor.

Parameters: cpg the ConstantPoolGen of the method whose CFG we're performing the analysis on dfs DepthFirstSearch of the method's CFG

Method Detail

copy

public void copy(StackDepth source, StackDepth dest)

createFact

public StackDepth createFact()

initEntryFact

public void initEntryFact(StackDepth entryFact)

initResultFact

public void initResultFact(StackDepth result)

isTop

public boolean isTop(StackDepth fact)

main

public static void main(String[] argv)
Command line driver, for testing.

makeFactTop

public void makeFactTop(StackDepth fact)

meetInto

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

same

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