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

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

protected class CFPAbstraction.CompareFunction
extends CFPAbstraction.ArithmeticFunction

Compares to numbers.


Inner classes inherited from class de.rwth.domains.Function
Function.Tools
 
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.CompareFunction(int consume, int produce)
          Creates a new CompareFunction instance.
 
Method Summary
protected  int eval(double x, double y)
          Compares two doubles.
protected  int eval(float x, float y)
          Compares two floats.
protected  int eval(int x, int y)
          Compares two ints.
protected  int eval(long x, long y)
          Compares two longs.
 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
 

Constructor Detail

CFPAbstraction.CompareFunction

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

eval

protected int eval(double x,
                   double y)
Compares two doubles.
Parameters:
x - a double value
y - a double value
Returns:
an int value

eval

protected int eval(float x,
                   float y)
Compares two floats.
Parameters:
x - a float value
y - a float value
Returns:
an int value

eval

protected int eval(long x,
                   long y)
Compares two longs.
Parameters:
x - a long value
y - a long value
Returns:
an int value

eval

protected int eval(int x,
                   int y)
Compares two ints.
Parameters:
x - an int value
y - an int value
Returns:
an int value

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