de.rwth.dfa.jvm.samples
Class AbstractSSDependingAbstraction

java.lang.Object
  |
  +--de.rwth.dfa.jvm.samples.AbstractSSDependingAbstraction
All Implemented Interfaces:
Abstraction
Direct Known Subclasses:
CPAbstraction

public abstract class AbstractSSDependingAbstraction
extends java.lang.Object
implements Abstraction

An abstract helper class for implementing abstractions where the initial values at instructions depend on the size of the operand size at this instruction.

When creating an instance of a sub class, the stack size analysis is performed.

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

Inner classes inherited from class de.rwth.dfa.jvm.Abstraction
Abstraction.Default
 
Field Summary
protected  de.fub.bytecode.generic.ConstantPoolGen cpg
          The constant pool generator used for this abstraction.
protected  java.util.Hashtable stacksizes
          The association between instruction handles and stack sizes.
 
Fields inherited from interface de.rwth.dfa.jvm.Abstraction
DIRECTION_BACKWARD, DIRECTION_FORWARD, QUANTIFIER_ALL, QUANTIFIER_EXISTS
 
Constructor Summary
AbstractSSDependingAbstraction(int maxStack, de.fub.bytecode.generic.ConstantPoolGen constantPoolGen, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions)
          Creates a new AbstractSSDependingAbstraction instance.
AbstractSSDependingAbstraction(int maxStack, de.fub.bytecode.classfile.ConstantPool constantPool, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions)
          Creates a new AbstractSSDependingAbstraction instance.
 
Method Summary
 de.fub.bytecode.generic.ConstantPoolGen getConstantPoolGen()
          Returns the constant pool generator used for this abstraction.
 java.lang.Integer getStacksize(de.fub.bytecode.generic.InstructionHandle ih)
          Returns the stack size for an instruction in a method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.rwth.dfa.jvm.Abstraction
getAbstract, getAbstract, getDirection, getInitialValue, getInitialValue, getLattice, getQuantifier
 

Field Detail

cpg

protected de.fub.bytecode.generic.ConstantPoolGen cpg
The constant pool generator used for this abstraction.

stacksizes

protected java.util.Hashtable stacksizes
The association between instruction handles and stack sizes.
Constructor Detail

AbstractSSDependingAbstraction

public AbstractSSDependingAbstraction(int maxStack,
                                      de.fub.bytecode.generic.ConstantPoolGen constantPoolGen,
                                      de.fub.bytecode.generic.InstructionList methodInstrs,
                                      de.fub.bytecode.classfile.CodeException[] methodExceptions)
Creates a new AbstractSSDependingAbstraction instance.
Parameters:
maxStack - an int value
constantPoolGen - a ConstantPoolGen value
methodInstrs - an InstructionList value
methodExceptions - a CodeException[] value

AbstractSSDependingAbstraction

public AbstractSSDependingAbstraction(int maxStack,
                                      de.fub.bytecode.classfile.ConstantPool constantPool,
                                      de.fub.bytecode.generic.InstructionList methodInstrs,
                                      de.fub.bytecode.classfile.CodeException[] methodExceptions)
Creates a new AbstractSSDependingAbstraction instance.
Parameters:
maxStack - an int value
constantPool - a ConstantPool value
methodInstrs - an InstructionList value
methodExceptions - a CodeException[] value
Method Detail

getConstantPoolGen

public de.fub.bytecode.generic.ConstantPoolGen getConstantPoolGen()
Returns the constant pool generator used for this abstraction.
Returns:
a ConstantPoolGen value

getStacksize

public java.lang.Integer getStacksize(de.fub.bytecode.generic.InstructionHandle ih)
Returns the stack size for an instruction in a method. For instructions with undetermined stack size (dead code), the size is -1.
Parameters:
ih - an InstructionHandle value
Returns:
an Integer value