Class DebuggingNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
- java.lang.Object
-
- org.sosy_lab.java_smt.delegate.debugging.DebuggingNumeralFormulaManager<ParamFormulaType,ResultFormulaType>
-
- All Implemented Interfaces:
NumeralFormulaManager<ParamFormulaType,ResultFormulaType>
- Direct Known Subclasses:
DebuggingIntegerFormulaManager,DebuggingRationalFormulaManager
public class DebuggingNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula> extends Object implements NumeralFormulaManager<ParamFormulaType,ResultFormulaType>
-
-
Method Summary
-
-
-
Method Detail
-
makeNumber
public ResultFormulaType makeNumber(long number)
- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeNumber
public ResultFormulaType makeNumber(BigInteger number)
- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeNumber
public ResultFormulaType makeNumber(double number)
Description copied from interface:NumeralFormulaManagerCreate a numeric literal with a given value. Note: if the theory represented by this instance cannot handle rational numbers, the value may get rounded or otherwise represented imprecisely.- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeNumber
public ResultFormulaType makeNumber(BigDecimal number)
Description copied from interface:NumeralFormulaManagerCreate a numeric literal with a given value. Note: if the theory represented by this instance cannot handle rational numbers, the value may get rounded or otherwise represented imprecisely.- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeNumber
public ResultFormulaType makeNumber(String pI)
- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeNumber
public ResultFormulaType makeNumber(Rational pRational)
- Specified by:
makeNumberin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
makeVariable
public ResultFormulaType makeVariable(String pVar)
Description copied from interface:NumeralFormulaManagerCreates 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 interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
getFormulaType
public FormulaType<ResultFormulaType> getFormulaType()
- Specified by:
getFormulaTypein interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
negate
public ResultFormulaType negate(ParamFormulaType number)
- Specified by:
negatein interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
add
public ResultFormulaType add(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
addin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
sum
public ResultFormulaType sum(List<ParamFormulaType> operands)
- Specified by:
sumin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
subtract
public ResultFormulaType subtract(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
subtractin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
divide
public ResultFormulaType divide(ParamFormulaType numerator, ParamFormulaType denominator)
Description copied from interface:NumeralFormulaManagerCreate a formula representing the division of two operands according to Boute's Euclidean definition (DOI: 10.1145/128861.128862).If the denominator evaluates to zero (division-by-zero), either directly as value or indirectly via an additional constraint, then the solver is allowed to choose an arbitrary value for the result of the division (cf. SMTLib standard version 2.6 for the division operator in Int or Real theory). The details of this are implementation specific and may change solver by solver.
Note: Some solvers, e.g., Yices2, abort with an exception when exploring a division-by-zero during the SAT-check. This is not compliant to the SMTLIB standard, but sadly happens.
- Specified by:
dividein interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
multiply
public ResultFormulaType multiply(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
multiplyin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
equal
public BooleanFormula equal(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
equalin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
distinct
public BooleanFormula distinct(List<ParamFormulaType> pNumbers)
Description copied from interface:NumeralFormulaManagerAll given numbers are pairwise unequal.- Specified by:
distinctin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
greaterThan
public BooleanFormula greaterThan(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
greaterThanin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
greaterOrEquals
public BooleanFormula greaterOrEquals(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
greaterOrEqualsin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
lessThan
public BooleanFormula lessThan(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
lessThanin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
lessOrEquals
public BooleanFormula lessOrEquals(ParamFormulaType number1, ParamFormulaType number2)
- Specified by:
lessOrEqualsin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
floor
public NumeralFormula.IntegerFormula floor(ParamFormulaType formula)
Description copied from interface:NumeralFormulaManagerTheflooroperation returns the nearest integer formula that is less or equal to the given argument formula.For rational formulas, SMTlib2 denotes this operation as
to_int.- Specified by:
floorin interfaceNumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
-
-