de.rwth.dfa.jvm.samples
Class CFPAbstraction

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

public class CFPAbstraction
extends CPAbstraction
implements Abstraction

Implementation of a constant folding propagation abstraction. It can be used to determine constant values in both stack an local variables. The domain used is CFPLattice.

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

Inner Class Summary
protected  class CFPAbstraction.ArithmeticFunction
          An abstract class for arithmetic manipulation of the stack.
protected  class CFPAbstraction.BinaryFunction
          Binary arithmetic operations.
protected  class CFPAbstraction.CompareFunction
          Compares to numbers.
protected  class CFPAbstraction.ConversionFunction
          Conversion functions.
protected  class CFPAbstraction.NegationFunction
          Negates a number.
 
Inner classes inherited from class de.rwth.dfa.jvm.samples.CPAbstraction
CPAbstraction.AllocationFunction, CPAbstraction.CPFunction, CPAbstraction.DupFunction, CPAbstraction.ExceptionHeaderFunction, CPAbstraction.GenericFunction, CPAbstraction.IncLocalFunction, CPAbstraction.PopFunction, CPAbstraction.PushConstantFunction, CPAbstraction.PushLocalFunction, CPAbstraction.StoreLocalFunction, CPAbstraction.SwapFunction
 
Inner classes inherited from class de.rwth.dfa.jvm.Abstraction
Abstraction.Default
 
Fields inherited from class de.rwth.dfa.jvm.samples.CPAbstraction
l, maxLocals, maxStack
 
Fields inherited from class de.rwth.dfa.jvm.samples.AbstractSSDependingAbstraction
cpg, stacksizes
 
Fields inherited from interface de.rwth.dfa.jvm.Abstraction
DIRECTION_BACKWARD, DIRECTION_FORWARD, QUANTIFIER_ALL, QUANTIFIER_EXISTS
 
Constructor Summary
CFPAbstraction(int maxStack, int maxLocals, de.fub.bytecode.generic.ConstantPoolGen constantPoolGen, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions)
          Creates a new CFPAbstraction instance.
CFPAbstraction(int maxStack, int maxLocals, de.fub.bytecode.classfile.ConstantPool constantPool, de.fub.bytecode.generic.InstructionList methodInstrs, de.fub.bytecode.classfile.CodeException[] methodExceptions)
          Creates a new CFPAbstraction instance.
 
Method Summary
 Function getAbstract(de.fub.bytecode.generic.InstructionHandle ih)
          Creates an instance of CPFunction for an instruction.
 
Methods inherited from class de.rwth.dfa.jvm.samples.CPAbstraction
getAbstract, getDirection, getInitialValue, getInitialValue, getLattice, getQuantifier
 
Methods inherited from class de.rwth.dfa.jvm.samples.AbstractSSDependingAbstraction
getConstantPoolGen, getStacksize
 
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, getDirection, getInitialValue, getInitialValue, getLattice, getQuantifier
 

Constructor Detail

CFPAbstraction

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

CFPAbstraction

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

getAbstract

public Function getAbstract(de.fub.bytecode.generic.InstructionHandle ih)
Creates an instance of CPFunction for an instruction.
Specified by:
getAbstract in interface Abstraction
Overrides:
getAbstract in class CPAbstraction
Parameters:
ih - an InstructionHandle value
Returns:
a Function value