Class FloatValue
java.lang.Object
de.uzl.its.swat.symbolic.value.Value<T,K>
de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue<org.sosy_lab.java_smt.api.FloatingPointFormula,Float>
de.uzl.its.swat.symbolic.value.primitive.numeric.floatingpoint.FloatValue
public class FloatValue
extends NumericalValue<org.sosy_lab.java_smt.api.FloatingPointFormula,Float>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.sosy_lab.java_smt.api.FormulaType.FloatingPointType
Fields inherited from class de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue
imgr
-
Constructor Summary
ConstructorDescriptionFloatValue
(org.sosy_lab.java_smt.api.SolverContext context, float concrete) FloatValue
(org.sosy_lab.java_smt.api.SolverContext context, float concrete, org.sosy_lab.java_smt.api.FloatingPointFormula formula) -
Method Summary
Modifier and TypeMethodDescriptionF2D()
Casts a float to a doubleF2I()
Casts a float to an integerF2L()
Casts a float to a longFADD
(FloatValue f) Adds two floatsFCMPG
(FloatValue f) Compares two floats and returns: 0 if both values are equal; 1 if this float is greater or either float is NaN; -1 if the parameter is greater ToDo (Nils): This method is not validatedFCMPL
(FloatValue f) Compares two floats and returns: 0 if both values are equal 1 if this float is greater -1 if the parameter is greater or either float is NaN ToDo (Nils): This method is not validatedFDIV
(FloatValue f) Divides two floatsFMUL
(FloatValue f) Multiplies two floatsFNEG()
Negates a floatFREM
(FloatValue f) Gets the remainder from the division of two floats WARNING: This is not symbolically tracked!FSUB
(FloatValue f) Subtracts two floatsorg.sosy_lab.java_smt.api.BooleanFormula
getBounds
(boolean upper) Creates a formula that asserts that this symbolic value is withing the bounds of this typeTurns this DoubleValue into a symbolic variableMAKE_SYMBOLIC
(long idx) Turns this IntValue into a symbolic variableMAKE_SYMBOLIC
(String namePrefix) Turns this DoubleValue into a symbolic variabletoString()
Returns the string representation of the value used to visualize the stack.Methods inherited from class de.uzl.its.swat.symbolic.value.primitive.numeric.NumericalValue
genericToString, wrapByte, wrapCharacter, wrapInteger, wrapLong, wrapShort
Methods inherited from class de.uzl.its.swat.symbolic.value.Value
asBooleanValue, asByteValue, asCharValue, asDoubleValue, asIntValue, asLongValue, asNumericalValue, asObjectValue, asShortValue, getConcrete, getName, getType, initSymbolic, initSymbolic, reset
-
Field Details
-
precision
public static final org.sosy_lab.java_smt.api.FormulaType.FloatingPointType precision
-
-
Constructor Details
-
FloatValue
public FloatValue(org.sosy_lab.java_smt.api.SolverContext context, float concrete) -
FloatValue
public FloatValue(org.sosy_lab.java_smt.api.SolverContext context, float concrete, org.sosy_lab.java_smt.api.FloatingPointFormula formula)
-
-
Method Details
-
MAKE_SYMBOLIC
Turns this DoubleValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float> - Parameters:
namePrefix
-- Returns:
- The numerical identifier of this symbolic variable
-
MAKE_SYMBOLIC
Turns this IntValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float> - Parameters:
idx
-- Returns:
- The numerical identifier of this symbolic variable
-
MAKE_SYMBOLIC
Turns this DoubleValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float> - Returns:
- The numerical identifier of this symbolic variable
-
getBounds
public org.sosy_lab.java_smt.api.BooleanFormula getBounds(boolean upper) Creates a formula that asserts that this symbolic value is withing the bounds of this type -
FADD
Adds two floats- Parameters:
f
- The other float- Returns:
- The resulting FloatValue
-
FDIV
Divides two floats- Parameters:
f
- The other float- Returns:
- The resulting FloatValue
-
FMUL
Multiplies two floats- Parameters:
f
- The other float- Returns:
- The resulting FloatValue
-
FNEG
Negates a float- Returns:
- The resulting FloatValue
-
FREM
Gets the remainder from the division of two floats WARNING: This is not symbolically tracked!- Parameters:
f
- The other flaot- Returns:
- The resulting FloatValue
-
FSUB
Subtracts two floats- Parameters:
f
- The other float- Returns:
- The resulting FloatValue
-
F2I
Casts a float to an integer- Returns:
- The resulting IntValue
-
F2D
Casts a float to a double- Returns:
- The resulting IntValue
-
F2L
Casts a float to a long- Returns:
- The resulting IntValue
-
FCMPG
Compares two floats and returns: 0 if both values are equal; 1 if this float is greater or either float is NaN; -1 if the parameter is greater ToDo (Nils): This method is not validated- Parameters:
f
- The other FloatValue- Returns:
- The resulting IntValue with the boolean conditions
-
FCMPL
Compares two floats and returns: 0 if both values are equal 1 if this float is greater -1 if the parameter is greater or either float is NaN ToDo (Nils): This method is not validated- Parameters:
f
- The other FloatValue- Returns:
- The resulting IntValue with the boolean conditions
-
asFloatValue
- Overrides:
asFloatValue
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float>
-
asStringValue
- Overrides:
asStringValue
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float>
-
getConcreteEncoded
- Overrides:
getConcreteEncoded
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Float>
-
toString
Returns the string representation of the value used to visualize the stack. The representation is not complete.
-