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.

Attachment: a.pl
Description: Perl program

#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))

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to