de.rwth.dfa.jvm
Class ExecutionSolver
java.lang.Object
|
+--de.rwth.dfa.jvm.Solver
|
+--de.rwth.dfa.jvm.ExecutionSolver
- public class ExecutionSolver
- extends Solver
JVM abstraction solver based on direct execution. It only supports forward
analyses.
- Version:
- $Id: ExecutionSolver.java,v 1.2 2002/09/17 06:53:53 mohnen Exp $
- Author:
- Markus Mohnen
|
Constructor Summary |
ExecutionSolver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions)
Creates a new ExecutionSolver instance with out stop watch. |
ExecutionSolver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
Stopwatch stopwatch)
Creates a new ExecutionSolver instance with stop watch. |
|
Method Summary |
protected void |
compute(java.lang.Object[] solution,
boolean isForward,
boolean isAll)
Implementations must provide this method. |
protected boolean |
maybeTransfer(java.lang.Object[] solution,
Lattice l,
boolean isAll,
java.lang.Object e,
java.lang.Integer targetIndex,
java.util.Hashtable exFunctions)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExecutionSolver
public ExecutionSolver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
Stopwatch stopwatch)
- Creates a new
ExecutionSolver instance with stop watch.
- Parameters:
abstraction - an Abstraction valuemethodName - a String valuemethodInstrs - an InstructionList valuemethodExceptions - a CodeException[] valuestopwatch - a Stopwatch value
ExecutionSolver
public ExecutionSolver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions)
- Creates a new
ExecutionSolver instance with out stop watch.
- Parameters:
abstraction - an Abstraction valuemethodName - a String valuemethodInstrs - an InstructionList valuemethodExceptions - a CodeException[] valuestopwatch - a Stopwatch value
maybeTransfer
protected boolean maybeTransfer(java.lang.Object[] solution,
Lattice l,
boolean isAll,
java.lang.Object e,
java.lang.Integer targetIndex,
java.util.Hashtable exFunctions)
throws FunctionException
compute
protected void compute(java.lang.Object[] solution,
boolean isForward,
boolean isAll)
- Description copied from class:
Solver
- Implementations must provide this method. Given the JVM abstraction and the
method in this classes data structures, the method must compute a correct
solution, i.e. an approximation of the meet over paths solution (for
isAll==true). This method is called from
getSolution().
- Implementations must set the variable
iterations to a sensible
value.
- If there is a stop watch, it is already running. Implementations of this
method may use the
split() method as often as they wish. They may
not call start() or stop().
- An approximation of the memory usage is done by
getSolution(). Hence, setting memory in this method
has no effect.
- Overrides:
compute in class Solver
- Following copied from class:
de.rwth.dfa.jvm.Solver
- Parameters:
solution - an Object[] value: A newly created array for the
solution. It has one entry for each instruction.isForward - a boolean value: Analysis control flowisAll - a boolean value: Use meet or join