Next: CLPFD Interface, Previous: CLPFD Annotations, Up: lib-clpfd [Contents][Index]
Following are some general statements about the constraints and predicates of this library module.
In case of variable aliasing, i.e., if a variable occurs more than once in a constraint that is being posted, or if two variables of a constraint are unified after posting, then any guarantee to maintain a particular level of consistency no longer holds, and idempotency is almost always lost.
All constraints and propagators 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@ri.se.
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@ri.se.
If a term containing domain variables is written, copied, asserted,
gathered as a solution to findall/3
and friends, or raised as
an exception, then those domain variables will be replaced by brand
new variables in the copy. To retain the domains and any attached
constraints, you can use copy_term/3
with
clpfd:full_answer
asserted (see ref-lte-cpt and Answer Constraints). API change wrt. release 3.
The support for real variables is somewhat limited in this release and is likely to be extended in future releases.