de.rwth.dfa.jvm.samples
Class CFPAbstraction.ConversionFunction

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

protected class CFPAbstraction.ConversionFunction
extends CFPAbstraction.ArithmeticFunction

Conversion functions.


Inner classes inherited from class de.rwth.domains.Function
Function.Tools
 
Field Summary
protected static int BYTE_CONV
           
protected static int CHAR_CONV
           
protected static int DOUBLE_CONV
           
protected static int FLOAT_CONV
           
protected static int INT_CONV
           
protected static int LONG_CONV
           
protected static int SHORT_CONV
           
protected  int target
          Target type of conversion.
 
Fields inherited from class de.rwth.dfa.jvm.samples.CFPAbstraction.ArithmeticFunction
n
 
Fields inherited from class de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
consume, produce
 
Constructor Summary
CFPAbstraction.ConversionFunction(int target, int consume, int produce)
          Creates a new ConversionFunction instance.
 
Method Summary
 java.lang.Number evaluate(java.lang.Number[] values)
          Supposed to do the actual operation.
 java.lang.String toString()
           
 
Methods inherited from class de.rwth.dfa.jvm.samples.CFPAbstraction.ArithmeticFunction
apply
 
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

LONG_CONV

protected static final int LONG_CONV

INT_CONV

protected static final int INT_CONV

DOUBLE_CONV

protected static final int DOUBLE_CONV

FLOAT_CONV

protected static final int FLOAT_CONV

SHORT_CONV

protected static final int SHORT_CONV

BYTE_CONV

protected static final int BYTE_CONV

CHAR_CONV

protected static final int CHAR_CONV

target

protected int target
Target type of conversion. Must be one of the constants in this class.
Constructor Detail

CFPAbstraction.ConversionFunction

public CFPAbstraction.ConversionFunction(int target,
                                         int consume,
                                         int produce)
Creates a new ConversionFunction instance.
Parameters:
target - an int value
consume - an int value
produce - an int value
Method Detail

evaluate

public java.lang.Number evaluate(java.lang.Number[] values)
                          throws FunctionException
Description copied from class: CFPAbstraction.ArithmeticFunction
Supposed to do the actual operation.
Overrides:
evaluate in class CFPAbstraction.ArithmeticFunction
Following copied from class: de.rwth.dfa.jvm.samples.CFPAbstraction.ArithmeticFunction
Parameters:
values - a Number[] value
Returns:
a Number value
Throws:
FunctionException - if an error occurs

toString

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