Playing with meta-interpreters in miniKanren. Inspired by Nada Amin's miniKanren confo talk at Clojure/West:
https://github.com/namin/minikanren-confo
The files:
-
meta.scmThe meta-interpreters, translated directly from Nada'score.logiccode. -
boolean.scmInterpreter (and tests) for a trivial language of Boolean expressions, taken from Pierce's 'Types and Programming Languages'. -
regex-matching.scmInterpreter (and tests) for regular expression matching using parsing with derivatives, taken from https://github.com/webyrd/relational-parsing-with-derivatives/blob/master/mK-empty-set-as-failure/mk-rd.scm. -
quines.scmInterpreter (and tests) for a relational interpreter capable of generating Scheme quines. Code taken from https://github.com/webyrd/2012-scheme-workshop-quines-paper-code -
mk.scmVersion of miniKanren from https://github.com/webyrd/2012-scheme-workshop-quines-paper-code -
testcheck.scmSimple test macro. -
test-all.scmLoad this to run all the tests.
Tested under Petite Chez Scheme 8.4. To run the tests, just load test-all.scm:
(load "test-all.scm")