SWI Prolog forgets identity of query variables in CHR ???

Henning Christiansen <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Hi SWIPL team,

I observed strange problem that the identity of variables in CHR queries are sometimes forgotten when the resylt is printed out.
I could isolate the problem into a one rule program.
For the two test queries, no rule is applied;
the first one behaves as you would expect, but in the second one, my query variables gets renamed and thus the semantics of the answer is wrong.

If I have a program with no rules, no misbehaviour is observed

(running on Mac OS 10.9.1)

best wishes

     Henning


The program:

:- use_module(library(chr)).
:- chr_constraint c/2, d/2.
c(X,cow) <=> d(X,pig).

Queries:
$ swipl
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.6.1-DIRTY)
....

?- [program].
%  library(chr) compiled into chr 0.51 sec, 6,504 clauses
% program compiled 0.51 sec, 6,551 clauses
true.

?- c(X,duck).
c(X,duck)
true .
c(X,duck)

?- c(X,Y).
c(_G30729,_G30730)
true .
c(_G30729,_G30730)





Henning Christiansen
Professor of  Computer Science, PhD
Leader of Research group PLIS: Programming, Logic and Intelligent Systems
Department of Communication, Business and Information Technologies
Roskilde University
P.O.Box 260, DK-4000 Roskilde, DENMARK
http://www.ruc.dk/~henning

-------------- next part --------------
HTML attachment scrubbed and removed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.