Class DebuggingIntegerFormulaManager
java.lang.Object
org.sosy_lab.java_smt.delegate.debugging.DebuggingNumeralFormulaManager<NumeralFormula.IntegerFormula,NumeralFormula.IntegerFormula>
org.sosy_lab.java_smt.delegate.debugging.DebuggingIntegerFormulaManager
- All Implemented Interfaces:
IntegerFormulaManager,NumeralFormulaManager<NumeralFormula.IntegerFormula,NumeralFormula.IntegerFormula>
public class DebuggingIntegerFormulaManager
extends DebuggingNumeralFormulaManager<NumeralFormula.IntegerFormula,NumeralFormula.IntegerFormula>
implements IntegerFormulaManager
-
Constructor Summary
ConstructorsConstructorDescriptionDebuggingIntegerFormulaManager(IntegerFormulaManager pDelegate, org.sosy_lab.java_smt.delegate.debugging.DebuggingAssertions pDebugging) -
Method Summary
Modifier and TypeMethodDescriptionmodularCongruence(NumeralFormula.IntegerFormula number1, NumeralFormula.IntegerFormula number2, long n) Create a term representing the constraintnumber1 == number2 (mod n).modularCongruence(NumeralFormula.IntegerFormula number1, NumeralFormula.IntegerFormula number2, BigInteger n) Create a term representing the constraintnumber1 == number2 (mod n).modulo(NumeralFormula.IntegerFormula numerator, NumeralFormula.IntegerFormula denominator) Create a formula representing the modulo of two operands according to Boute's Euclidean definition.Methods inherited from class org.sosy_lab.java_smt.delegate.debugging.DebuggingNumeralFormulaManager
add, distinct, divide, equal, floor, getFormulaType, greaterOrEquals, greaterThan, lessOrEquals, lessThan, makeNumber, makeNumber, makeNumber, makeNumber, makeNumber, makeNumber, makeVariable, multiply, negate, subtract, sumMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sosy_lab.java_smt.api.IntegerFormulaManager
getFormulaTypeMethods inherited from interface org.sosy_lab.java_smt.api.NumeralFormulaManager
add, distinct, divide, equal, floor, greaterOrEquals, greaterThan, lessOrEquals, lessThan, makeNumber, makeNumber, makeNumber, makeNumber, makeNumber, makeNumber, makeVariable, multiply, negate, subtract, sum
-
Constructor Details
-
DebuggingIntegerFormulaManager
public DebuggingIntegerFormulaManager(IntegerFormulaManager pDelegate, org.sosy_lab.java_smt.delegate.debugging.DebuggingAssertions pDebugging)
-
-
Method Details
-
modularCongruence
public BooleanFormula modularCongruence(NumeralFormula.IntegerFormula number1, NumeralFormula.IntegerFormula number2, BigInteger n) Description copied from interface:IntegerFormulaManagerCreate a term representing the constraintnumber1 == number2 (mod n).- Specified by:
modularCongruencein interfaceIntegerFormulaManager
-
modularCongruence
public BooleanFormula modularCongruence(NumeralFormula.IntegerFormula number1, NumeralFormula.IntegerFormula number2, long n) Description copied from interface:IntegerFormulaManagerCreate a term representing the constraintnumber1 == number2 (mod n).- Specified by:
modularCongruencein interfaceIntegerFormulaManager
-
modulo
public NumeralFormula.IntegerFormula modulo(NumeralFormula.IntegerFormula numerator, NumeralFormula.IntegerFormula denominator) Description copied from interface:IntegerFormulaManagerCreate a formula representing the modulo of two operands according to Boute's Euclidean definition. The quotient (div numerator denominator) of the internal modulo calculation is floored for positive denominators and rounded up for negative denominators.If the denominator evaluates to zero (modulo-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 modulo operation (cf. SMTLIB standard for the division operator in Ints or Reals theory).
Examples:
- 10 % 5 == 0
- 10 % 3 == 1
- 10 % (-3) == 1
- -10 % 5 == 0
- -10 % 3 == 2
- -10 % (-3) == 2
Note: Some solvers, e.g., Yices2, abort with an exception when exploring a modulo-by-zero during the SAT-check. This is not compliant to the SMTLIB standard, but sadly happens.
- Specified by:
moduloin interfaceIntegerFormulaManager
-