|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.rwth.dfa.jvm.Solver
An abstract class for a JVM abstraction solver. It contains the basic data
structures describing the JVM abstraction and the method to be
analyzed. Furthermore, it provides the general framework for runtime and memory
statistics. To get a working implementation, the method compute()
must be provided. Implementations should guarantee that all computation is
done there and not in constructors!. Otherwise, the statistics will be
wrong.
| Field Summary | |
protected Abstraction |
abstraction
The JVM abstraction of this solver. |
protected long |
iterations
The number of iterations used by the computation. |
protected long |
memory
The approximation of the amount of memory used by the solution. |
protected de.fub.bytecode.classfile.CodeException[] |
methodExceptions
The code exception array of the method to be analyses. |
protected de.fub.bytecode.generic.InstructionList |
methodInstrs
The instruction list of the method to be analyses. |
protected java.lang.String |
methodName
The name of the method to be analyses. |
protected Stopwatch |
stopwatch
The stop watch to be used for timing the computation. |
| Constructor Summary | |
Solver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions)
Creates a new Solver instance without stop watch. |
|
Solver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
Stopwatch stopwatch)
Creates a new Solver instance with stop watch. |
|
| Method Summary | |
protected abstract void |
compute(java.lang.Object[] solution,
boolean isForward,
boolean isAll)
Implementations must provide this method. |
long |
getIterations()
Returns the number of iterations during the computation. |
long |
getMemory()
Returns an approximation of the amount of memory used during the computation. |
java.lang.Object[] |
getSolution()
Computes the solution by calling compute() and does memory and
timing statistics. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Abstraction abstraction
protected java.lang.String methodName
protected de.fub.bytecode.generic.InstructionList methodInstrs
protected de.fub.bytecode.classfile.CodeException[] methodExceptions
protected Stopwatch stopwatch
null if there is no stop watch to be used.protected long iterations
protected long memory
| Constructor Detail |
public Solver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
Stopwatch stopwatch)
Solver instance with stop watch.abstraction - an Abstraction valuemethodName - a String valuemethodInstrs - an InstructionList valuemethodExceptions - a CodeException[] valuestopwatch - a Stopwatch value
public Solver(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions)
Solver instance without stop watch.abstraction - an Abstraction valuemethodName - a String valuemethodInstrs - an InstructionList valuemethodExceptions - a CodeException[] value| Method Detail |
protected abstract void compute(java.lang.Object[] solution,
boolean isForward,
boolean isAll)
isAll==true). This method is called from
getSolution().
iterations to a sensible
value.
split() method as often as they wish. They may
not call start() or stop().
getSolution(). Hence, setting memory in this method
has no effect.
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 joinpublic java.lang.Object[] getSolution()
compute() and does memory and
timing statistics.Object[] valuepublic long getIterations()
long valuepublic long getMemory()
long value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||