This is translation to clojure core.logic for scheme relational interpreter in miniKanren. Using @webyrd quines repo as source. Introduction is in the video.
- warmup.clj is to get feel of miniKanren/core.logic
- numbers.clj — translated numbers.scm
- interp.clj — Non-relational λ-calculus interpreter from quines.pdf (chapter 3).
- core.clj — Relational λ-calculus interpreter (q.scm and mk.scm)
core.logic repo (logic source file), @frenchy64 logic tutorial, a core.logic primer.
Quine generator is fully functional now. See test examples. Had problems with noo goal and still not sure if it's correct, but it generates quines, twines and thrines.
(use 'clojure.core.logic 'quines.core)
; generate 3 quines
(run 3 [q]
(eval-expo q '() q))
(pp)
; generate twine
(run 1 [x]
(fresh [p q]
(eval-expo p '() q)
(eval-expo q '() p)
(!= p q)
(== x [p q])))
(pp)