de.rwth.dfa.jvm
Class FactorisedBasicBlockGraphSolver

java.lang.Object
  |
  +--de.rwth.dfa.jvm.Solver
        |
        +--de.rwth.dfa.jvm.GraphSolver
              |
              +--de.rwth.dfa.jvm.FactorisedFlowGraphSolver
                    |
                    +--de.rwth.dfa.jvm.FactorisedBasicBlockGraphSolver
Direct Known Subclasses:
BasicBlockGraphSolver

public class FactorisedBasicBlockGraphSolver
extends FactorisedFlowGraphSolver

A JVM abstraction solver using factorised basic block graphs.

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

Fields inherited from class de.rwth.dfa.jvm.Solver
abstraction, iterations, memory, methodExceptions, methodInstrs, methodName, stopwatch
 
Constructor Summary
FactorisedBasicBlockGraphSolver(Abstraction abstraction, java.lang.String methodName, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions)
          Creates a new FactorisedBasicBlockGraphSolver instance with out stop watch.
FactorisedBasicBlockGraphSolver(Abstraction abstraction, java.lang.String methodName, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions, Stopwatch stopwatch)
          Creates a new FactorisedBasicBlockGraphSolver instance with stop watch.
 
Method Summary
protected  RootedGraph createGraph()
          Creates a factorised basic block graph for a method.
protected  java.lang.Object getFunction(RootedGraph.Node n)
          Computes the transfer function for a node, i.e.
protected  java.lang.Object getInit(RootedGraph.Node n, boolean isForward)
          Computes the initial value for a node, i.e.
protected  void transferSolution(RootedGraph graph, Graph.NodeDyer gsolution, boolean isForward, boolean isAll, java.lang.Object[] solution)
          Transfers the solution associated with the basic blocks to an array.
 
Methods inherited from class de.rwth.dfa.jvm.FactorisedFlowGraphSolver
nodesToIndex
 
Methods inherited from class de.rwth.dfa.jvm.GraphSolver
compute
 
Methods inherited from class de.rwth.dfa.jvm.Solver
getIterations, getMemory, getSolution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FactorisedBasicBlockGraphSolver

public FactorisedBasicBlockGraphSolver(Abstraction abstraction,
                                       java.lang.String methodName,
                                       de.fub.bytecode.generic.InstructionList methodInstrs,
                                       de.fub.bytecode.classfile.CodeException[] methodExceptions,
                                       Stopwatch stopwatch)
Creates a new FactorisedBasicBlockGraphSolver instance with stop watch.
Parameters:
abstraction - an Abstraction value
methodName - a String value
methodInstrs - an InstructionList value
methodExceptions - a CodeException[] value
stopwatch - a Stopwatch value

FactorisedBasicBlockGraphSolver

public FactorisedBasicBlockGraphSolver(Abstraction abstraction,
                                       java.lang.String methodName,
                                       de.fub.bytecode.generic.InstructionList methodInstrs,
                                       de.fub.bytecode.classfile.CodeException[] methodExceptions)
Creates a new FactorisedBasicBlockGraphSolver instance with out stop watch.
Parameters:
abstraction - an Abstraction value
methodName - a String value
methodInstrs - an InstructionList value
methodExceptions - a CodeException[] value
stopwatch - a Stopwatch value
Method Detail

createGraph

protected RootedGraph createGraph()
Creates a factorised basic block graph for a method.
Overrides:
createGraph in class FactorisedFlowGraphSolver
Returns:
a RootedGraph value

getInit

protected java.lang.Object getInit(RootedGraph.Node n,
                                   boolean isForward)
Computes the initial value for a node, i.e. for a basic block.
Overrides:
getInit in class FactorisedFlowGraphSolver
Parameters:
n - a RootedGraph.Node value
Returns:
an Object value

getFunction

protected java.lang.Object getFunction(RootedGraph.Node n)
Computes the transfer function for a node, i.e. for a basic block..
Overrides:
getFunction in class FactorisedFlowGraphSolver
Parameters:
n - a RootedGraph.Node value
Returns:
an Object value

transferSolution

protected void transferSolution(RootedGraph graph,
                                Graph.NodeDyer gsolution,
                                boolean isForward,
                                boolean isAll,
                                java.lang.Object[] solution)
Transfers the solution associated with the basic blocks to an array.
Overrides:
transferSolution in class FactorisedFlowGraphSolver
Parameters:
graph - a RootedGraph value
gsolution - a Graph.NodeDyer value
isForward - a boolean value
isAll - a boolean value
solution - an Object[] value