edu.umd.cs.findbugs.ba

Class SimplePathEnumerator

public class SimplePathEnumerator extends Object implements EdgeTypes, DFSEdgeTypes

Object to enumerate (some subset of) the simple paths in a CFG. A simple path is a path from entry to exit, ignoring backedges and unhandled exceptions.

FIXME: instead of storing the simple paths, should invoke a callback as each simple path is produced. That would save memory.

Author: David Hovemeyer

See Also: CFG

Field Summary
static intDEFAULT_MAX_WORK
Default number of steps to be performed in path enumeration.
Constructor Summary
SimplePathEnumerator(CFG cfg, int maxPaths, int maxWork)
Constructor.
SimplePathEnumerator(CFG cfg, int maxPaths)
Constructor; max work is set to DEFAULT_MAX_WORK.
Method Summary
SimplePathEnumeratorenumerate()
Enumerate the simple paths.
Iterator<List<Edge>>iterator()
Iterate over simple paths.

Field Detail

DEFAULT_MAX_WORK

public static final int DEFAULT_MAX_WORK
Default number of steps to be performed in path enumeration.

Constructor Detail

SimplePathEnumerator

public SimplePathEnumerator(CFG cfg, int maxPaths, int maxWork)
Constructor.

Parameters: cfg the control flow graph to enumerate simple paths of maxPaths maximum number of simple paths to find maxWork maximum number of steps to be performed in the path enumeration (to handle exponential blowup of search space)

SimplePathEnumerator

public SimplePathEnumerator(CFG cfg, int maxPaths)
Constructor; max work is set to DEFAULT_MAX_WORK.

Parameters: cfg the control flow graph to enumerate simple paths of maxPaths maximum number of simple paths to find

Method Detail

enumerate

public SimplePathEnumerator enumerate()
Enumerate the simple paths.

Returns: this object

iterator

public Iterator<List<Edge>> iterator()
Iterate over simple paths.
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.