Re: CLP(FD): what is necessary?



On Thu, 13 Mar 2008 13:50:47 +0000, Ulrich Neumerkel wrote:

The achievements of Markus Triska's clpfd implementation in SWI
so far have been to provide the basic constraints in a clean
and robust fashion with highlights as:

* Correctness: Similar to SICStus Prolog open domains are possible
thus extending CLP(FD) towards CLP(Z).

While I appreciate what you meant to write, I disagree with naming
this "correctness" - didn't I send a bug report to Markus recently
that pointed out something not quite correct in the SWI clpfd package,
and that was not caught by any of your testing ? It was unrelated to
the FD versus Z issue.
Please do not name something correct if it isn't [no blame is intended
towards Markus].


Note that other systems implicitly constrain all variables to
a small finite range. Failure in such systems means: No solution
within those limits. If a solution exists outside, you will not
find it.

That's fine as long as the user is aware of it, and as long as the system
makes an effort making her aware of it. Nobody expects 1 << 34 to give the
correct answer in C, and everybody knows that to get the correct answer,
there is price to pay, and a particular library to use.


* Favourable termination properties: All predicates and
constraints in SWI's library(clpfd) terminate.

I would only name this favourable, if you have a proof that some
predicates or constraints in X's library(clpfd) don't - for any other X.


Just defer is/2 and its archaic company to a more advanced level.

is/2 is certainly archaic, but also very useful. For me, the only archaic
thing about is/2 that really should be dumped, is the evaluation of source
level variables. Having eager arithmetic in a language is excellent.

Cheers

Bart Demoen
.