Question

I want to use Clojure's Core.logic. However, I want to also understand how it works. Is there a concise explanation of it somewhere? (Like implementing a metacircular evaluator?)

Thanks!

Was it helpful?

Solution

core.logic is an implementation of miniKanren - originally written and designed in Scheme by Dan Friedman, William Byrd, Oleg Kiselyov and others. It is an attempt to embed Prolog-style relational programming within Lisp.

If you want to understand how it works you'll need to read the first three chapters of William Byrd's dissertation: https://scholarworks.iu.edu/dspace/bitstream/handle/2022/8777/Byrd_indiana_0093A_10344.pdf?sequence=1

The Reasoned Schemer also covers the unifier in detail. However the much more subtle goal portion of miniKanren isn't given a comprehensive treatment - you'll need to look at Byrd's dissertation for that.

Even then, as with meta-circular interpreters - many insights cannot be gained without trying to implement the system yourself in a variety of programming languages.

OTHER TIPS

You can also see David's talk on core.logic from the Strange Loop 2012.

And for very light introduction to the topic see also: sokuza-kanren

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top