Understanding Mini-Kanren's Execution Model
Asked Answered
B

2

15

Chapter 5 of SICP explains the scheme meta circular evaluator interns of a register machine.

Is there anything that provides a similar type of Mini-Kanren in terms of Scheme primitives?

I know that there is a Thesis written on Mini-Kanren (however, I only care about building a mental model; not all the gory optimizations details). I also know that there is the reasoned-schemer -- however, I'm not looking for a bunch of examples -- I just want to understand Mini-kanren in its' very very basic form, much like how one can understand scheme by understanding: eval, apply, if, set!, env

Thanks!

Blane answered 12/4, 2012 at 6:14 Comment(1)
here is an 18-lines Haskell implementation of The Reasoned Schemer (sans unification and logical variables).Nolin
N
12

I think reading The Reasoned Schemer is actually the right way to learn the basics. You could also try watching Dan Friedman and William Byrd's miniKanren talk from Clojure Conj.

Since miniKanren only has seven forms total, understanding the basic forms is really just understanding the whole thing. The implementation is only about a page of macros, so you could try to understand that. You could also try reading the introductory parts of William Byrd's PhD thesis.

Natividad answered 12/4, 2012 at 14:34 Comment(2)
The link to the talk is down, unfortunately.Keto
Seems so. Links to other miniKanren talks are available here: minikanren.orgNatividad
A
3

In the book The Reasoned Schemer there's an implementation of a very simple logic system on top of Scheme. It's self-contained, the only thing needed for understanding it is the book itself, which - in the style of the other books in the series, is extremely easy to follow.

Apospory answered 12/4, 2012 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.