[plt-scheme] miniKanren: translation from Prolog

From: Lindsey Kuper (lkuper at cs.indiana.edu)
Date: Thu May 27 20:05:24 EDT 2010

On Thu, May 27, 2010 at 12:06 PM, Marek Kubica <marek at xivilization.net> wrote:
> Ok, I slowly start to see the pattern how to translate Prolog code into
> miniKanren.

It's tricky, because miniKanren doesn't have Prolog's pattern-matching
ability built in.  There is, however, a pattern-matching macro for
miniKanren, which you can find at the URL I gave earlier.  (Not much
in the way of up-to-date documentation, unfortunately.  I should do
something about that.)

> Hmm, maybe I should come up with a version of permute that does not
> need do-insert... Tricky, since I am quite new to logic programming.

Yes, I think that do-insert might not be the most natural way to write
it in miniKanren.

Lindsey


Posted on the users mailing list.