Class DoubleValue
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,Double>
de.uzl.its.swat.symbolic.value.primitive.numeric.floatingpoint.DoubleValue
public class DoubleValue
extends NumericalValue<org.sosy_lab.java_smt.api.FloatingPointFormula,Double>
Wrapper for doubles to represent symbolic and concrete information on the symbolic stack
-
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
ConstructorDescriptionDoubleValue
(org.sosy_lab.java_smt.api.SolverContext context, double concrete) Constructor that creates a new DoubleValue without prior symbolic information and only a concrete valueDoubleValue
(org.sosy_lab.java_smt.api.SolverContext context, double concrete, org.sosy_lab.java_smt.api.FloatingPointFormula formula) Constructor that creates a new DoubleValue with prior symbolic information and a concrete value -
Method Summary
Modifier and TypeMethodDescriptionD2F()
Casts a double to a floatD2I()
Casts a double to an integerD2L()
Casts a double to a longDADD
(DoubleValue d) Adds two doublesDCMPG
(DoubleValue f) Compares two doubles and returns: 0 if both values are equal 1 if this double is greater or either float is NaN -1 if the parameter is greater ToDo (Nils): This method is not validatedDCMPL
(DoubleValue f) Compares two doubles and returns: 0 if both values are equal 1 if this double is greater -1 if the parameter is greater or either float is NaN ToDo (Nils): This method is not validatedDDIV
(DoubleValue d) Divides two doublesDMUL
(DoubleValue d) Multiplies two doublesDNEG()
Negates a doubleDREM
(DoubleValue d) Gets the remainder from the division of two doubles WARNING: This is not symbolically tracked!DSUB
(DoubleValue d) Subtracts two doublesorg.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, asFloatValue, 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
-
DoubleValue
public DoubleValue(org.sosy_lab.java_smt.api.SolverContext context, double concrete) Constructor that creates a new DoubleValue without prior symbolic information and only a concrete value- Parameters:
context
- The Java-smt solver contextconcrete
- The concrete double value
-
DoubleValue
public DoubleValue(org.sosy_lab.java_smt.api.SolverContext context, double concrete, org.sosy_lab.java_smt.api.FloatingPointFormula formula) Constructor that creates a new DoubleValue with prior symbolic information and a concrete value- Parameters:
context
- The Java-smt solver contextconcrete
- The concrete double valueformula
- Prior symbolic information
-
-
Method Details
-
MAKE_SYMBOLIC
Turns this DoubleValue into a symbolic variable- Overrides:
MAKE_SYMBOLIC
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Double> - Parameters:
namePrefix
-- 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,
Double> - 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,
Double> - Parameters:
idx
-- 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 -
DADD
Adds two doubles- Parameters:
d
- The other double- Returns:
- The resulting DoubleValue
-
DSUB
Subtracts two doubles- Parameters:
d
- The other double- Returns:
- The resulting DoubleValue
-
DMUL
Multiplies two doubles- Parameters:
d
- The other double- Returns:
- The resulting DoubleValue
-
DDIV
Divides two doubles- Parameters:
d
- The other double- Returns:
- The resulting DoubleValue
-
DREM
Gets the remainder from the division of two doubles WARNING: This is not symbolically tracked!- Parameters:
d
- The other double- Returns:
- The resulting DoubleValue
-
DNEG
Negates a double- Returns:
- The resulting DoubleValue
-
DCMPG
Compares two doubles and returns: 0 if both values are equal 1 if this double is greater or either float is NaN -1 if the parameter is greater ToDo (Nils): This method is not validated- Parameters:
f
- The other DoubleValue- Returns:
- The resulting IntValue with the boolean conditions
-
DCMPL
Compares two doubles and returns: 0 if both values are equal 1 if this double is greater -1 if the parameter is greater or either float is NaN ToDo (Nils): This method is not validated- Parameters:
f
- The other DoubleValue- Returns:
- The resulting IntValue with the boolean conditions
-
D2I
Casts a double to an integer- Returns:
- The resulting IntValue
-
D2F
Casts a double to a float- Returns:
- The resulting FloatValue
-
D2L
Casts a double to a long- Returns:
- The resulting LongValue
-
getConcreteEncoded
- Overrides:
getConcreteEncoded
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Double>
-
asDoubleValue
- Overrides:
asDoubleValue
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Double>
-
asStringValue
- Overrides:
asStringValue
in classValue<org.sosy_lab.java_smt.api.FloatingPointFormula,
Double>
-
toString
Returns the string representation of the value used to visualize the stack. The representation is not complete.
-