|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.rwth.utils.AbstractClassProcessor | +--de.rwth.dfa.jvm.samples.AbstractAnalyser
An abstract class for constructing applications for analyzing the JVM methods of a class file.
Field Summary | |
protected java.lang.Object[] |
refSolution
The reference solution of the current group of solvers. |
protected Table |
table
The table for collection the statistics. |
Fields inherited from class de.rwth.utils.AbstractClassProcessor |
file, flags |
Constructor Summary | |
AbstractAnalyser(java.lang.String[] args)
Creates a new AbstractAnalyser instance. |
Method Summary | |
protected void |
checkResult(Lattice lattice,
de.fub.bytecode.generic.InstructionList instrs,
java.lang.Object[] solution,
java.lang.Object[] refSolution)
Cross checks results and reports errors in an IllegalArgumentException. |
protected void |
dumpResult(de.fub.bytecode.generic.InstructionList instrs,
java.lang.Object[] solution)
Print the code with the solution to standard output. |
abstract Abstraction |
getAbstraction(de.fub.bytecode.classfile.Method method,
de.fub.bytecode.classfile.Code code,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
de.fub.bytecode.generic.InstructionList instrs)
Supposed to return the abstraction used for a specific method. |
abstract Solver[] |
getSolvers(Abstraction abstraction,
java.lang.String methodName,
de.fub.bytecode.generic.InstructionList methodInstrs,
de.fub.bytecode.classfile.CodeException[] methodExceptions,
Stopwatch stopwatch)
Supposed to return all available solvers. |
protected boolean |
isAllMode()
Checks if all solvers were requested on the command line. |
protected boolean |
isStatisticsMode()
Checks if statistics mode was requested on the command line. |
protected boolean |
isVerboseMode()
Checks if verbose mode was requested on the command line. |
void |
process(de.fub.bytecode.classfile.JavaClass jclass,
java.lang.String filename)
Processes a class file. |
void |
process(de.fub.bytecode.classfile.Method method,
java.lang.String filename)
Processes a method. |
protected void |
transferToTable(Stopwatch stopwatch,
Solver solver,
java.lang.String key)
Transfers the results of a single solver run to the table. |
Methods inherited from class de.rwth.utils.AbstractClassProcessor |
process, usage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Table table
protected java.lang.Object[] refSolution
null
for the first solver of a group.Constructor Detail |
public AbstractAnalyser(java.lang.String[] args)
AbstractAnalyser
instance. It accepts the following
command line options:
-v
-a
-s
args
- a String[]
value: The command line arguments.Method Detail |
protected boolean isVerboseMode()
boolean
valueprotected boolean isAllMode()
boolean
valueprotected boolean isStatisticsMode()
boolean
valueprotected void dumpResult(de.fub.bytecode.generic.InstructionList instrs, java.lang.Object[] solution)
instrs
- an InstructionList
valuesolution
- an Object[]
valueprotected void checkResult(Lattice lattice, de.fub.bytecode.generic.InstructionList instrs, java.lang.Object[] solution, java.lang.Object[] refSolution)
lattice
- a Lattice
valueinstrs
- an InstructionList
valuesolution
- an Object[]
valuerefSolution
- an Object[]
valueprotected void transferToTable(Stopwatch stopwatch, Solver solver, java.lang.String key)
stopwatch
- a Stopwatch
valuesolver
- a Solver
valuekey
- a String
valuepublic abstract Solver[] getSolvers(Abstraction abstraction, java.lang.String methodName, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions, Stopwatch stopwatch)
null
entries. The solution of the first solver in a group is used
as reference solution for the group.abstraction
- an Abstraction
valuemethodName
- a String
valuemethodInstrs
- an InstructionList
valuemethodExceptions
- a CodeException[]
valuestopwatch
- a Stopwatch
valueSolver[]
valuepublic abstract Abstraction getAbstraction(de.fub.bytecode.classfile.Method method, de.fub.bytecode.classfile.Code code, de.fub.bytecode.classfile.CodeException[] methodExceptions, de.fub.bytecode.generic.InstructionList instrs)
method
- a Method
valuecode
- a Code
valuemethodExceptions
- a CodeException[]
valueinstrs
- an InstructionList
valueAbstraction
valuepublic void process(de.fub.bytecode.classfile.Method method, java.lang.String filename)
method
- a Method
valuefilename
- a String
valuepublic void process(de.fub.bytecode.classfile.JavaClass jclass, java.lang.String filename)
process
in class AbstractClassProcessor
jclass
- a JavaClass
valuefilename
- a String
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |