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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CFPAbstraction.CompareFunction
public CFPAbstraction.CompareFunction(int consume,
int produce)
- Creates a new
CompareFunction
instance.
- Parameters:
consume
- an int
valueproduce
- an int
value
eval
protected int eval(double x,
double y)
- Compares two doubles.
- Parameters:
x
- a double
valuey
- a double
value- Returns:
- an
int
value
eval
protected int eval(float x,
float y)
- Compares two floats.
- Parameters:
x
- a float
valuey
- a float
value- Returns:
- an
int
value
eval
protected int eval(long x,
long y)
- Compares two longs.
- Parameters:
x
- a long
valuey
- a long
value- Returns:
- an
int
value
eval
protected int eval(int x,
int y)
- Compares two ints.
- Parameters:
x
- an int
valuey
- 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