[racket] [bug?] Racklog cut differs from Prolog cut
Racket version:
5.2.
Output of 'uname -a':
Linux kire 2.6.32-41-generic #91-Ubuntu SMP Wed Jun 13 11:43:55 UTC 2012
x86_64 GNU/Linux
Symptom:
In SWI Prolog (or any Prolog interpreter I think), querying a(X) gives
X=1 and X=2. Racklog only gives x=1.
How to reproduce:
Download 'a.pl' (attached).
Run 'prolog -f a.pl' (if using SWI Prolog).
Enter 'a(X).'.
Press ';' (semicolon) key until it prints false.
Download 'a.rkt' (attached).
Run 'racket a.rkt'.
Expectation:
Racklog gives x=1 and x=2.
Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.pl
Type: application/x-perl
Size: 51 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20120812/5830e0b7/attachment.pl>
-------------- next part --------------
#lang racket
(require racklog)
(define %a
(%rel (x)
((x) (%b x) !)
((x) (%c x))
))
(define %b
(%rel ()
((1) !)
((2))
))
(define %c
(%rel ()
((2))
))
(%find-all (x) (%a x))