Next: CLPFD Interface, Previous: CLPFD Intro, Up: lib-clpfd [Contents][Index]

Following are some general statements about the constraints and libraries of this library module.

**Domain Variables**Only small integers (see Glossary) and domain variables are allowed as arguments to finite domain constraints. Whenever a domain variable is required in the argument of a constraint, a small integer can be given instead. The conversion from unbound variable to domain variable is automatic.

**Aliasing**In case of variable aliasing, i.e. if a variable occurs more than once in a global constraint that is being posted, or due to a subsequent variable-variable unification, then any guarantee to maintain a particular level of consistency no longer holds, and idempotency is almost always lost.

**Termination**Of course, all constraints and predicates terminate. However, due to the combinatorial nature of constraint solving, and to the fact that constraint solving is based on filtering domains, which can be huge, pathological cases where termination takes extremely long time are easily constructed. After about 15,000 years on a 64-bit machine, the following query terminates with a representation error, when the lower bound of X exceeds the small integer range:

| ?-

`X #> abs(X).`[... ... ...] ! Representation error in user:'t=<u+c'/3 ! CLPFD integer overflow ! goal: 't=<u+c'(_245,_247,-1)Anyway, if you find non-pathological cases that take longer than reasonable time to terminate, then please write to sicstus-support@sics.se.

**Error Checking**Contrary to most library modules, CLPFD constraints and predicates check their arguments to almost the same extent as built-in predicates. If you find a case where reasonable error checking is missing, then please write to sicstus-support@sics.se.

Send feedback on this subject.