edu.uci.eecs.doc.clepsydra.loop
Interface LoopBoundStrategy
- All Known Implementing Classes:
- AnnotationLoopBoundStrategy
public interface LoopBoundStrategy
A common interface for various loop bound analysis strategies. By abstracting
strategies behind this interface, Clepsydra can use a variety of loop bound
strategies without knowing the details of how they work.
- Author:
- Trevor Harmon
Method Summary |
int |
getBound(Loop loop)
Determines the maximum number of iterations for the loop (for, while, or
do-while) located at the given bytecode address. |
getBound
int getBound(Loop loop)
throws UnknownLoopBoundException
- Determines the maximum number of iterations for the loop (for, while, or
do-while) located at the given bytecode address. For better performance,
implementors of this interface should cache the method bytecode so that it is
not loaded on each call.
- Parameters:
loop
- the loop node in the tree whose bound is to be determined
- Returns:
- the maximum number of iterations of the loop
- Throws:
UnknownLoopBoundException
- if the loop bound cannot be determined