Interface NumeralFormulaManager<ParamFormulaType extends NumeralFormula,ResultFormulaType extends NumeralFormula>
- Type Parameters:
ParamFormulaType- formulaType of the parametersResultFormulaType- formulaType of arithmetic results
- All Known Subinterfaces:
IntegerFormulaManager,RationalFormulaManager
- All Known Implementing Classes:
AbstractNumeralFormulaManager,DebuggingIntegerFormulaManager,DebuggingNumeralFormulaManager,DebuggingRationalFormulaManager
-
Method Summary
Modifier and TypeMethodDescriptionadd(ParamFormulaType number1, ParamFormulaType number2) distinct(List<ParamFormulaType> pNumbers) All given numbers are pairwise unequal.divide(ParamFormulaType numerator, ParamFormulaType denominator) Create a formula representing the division of two operands according to Boute's Euclidean definition.equal(ParamFormulaType number1, ParamFormulaType number2) floor(ParamFormulaType formula) Theflooroperation returns the nearest integer formula that is less or equal to the given argument formula.greaterOrEquals(ParamFormulaType number1, ParamFormulaType number2) greaterThan(ParamFormulaType number1, ParamFormulaType number2) lessOrEquals(ParamFormulaType number1, ParamFormulaType number2) lessThan(ParamFormulaType number1, ParamFormulaType number2) makeNumber(double number) Create a numeric literal with a given value.makeNumber(long number) makeNumber(String pI) makeNumber(BigDecimal number) Create a numeric literal with a given value.makeNumber(BigInteger number) makeNumber(Rational pRational) makeVariable(String pVar) Creates a variable with exactly the given name.multiply(ParamFormulaType number1, ParamFormulaType number2) negate(ParamFormulaType number) subtract(ParamFormulaType number1, ParamFormulaType number2) sum(List<ParamFormulaType> operands)
-
Method Details
-
makeNumber
-
makeNumber
-
makeNumber
Create 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. -
makeNumber
Create 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. -
makeNumber
-
makeNumber
-
makeVariable
Creates 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. -
getFormulaType
FormulaType<ResultFormulaType> getFormulaType() -
negate
-
add
-
sum
-
subtract
-
divide
Create a formula representing the division of two operands according to Boute's Euclidean definition.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 for the division operator in Ints or Reals theory).
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.
-
multiply
-
equal
-
distinct
All given numbers are pairwise unequal. -
greaterThan
-
greaterOrEquals
-
lessThan
-
lessOrEquals
-
floor
Theflooroperation 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.
-