de.rwth.dfa.jvm.samples
Class CFPAbstraction.BinaryFunction
java.lang.Object
|
+--de.rwth.dfa.jvm.samples.CPAbstraction.CPFunction
|
+--de.rwth.dfa.jvm.samples.CFPAbstraction.ArithmeticFunction
|
+--de.rwth.dfa.jvm.samples.CFPAbstraction.BinaryFunction
- All Implemented Interfaces:
- Function
- Enclosing class:
- CFPAbstraction
- protected class CFPAbstraction.BinaryFunction
- extends CFPAbstraction.ArithmeticFunction
Binary arithmetic operations.
Method Summary |
protected double |
eval(double x,
double y)
Performs the operation on double. |
protected float |
eval(float x,
float y)
Performs the operation on float. |
protected int |
eval(int x,
int y)
Performs the operation on int. |
protected long |
eval(long x,
long y)
Performs the operation on long. |
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 |
ADD_TYPE
protected static final int ADD_TYPE
SUB_TYPE
protected static final int SUB_TYPE
MUL_TYPE
protected static final int MUL_TYPE
DIV_TYPE
protected static final int DIV_TYPE
REM_TYPE
protected static final int REM_TYPE
AND_TYPE
protected static final int AND_TYPE
OR_TYPE
protected static final int OR_TYPE
XOR_TYPE
protected static final int XOR_TYPE
SHL_TYPE
protected static final int SHL_TYPE
SHR_TYPE
protected static final int SHR_TYPE
USHR_TYPE
protected static final int USHR_TYPE
type
protected int type
- Type of binary operation. Must be one of the constants in this class.
CFPAbstraction.BinaryFunction
public CFPAbstraction.BinaryFunction(int type,
int consume,
int produce)
- Creates a new
BinaryFunction
instance. The type must be one of
the constants in this class.
- Parameters:
type
- an int
valueconsume
- an int
valueproduce
- an int
value
eval
protected double eval(double x,
double y)
- Performs the operation on double.
- Parameters:
x
- a double
valuey
- a double
value- Returns:
- a
double
value
eval
protected float eval(float x,
float y)
- Performs the operation on float.
- Parameters:
x
- a float
valuey
- a float
value- Returns:
- a
float
value
eval
protected long eval(long x,
long y)
- Performs the operation on long.
- Parameters:
x
- a long
valuey
- a long
value- Returns:
- a
long
value
eval
protected int eval(int x,
int y)
- Performs the operation on int.
- Parameters:
x
- an int
valuey
- an int
value- Returns:
- an
int
value
toString
public java.lang.String toString()
- Overrides:
toString
in class CFPAbstraction.ArithmeticFunction
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