de.rwth.dfa.jvm.samples
Class CPAnalyser

java.lang.Object
  |
  +--de.rwth.utils.AbstractClassProcessor
        |
        +--de.rwth.dfa.jvm.samples.AbstractAnalyser
              |
              +--de.rwth.dfa.jvm.samples.CPAnalyser
Direct Known Subclasses:
CFPAnalyser

public class CPAnalyser
extends AbstractAnalyser

An application for finding constants in the operand stack and the local variables at each instruction of all methods of a class file.

Version:
$Id: CPAnalyser.java,v 1.3 2002/09/17 06:53:53 mohnen Exp $
Author:
Markus Mohnen

Fields inherited from class de.rwth.dfa.jvm.samples.AbstractAnalyser
refSolution, table
 
Fields inherited from class de.rwth.utils.AbstractClassProcessor
file, flags
 
Constructor Summary
CPAnalyser(java.lang.String[] args)
          Creates a new CPAnalyser instance.
 
Method Summary
 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)
          Returns a CPAbstraction for a method.
 Solver[] getSolvers(Abstraction abstraction, java.lang.String methodName, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions, Stopwatch stopwatch)
          Returns two groups of solvers: BasicBlockGraphSolver, ExecutionSolver, FlowGraphSolver, and FactorisedFlowGraphSolver, FactorisedBasicBlockGraphSolver.
static void main(java.lang.String[] args)
          Program entry point.
 void process(de.fub.bytecode.classfile.Method method, java.lang.String filename)
          Does additional statistics in addition to AbstractAnalyser.process(Method,String).
 
Methods inherited from class de.rwth.dfa.jvm.samples.AbstractAnalyser
checkResult, dumpResult, isAllMode, isStatisticsMode, isVerboseMode, process, transferToTable
 
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
 

Constructor Detail

CPAnalyser

public CPAnalyser(java.lang.String[] args)
Creates a new CPAnalyser instance.
Parameters:
args - a String[] value
See Also:
AbstractAnalyser
Method Detail

main

public static void main(java.lang.String[] args)
Program entry point.
Parameters:
args - a String[] value
See Also:
AbstractAnalyser

getAbstraction

public 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)
Returns a CPAbstraction for a method.
Overrides:
getAbstraction in class AbstractAnalyser
Parameters:
method - a Method value
code - a Code value
methodExceptions - a CodeException[] value
instrs - an InstructionList value
Returns:
an Abstraction value

getSolvers

public Solver[] getSolvers(Abstraction abstraction,
                           java.lang.String methodName,
                           de.fub.bytecode.generic.InstructionList methodInstrs,
                           de.fub.bytecode.classfile.CodeException[] methodExceptions,
                           Stopwatch stopwatch)
Returns two groups of solvers: BasicBlockGraphSolver, ExecutionSolver, FlowGraphSolver, and FactorisedFlowGraphSolver, FactorisedBasicBlockGraphSolver.
Overrides:
getSolvers in class AbstractAnalyser
Parameters:
abstraction - an Abstraction value
methodName - a String value
methodInstrs - an InstructionList value
methodExceptions - a CodeException[] value
stopwatch - a Stopwatch value
Returns:
a Solver[] value

process

public void process(de.fub.bytecode.classfile.Method method,
                    java.lang.String filename)
Does additional statistics in addition to AbstractAnalyser.process(Method,String).
Overrides:
process in class AbstractAnalyser
Parameters:
method - a Method value
filename - a String value