de.rwth.dfa.jvm.samples
Class CPAbstraction.StoreLocalFunction

java.lang.Object
  |
  +--de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
        |
        +--de.rwth.dfa.jvm.samples.CPAbstraction.StoreLocalFunction
All Implemented Interfaces:
Function
Enclosing class:
CPAbstraction

protected class CPAbstraction.StoreLocalFunction
extends CPAbstraction.CPFunction

Stores the top element in a local variable slot.


Inner classes inherited from class de.rwth.domains.Function
Function.Tools
 
Field Summary
protected  int index
          The local variable slot to store.
 
Fields inherited from class de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
consume, produce
 
Constructor Summary
CPAbstraction.StoreLocalFunction(int index, int consume, int produce)
          Creates a new StoreLocalFunction instance.
 
Method Summary
protected  void apply(java.lang.Object[] locals, java.util.Stack stack)
          Pops the top element from the stack and stores it in the local variable slot of this function.
 java.lang.String toString()
           
 
Methods inherited from class de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
apply, getDomain, getRange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

protected int index
The local variable slot to store.
Constructor Detail

CPAbstraction.StoreLocalFunction

public CPAbstraction.StoreLocalFunction(int index,
                                        int consume,
                                        int produce)
Creates a new StoreLocalFunction instance.
Parameters:
index - an int value
consume - an int value
produce - an int value
Method Detail

apply

protected void apply(java.lang.Object[] locals,
                     java.util.Stack stack)
              throws FunctionException
Pops the top element from the stack and stores it in the local variable slot of this function. In addition, it Pops as many entries from the stack as necessary to fulfill correct stack behavior.
Overrides:
apply in class CPAbstraction.CPFunction
Parameters:
locals - an Object[] value
stack - a Stack value
Throws:
FunctionException - if an error occurs

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object