Hi!

I've been trying to parameterize Datalog queries and have stumbled into a 
problem with the tables in queries. As an example (from Datalog documentation):

#lang racket
(require datalog)
(define family (make-theory))
(datalog family
         (! (parent joseph2 joseph1))
         (! (parent joseph2 lucy))
         (! (parent joseph3 joseph2)))

-now if I run the query as shown in the documentation

        (let ([x 'joseph2])
          (datalog family
              (? (parent x X))))

the answer is as expected:

        '(#hasheq((X . joseph1)) #hasheq((X . lucy)))

However, if I parameterize the table:

        (let ([x 'parent])
          (datalog family
              (? (x 'joseph2 X))))

the query fails:

        '()

Are there any workarounds for this? I am grateful for any suggestions...

Best regards,

Mikko Tiihonen




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

Reply via email to