[plt-scheme] miniKanren: translation from Prolog
Hi,
On Thu, 27 May 2010 20:05:24 -0400
Lindsey Kuper <lkuper at cs.indiana.edu> wrote:
> 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.)
As a matter of "getting things done" I switched to Schelog for that
task. I needed to do some porting to get the 2001-code running but I
was able to translate the Prolog solution without problems.
The next major PLT release (PLT Racket 5) will include Racketlog, an
improved version of Schelog.
> > 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.
If I ever have time to come back again to miniKanren, I'll be sure to
try it again :)
regards,
Marek