1. Concerning the different behiavior of CHR compared to the documentation, I have a version 5.6.3X on Fedora, and it has the right behavior.
I also found this in the sources in pl/packages/chr/ChangeLog :
[Feb 27 2008]
* ENHANCED: CHR performance of find_chr_constraint when called with nonvar argument
This change might be related.
2. Concerning the way to recover the content of the constraint store back into the Prolog, I tried several variants of find_chr_constraint, none of which work:
?- find_chr_constraint(Constraint ).
fail.
?- ANS = ( leq(A,B), leq(B,C) ).
?- find_chr_constraint(leq).
?- find_chr_constraint( leq:leq).
?- find_chr_constraint( leq:leq(_,_) ).
--
Jean-Marc Vanel
http://jmvanel.free.fr/