Class DebuggingFloatingPointFormulaManager
- java.lang.Object
-
- org.sosy_lab.java_smt.delegate.debugging.DebuggingFloatingPointFormulaManager
-
- All Implemented Interfaces:
FloatingPointFormulaManager
public class DebuggingFloatingPointFormulaManager extends Object implements FloatingPointFormulaManager
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FloatingPointFormulaabs(FloatingPointFormula number)FloatingPointFormulaadd(FloatingPointFormula number1, FloatingPointFormula number2)FloatingPointFormulaadd(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)BooleanFormulaassignment(FloatingPointFormula number1, FloatingPointFormula number2)Create a term for assigning one floating-point term to another.FloatingPointFormulacastFrom(Formula source, boolean signed, FormulaType.FloatingPointType targetType)Build aFloatingPointFormulafrom another compatible formula.FloatingPointFormulacastFrom(Formula source, boolean signed, FormulaType.FloatingPointType targetType, FloatingPointRoundingMode pFloatingPointRoundingMode)Build aFloatingPointFormulafrom another compatible formula.<T extends Formula>
TcastTo(FloatingPointFormula source, boolean signed, FormulaType<T> targetType)Build a formula of compatible type from aFloatingPointFormula.<T extends Formula>
TcastTo(FloatingPointFormula source, boolean signed, FormulaType<T> targetType, FloatingPointRoundingMode pFloatingPointRoundingMode)Build a formula of compatible type from aFloatingPointFormula.FloatingPointFormuladivide(FloatingPointFormula number1, FloatingPointFormula number2)FloatingPointFormuladivide(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)BooleanFormulaequalWithFPSemantics(FloatingPointFormula number1, FloatingPointFormula number2)Create a term for comparing the equality of two floating-point terms, according to standard floating-point semantics (i.e.,NaN != NaNand0.0 == -0.0).FloatingPointFormulafromIeeeBitvector(BitvectorFormula number, FormulaType.FloatingPointType pTargetType)Create a formula that interprets the given bitvector as a floating-point value in the IEEE format, according to the given type.intgetExponentSize(FloatingPointFormula number)Returns the size of the exponent for the givenFloatingPointFormula.intgetMantissaSizeWithSignBit(FloatingPointFormula number)Returns the size of the mantissa (also called a coefficient or significant), including the sign bit, for the givenFloatingPointFormula.BooleanFormulagreaterOrEquals(FloatingPointFormula number1, FloatingPointFormula number2)Returns whether an FP number is greater or equal than another FP number.BooleanFormulagreaterThan(FloatingPointFormula number1, FloatingPointFormula number2)Returns whether an FP number is greater than another FP number.BooleanFormulaisInfinity(FloatingPointFormula number)Checks whether a formula is positive or negative infinity.BooleanFormulaisNaN(FloatingPointFormula number)Check whether a floating-point number is NaN.BooleanFormulaisNegative(FloatingPointFormula number)Checks whether a formula is negative, including -0.0.BooleanFormulaisNormal(FloatingPointFormula number)Checks whether a formula is normal FP number.BooleanFormulaisSubnormal(FloatingPointFormula number)Checks whether a formula is subnormal FP number.BooleanFormulaisZero(FloatingPointFormula number)Checks whether a formula is positive or negative zero.BooleanFormulalessOrEquals(FloatingPointFormula number1, FloatingPointFormula number2)Returns whether an FP number is less or equal than another FP number.BooleanFormulalessThan(FloatingPointFormula number1, FloatingPointFormula number2)Returns whether an FP number is less than another FP number.FloatingPointFormulamakeMinusInfinity(FormulaType.FloatingPointType type)FloatingPointFormulamakeNaN(FormulaType.FloatingPointType type)FloatingPointFormulamakeNumber(double n, FormulaType.FloatingPointType type)Creates a floating point formula representing the given double value with the specified type.FloatingPointFormulamakeNumber(double n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)Creates a floating point formula representing the given double value with the specified type and rounding mode.FloatingPointFormulamakeNumber(String n, FormulaType.FloatingPointType type)Creates a floating point formula representing the given string value with the specified type.FloatingPointFormulamakeNumber(String n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)Creates a floating point formula representing the given string value with the specified type and rounding mode.FloatingPointFormulamakeNumber(BigDecimal n, FormulaType.FloatingPointType type)Creates a floating point formula representing the given BigDecimal value with the specified type.FloatingPointFormulamakeNumber(BigDecimal n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)Creates a floating point formula representing the given BigDecimal value with the specified type and rounding mode.FloatingPointFormulamakeNumber(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type)Creates a floating point formula from the given exponent, mantissa, and sign with the specified type.FloatingPointFormulamakeNumber(Rational n, FormulaType.FloatingPointType type)Creates a floating point formula representing the given Rational value with the specified type.FloatingPointFormulamakeNumber(Rational n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)Creates a floating point formula representing the given Rational value with the specified type and rounding mode.FloatingPointFormulamakePlusInfinity(FormulaType.FloatingPointType type)FloatingPointFormulamakeVariable(String pVar, FormulaType.FloatingPointType type)Creates a variable with exactly the given name.FloatingPointFormulamax(FloatingPointFormula number1, FloatingPointFormula number2)Returns the maximum value of the two given floating-point numbers.FloatingPointFormulamin(FloatingPointFormula number1, FloatingPointFormula number2)Returns the minimum value of the two given floating-point numbers.FloatingPointFormulamultiply(FloatingPointFormula number1, FloatingPointFormula number2)FloatingPointFormulamultiply(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)FloatingPointFormulanegate(FloatingPointFormula number)FloatingPointFormularemainder(FloatingPointFormula dividend, FloatingPointFormula divisor)remainder: x - y * n, where n in Z is nearest to x/y.FloatingPointFormularound(FloatingPointFormula formula, FloatingPointRoundingMode roundingMode)FloatingPointFormulasqrt(FloatingPointFormula number)FloatingPointFormulasqrt(FloatingPointFormula number, FloatingPointRoundingMode roundingMode)FloatingPointFormulasubtract(FloatingPointFormula number1, FloatingPointFormula number2)FloatingPointFormulasubtract(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)BitvectorFormulatoIeeeBitvector(FloatingPointFormula number)Create a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format.AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormulatoIeeeBitvector(FloatingPointFormula number, String bitvectorConstantName)Create a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format.AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormulatoIeeeBitvector(FloatingPointFormula number, String bitvectorConstantName, Map<FloatingPointFormula,BitvectorFormula> specialFPConstantHandling)Create a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sosy_lab.java_smt.api.FloatingPointFormulaManager
castTo, castTo, makeNumber, makeNumber
-
-
-
-
Method Detail
-
makeNumber
public FloatingPointFormula makeNumber(double n, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given double value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(double n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given double value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(BigDecimal n, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given BigDecimal value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(BigDecimal n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given BigDecimal value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(String n, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given string value with the specified type.The string can be any valid floating-point number, e.g., "1.0", "1.0e-3", but also special values like "NaN", "Infinity", or "-0.0", etc. A leading "+" sign or "-" sign is allowed.
- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(String n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given string value with the specified type and rounding mode.The string can be any valid floating-point number, e.g., "1.0", "1.0e-3", but also special values like "NaN", "Infinity", or "-0.0", etc. A leading "+" sign or "-" sign is allowed.
- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(Rational n, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given Rational value with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(Rational n, FormulaType.FloatingPointType type, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula representing the given Rational value with the specified type and rounding mode.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager
-
makeNumber
public FloatingPointFormula makeNumber(BigInteger exponent, BigInteger mantissa, FloatingPointNumber.Sign sign, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a floating point formula from the given exponent, mantissa, and sign with the specified type.- Specified by:
makeNumberin interfaceFloatingPointFormulaManager- Parameters:
exponent- the exponent part of the floating point numbermantissa- the mantissa part of the floating point numbersign- the sign of the floating point number
-
makeVariable
public FloatingPointFormula makeVariable(String pVar, FormulaType.FloatingPointType type)
Description copied from interface:FloatingPointFormulaManagerCreates a variable with exactly the given name.Please make sure that the given name is valid in SMT-LIB2. Take a look at
FormulaManager.isValidName(java.lang.String)for further information.This method does not quote or unquote the given name, but uses the plain name "AS IS".
Formula.toString()can return a different String than the given one.- Specified by:
makeVariablein interfaceFloatingPointFormulaManager
-
makePlusInfinity
public FloatingPointFormula makePlusInfinity(FormulaType.FloatingPointType type)
- Specified by:
makePlusInfinityin interfaceFloatingPointFormulaManager
-
makeMinusInfinity
public FloatingPointFormula makeMinusInfinity(FormulaType.FloatingPointType type)
- Specified by:
makeMinusInfinityin interfaceFloatingPointFormulaManager
-
makeNaN
public FloatingPointFormula makeNaN(FormulaType.FloatingPointType type)
- Specified by:
makeNaNin interfaceFloatingPointFormulaManager
-
castTo
public <T extends Formula> T castTo(FloatingPointFormula source, boolean signed, FormulaType<T> targetType)
Description copied from interface:FloatingPointFormulaManagerBuild a formula of compatible type from aFloatingPointFormula. This method uses the default rounding mode.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castToin interfaceFloatingPointFormulaManager- Parameters:
source- the source formula of floating-point typesigned- if aBitvectorFormulais given as target, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formula
-
castTo
public <T extends Formula> T castTo(FloatingPointFormula source, boolean signed, FormulaType<T> targetType, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerBuild a formula of compatible type from aFloatingPointFormula.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castToin interfaceFloatingPointFormulaManager- Parameters:
source- the source formula of floating-point typesigned- if aBitvectorFormulais given as target, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formulapFloatingPointRoundingMode- if rounding is needed, we apply the rounding mode.
-
castFrom
public FloatingPointFormula castFrom(Formula source, boolean signed, FormulaType.FloatingPointType targetType)
Description copied from interface:FloatingPointFormulaManagerBuild aFloatingPointFormulafrom another compatible formula. This method uses the default rounding mode.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castFromin interfaceFloatingPointFormulaManager- Parameters:
source- the source formula of compatible typesigned- if aBitvectorFormulais given as source, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formula
-
castFrom
public FloatingPointFormula castFrom(Formula source, boolean signed, FormulaType.FloatingPointType targetType, FloatingPointRoundingMode pFloatingPointRoundingMode)
Description copied from interface:FloatingPointFormulaManagerBuild aFloatingPointFormulafrom another compatible formula.Compatible formula types are all numeral types and (signed/unsigned) bitvector types. It is also possible to cast a floating-point number into another floating-point type. We do not support casting from boolean or array types. We try to keep an exact representation, however fall back to rounding if needed.
- Specified by:
castFromin interfaceFloatingPointFormulaManager- Parameters:
source- the source formula of compatible typesigned- if aBitvectorFormulais given as source, we additionally use this flag. Otherwise, we ignore it.targetType- the type of the resulting formulapFloatingPointRoundingMode- if rounding is needed, we apply the rounding mode.
-
fromIeeeBitvector
public FloatingPointFormula fromIeeeBitvector(BitvectorFormula number, FormulaType.FloatingPointType pTargetType)
Description copied from interface:FloatingPointFormulaManagerCreate a formula that interprets the given bitvector as a floating-point value in the IEEE format, according to the given type. The sum of the sizes of exponent and mantissa of the target type plus 1 (for the sign bit) needs to be equal to the size of the bitvector.Note: This method will return a value that is (numerically) far away from the original value. This method is completely different from
FloatingPointFormulaManager.castFrom(org.sosy_lab.java_smt.api.Formula, boolean, org.sosy_lab.java_smt.api.FormulaType.FloatingPointType), which will produce a floating-point value close to the numeral value.- Specified by:
fromIeeeBitvectorin interfaceFloatingPointFormulaManager
-
toIeeeBitvector
public BitvectorFormula toIeeeBitvector(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerCreate a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format. The size of the resulting bitvector is the sum of the sizes of the exponent and mantissa of the input formula plus 1 (for the sign bit).- Specified by:
toIeeeBitvectorin interfaceFloatingPointFormulaManager
-
toIeeeBitvector
public AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormula toIeeeBitvector(FloatingPointFormula number, String bitvectorConstantName)
Description copied from interface:FloatingPointFormulaManagerCreate a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format. The size of the resulting bitvector is the sum of the sizes of the exponent and mantissa of the input formula plus 1 (for the sign bit). This implementation can be used independently ofFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula), as it does not rely on an SMT solvers support forFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula). Behavior for special FP values (NaN, Inf, etc.) is not defined, and returned values are solver dependent. In case you want to define how to handle those values, please useFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula, String, Map). This method is based on a suggestion in the SMTLib2 standard (source) implementation:(declare-fun b () (_ BitVec m))
(assert (= ((_ to_fp eb sb) b) f))
Note: SMTLIB2 output of this method uses the SMTLIB2 keyword 'to_fp' as described above and no keyword variation for floating-point to bitvector conversion like 'fp.as_ieee_bv'.
- Specified by:
toIeeeBitvectorin interfaceFloatingPointFormulaManager- Parameters:
number- theFloatingPointFormulato be converted into an IEEE bitvector.bitvectorConstantName- the name of the returnedBitvectorFormula.- Returns:
AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormulaconsisting of the transformed input floating-point as aBitvectorFormulaand the additional constraint asBooleanFormula.
-
toIeeeBitvector
public AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormula toIeeeBitvector(FloatingPointFormula number, String bitvectorConstantName, Map<FloatingPointFormula,BitvectorFormula> specialFPConstantHandling)
Description copied from interface:FloatingPointFormulaManagerCreate a formula that produces a representation of the given floating-point value as a bitvector conforming to the IEEE 754-2008 format. The size of the resulting bitvector is the sum of the sizes of the exponent and mantissa of the input formula plus 1 (for the sign bit). This implementation can be used independently ofFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula), as it does not rely on an SMT solvers support forFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula). Behavior for special FP values (NaN, Inf, etc.) can be defined using the specialFPConstantHandling parameter. This method is based on a suggestion in the SMTLib2 standard (source) implementation:(declare-fun b () (_ BitVec m))
(assert (= ((_ to_fp eb sb) b) f))
Note: SMTLIB2 output of this method uses the SMTLIB2 keyword 'to_fp' as described above and no keyword variation for floating-point to bitvector conversion like 'fp.as_ieee_bv'.
- Specified by:
toIeeeBitvectorin interfaceFloatingPointFormulaManager- Parameters:
number- theFloatingPointFormulato be converted into an IEEE bitvector.bitvectorConstantName- the name of the returnedBitvectorFormula.specialFPConstantHandling- aMapdefining the returnedBitvectorFormulafor specialFloatingPointFormulaconstant numbers. You are only allowed to specify a mapping for special FP numbers with more than one well-defined bitvector representation, i.e. NaN and +/- Infinity. The width of the mapped bitvector values has to match the expected width of the bitvector return value. TheFormulaType.FloatingPointType, i.e. precision, of the key FP numbers has to match theFormulaType.FloatingPointTypeof the parameternumber. For an emptyMap, or missing mappings, this method behaves likeFloatingPointFormulaManager.toIeeeBitvector(FloatingPointFormula, String).- Returns:
AbstractFloatingPointFormulaManager.BitvectorFormulaAndBooleanFormulaconsisting of the transformed input floating-point as aBitvectorFormulaand the additional constraint asBooleanFormula.
-
round
public FloatingPointFormula round(FloatingPointFormula formula, FloatingPointRoundingMode roundingMode)
- Specified by:
roundin interfaceFloatingPointFormulaManager
-
negate
public FloatingPointFormula negate(FloatingPointFormula number)
- Specified by:
negatein interfaceFloatingPointFormulaManager
-
abs
public FloatingPointFormula abs(FloatingPointFormula number)
- Specified by:
absin interfaceFloatingPointFormulaManager
-
max
public FloatingPointFormula max(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns the maximum value of the two given floating-point numbers. If one of the numbers is NaN, the other number is returned.- Specified by:
maxin interfaceFloatingPointFormulaManager
-
min
public FloatingPointFormula min(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns the minimum value of the two given floating-point numbers. If one of the numbers is NaN, the other number is returned.- Specified by:
minin interfaceFloatingPointFormulaManager
-
sqrt
public FloatingPointFormula sqrt(FloatingPointFormula number)
- Specified by:
sqrtin interfaceFloatingPointFormulaManager
-
sqrt
public FloatingPointFormula sqrt(FloatingPointFormula number, FloatingPointRoundingMode roundingMode)
- Specified by:
sqrtin interfaceFloatingPointFormulaManager
-
add
public FloatingPointFormula add(FloatingPointFormula number1, FloatingPointFormula number2)
- Specified by:
addin interfaceFloatingPointFormulaManager
-
add
public FloatingPointFormula add(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)
- Specified by:
addin interfaceFloatingPointFormulaManager
-
subtract
public FloatingPointFormula subtract(FloatingPointFormula number1, FloatingPointFormula number2)
- Specified by:
subtractin interfaceFloatingPointFormulaManager
-
subtract
public FloatingPointFormula subtract(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)
- Specified by:
subtractin interfaceFloatingPointFormulaManager
-
divide
public FloatingPointFormula divide(FloatingPointFormula number1, FloatingPointFormula number2)
- Specified by:
dividein interfaceFloatingPointFormulaManager
-
divide
public FloatingPointFormula divide(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)
- Specified by:
dividein interfaceFloatingPointFormulaManager
-
multiply
public FloatingPointFormula multiply(FloatingPointFormula number1, FloatingPointFormula number2)
- Specified by:
multiplyin interfaceFloatingPointFormulaManager
-
multiply
public FloatingPointFormula multiply(FloatingPointFormula number1, FloatingPointFormula number2, FloatingPointRoundingMode pFloatingPointRoundingMode)
- Specified by:
multiplyin interfaceFloatingPointFormulaManager
-
remainder
public FloatingPointFormula remainder(FloatingPointFormula dividend, FloatingPointFormula divisor)
Description copied from interface:FloatingPointFormulaManagerremainder: x - y * n, where n in Z is nearest to x/y. The result can be negative even for two positive arguments, e.g. "rem(5, 4) == 1" and "rem(5, 6) == -1", as opposed to integer modulo operators.- Specified by:
remainderin interfaceFloatingPointFormulaManager
-
assignment
public BooleanFormula assignment(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerCreate a term for assigning one floating-point term to another. This means both terms are considered equal afterward, based on their bit pattern (i.e.,0.0 != -0 .0andNaN ==/!= NaN, depending on the bit pattern of each NaN). This method is the same as the methodequalfor other theories.- Specified by:
assignmentin interfaceFloatingPointFormulaManager
-
equalWithFPSemantics
public BooleanFormula equalWithFPSemantics(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerCreate a term for comparing the equality of two floating-point terms, according to standard floating-point semantics (i.e.,NaN != NaNand0.0 == -0.0). Be careful to not use this method when you really needFloatingPointFormulaManager.assignment(FloatingPointFormula, FloatingPointFormula).- Specified by:
equalWithFPSemanticsin interfaceFloatingPointFormulaManager
-
greaterThan
public BooleanFormula greaterThan(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is greater than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
greaterThanin interfaceFloatingPointFormulaManager
-
greaterOrEquals
public BooleanFormula greaterOrEquals(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is greater or equal than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
greaterOrEqualsin interfaceFloatingPointFormulaManager
-
lessThan
public BooleanFormula lessThan(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is less than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
lessThanin interfaceFloatingPointFormulaManager
-
lessOrEquals
public BooleanFormula lessOrEquals(FloatingPointFormula number1, FloatingPointFormula number2)
Description copied from interface:FloatingPointFormulaManagerReturns whether an FP number is less or equal than another FP number. If one of the numbers is NaN, the result is always false.- Specified by:
lessOrEqualsin interfaceFloatingPointFormulaManager
-
isNaN
public BooleanFormula isNaN(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerCheck whether a floating-point number is NaN.The bit patterns for NaN in SMTLIB are identical to IEEE 754:
- sign=? (irrelevant for NaN)
- exponent=11...11 (all bits are 1)
- mantissa!=00...00 (mantissa is not all 0)
- Specified by:
isNaNin interfaceFloatingPointFormulaManager
-
isInfinity
public BooleanFormula isInfinity(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is positive or negative infinity.The bit patterns for infinity in SMTLIB are identical to IEEE 754:
- sign=? (0 for +Inf, 1 for -Inf)
- exponent=11...11 (all bits are 1)
- mantissa=00...00 (all bits are 0)
- Specified by:
isInfinityin interfaceFloatingPointFormulaManager
-
isZero
public BooleanFormula isZero(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is positive or negative zero.The bit patterns for zero in SMTLIB are identical to IEEE 754:
- sign=? (0 for +0, 1 for -0)
- exponent=00...00 (all bits are 0)
- mantissa=00...00 (all bits are 0)
- Specified by:
isZeroin interfaceFloatingPointFormulaManager
-
isNormal
public BooleanFormula isNormal(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is normal FP number.The bit patterns for normal FP numbers in SMTLIB are identical to IEEE 754:
- sign=? (0 for positive numbers, 1 for negative numbers)
- exponent!=00...00 and exponent!=11...11 (exponent is not all 0 or all 1)
- mantissa=? (mantissa is irrelevant)
- Specified by:
isNormalin interfaceFloatingPointFormulaManager
-
isSubnormal
public BooleanFormula isSubnormal(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is subnormal FP number.The bit patterns for subnormal FP numbers in SMTLIB are identical to IEEE 754:
- sign=? (0 for positive numbers, 1 for negative numbers)
- exponent=00...00 (exponent is all 0)
- mantissa!=00...00 (mantissa is not all 0)
- Specified by:
isSubnormalin interfaceFloatingPointFormulaManager
-
isNegative
public BooleanFormula isNegative(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerChecks whether a formula is negative, including -0.0.The bit patterns for negative FP numbers in SMTLIB are identical to IEEE 754:
- sign=1 (1 for negative numbers)
- number is not NaN, i.e., exponent=11...11 implies mantissa=00...00
- Specified by:
isNegativein interfaceFloatingPointFormulaManager
-
getMantissaSizeWithSignBit
public int getMantissaSizeWithSignBit(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerReturns the size of the mantissa (also called a coefficient or significant), including the sign bit, for the givenFloatingPointFormula.- Specified by:
getMantissaSizeWithSignBitin interfaceFloatingPointFormulaManager
-
getExponentSize
public int getExponentSize(FloatingPointFormula number)
Description copied from interface:FloatingPointFormulaManagerReturns the size of the exponent for the givenFloatingPointFormula.- Specified by:
getExponentSizein interfaceFloatingPointFormulaManager
-
-