edu.umd.cs.findbugs.ba.obl

Class ObligationAnalysis

public class ObligationAnalysis extends ForwardDataflowAnalysis<StateSet>

Dataflow analysis to track obligations (i/o streams and other resources which must be closed).

See Weimer and Necula, Finding and preventing run-time error handling mistakes, OOPSLA 2004.

Author: David Hovemeyer

Constructor Summary
ObligationAnalysis(DepthFirstSearch dfs, TypeDataflow typeDataflow, MethodGen methodGen, ObligationFactory factory, PolicyDatabase database, RepositoryLookupFailureCallback lookupFailureCallback)
Constructor.
Method Summary
voidcopy(StateSet src, StateSet dest)
StateSetcreateFact()
voidendTransfer(BasicBlock basicBlock, InstructionHandle end, StateSet result)
voidinitEntryFact(StateSet fact)
voidinitResultFact(StateSet fact)
booleanisTop(StateSet fact)
voidmakeFactTop(StateSet fact)
voidmeetInto(StateSet fact, Edge edge, StateSet result)
booleansame(StateSet a, StateSet b)

Constructor Detail

ObligationAnalysis

public ObligationAnalysis(DepthFirstSearch dfs, TypeDataflow typeDataflow, MethodGen methodGen, ObligationFactory factory, PolicyDatabase database, RepositoryLookupFailureCallback lookupFailureCallback)
Constructor.

Parameters: dfs a DepthFirstSearch on the method to be analyzed methodGen the MethodGen of the method being analyzed factory the ObligationFactory defining the obligation types database the PolicyDatabase defining the methods which add and delete obligations lookupFailureCallback callback to use when reporting missing classes

Method Detail

copy

public void copy(StateSet src, StateSet dest)

createFact

public StateSet createFact()

endTransfer

public void endTransfer(BasicBlock basicBlock, InstructionHandle end, StateSet result)

initEntryFact

public void initEntryFact(StateSet fact)

initResultFact

public void initResultFact(StateSet fact)

isTop

public boolean isTop(StateSet fact)

makeFactTop

public void makeFactTop(StateSet fact)

meetInto

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

same

public boolean same(StateSet a, StateSet b)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.