CHR constraint store
Jesus Nuñez <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CA+VVbdH4-GTHWcOas-iyrW4ovJHMAb4mxrii-v7uYPi5UPkNVw@mail.gmail.com> |
I ran into an issue regarding CHR. I think I missundersood its use and I
was trying the following lines:
entity( A, T1) \ entity( A, T2) <=> T1>=T2 | true.
test(3).
test(T) :-
entity(a, T),
T1 is T+1, test(T1).
And the query, ?- test(0), gives as an answer,
entity(a, 0),
entity(a, 1).
However, the query ?- entity(a,0), entity(a,1) retrieves,
entity(a,1)
as I expected. My question is then, is it any way to overcome this issue
or I am simply using CHR wrongly?.
Cheers,
Jesus
-------------- next part --------------
HTML attachment scrubbed and removed