Adding API for AtMostOneConstraint + bugfix for turning off the optimizations
[satune.git] / src / pycsolver.py
index 000ff18f63663264b44bf508637cc241cd83ac03..f08d164e5d5edbbf094793c20270ea4b2fb77c06 100644 (file)
@@ -65,6 +65,10 @@ def loadCSolver():
        csolverlb.getElementRange.restype = c_void_p
        csolverlb.getBooleanVar.argtypes = [c_void_p, c_uint]
        csolverlb.getBooleanVar.restype = c_void_p
+       csolverlb.getBooleanTrue.argtypes = [c_void_p]
+       csolverlb.getBooleanTrue.restype = c_void_p
+       csolverlb.getBooleanFalse.argtypes = [c_void_p]
+       csolverlb.getBooleanFalse.restype = c_void_p
        csolverlb.createFunctionOperator.argtypes = [c_void_p, c_uint, c_void_p, c_uint]
        csolverlb.createFunctionOperator.restype = c_void_p
        csolverlb.createPredicateOperator.argtypes = [c_void_p, c_uint]
@@ -87,6 +91,10 @@ def loadCSolver():
        csolverlb.applyPredicate.restype = c_void_p
        csolverlb.applyLogicalOperation.argtypes = [c_void_p, c_uint, c_void_p, c_uint]
        csolverlb.applyLogicalOperation.restype = c_void_p
+       csolverlb.applyExactlyOneConstraint.argtypes = [c_void_p, c_void_p, c_uint]
+       csolverlb.applyExactlyOneConstraint.restype = c_void_p
+       csolverlb.applyAtMostOneConstraint.argtypes = [c_void_p, c_void_p, c_uint]
+       csolverlb.applyAtMostOneConstraint.restype = c_void_p
        csolverlb.applyLogicalOperationTwo.argtypes = [c_void_p, c_uint, c_void_p, c_void_p]
        csolverlb.applyLogicalOperationTwo.restype = c_void_p
        csolverlb.applyLogicalOperationOne.argtypes = [c_void_p, c_uint, c_void_p]
@@ -99,16 +107,22 @@ def loadCSolver():
        csolverlb.orderConstraint.restype = c_void_p
        csolverlb.solve.argtypes = [c_void_p]
        csolverlb.solve.restype = c_int
+       csolverlb.solveIncremental.argtypes = [c_void_p]
+       csolverlb.solveIncremental.restype = c_int
         csolverlb.mustHaveValue.argtypes = [c_void_p, c_void_p]
        csolverlb.mustHaveValue.restype = c_void_p
        csolverlb.getElementValue.argtypes = [c_void_p, c_void_p]
-       csolverlb.getElementValue.restype = c_long
+       csolverlb.getElementValue.restype = c_void_p
+       csolverlb.freezeElement.argtypes = [c_void_p, c_void_p]
+       csolverlb.freezeElement.restype = c_long
        csolverlb.getBooleanValue.argtypes = [c_void_p, c_void_p]
        csolverlb.getBooleanValue.restype = c_int
        csolverlb.getOrderConstraintValue.argtypes = [c_void_p, c_void_p, c_long, c_long]
        csolverlb.getOrderConstraintValue.restype = c_int
        csolverlb.printConstraints.argtypes = [c_void_p]
        csolverlb.printConstraints.restype = None
+       csolverlb.turnoffOptimizations.argtypes = [c_void_p]
+       csolverlb.turnoffOptimizations.restype = None
         csolverlb.clone.argtypes = [c_void_p]
        csolverlb.clone.restype = c_void_p
        csolverlb.serialize.argtypes = [c_void_p]