Using cKanren in Racket
cKanren is a wonderful system created by Clair Alvis and the group at IU for relational programming. The definitive work about cKanren is this paper. cKanren builds on another wonderful system called miniKanren created by William Byrd and Prof. Dan Friedman of IU.
Off late, I started reading “The Little Schemer” series and started reading the awesome ”The Reasoned Schemer”, also by the same team that wrote miniKanren. cKanren is written in R6RS scheme and is developed on Chez, evidently. Since I wanted to use Racket and DrRacket environment, I started looking at changes to be done to make it run on Racket. What follows below are the instructions to setup DrRacket for cKanren programming.
-
Download my fork of cKanren
$ git clone git://github.com/vu3rdd/cKanren.git
-
Switch to the ‘racketification branch’
$ cd cKanren
$ git checkout -b racketification racketification
-
Now, make cKanren module visible in the Racket ‘collections’.
$ raco link .
-
Now, fireup DrRacket. In the definitions window, use the following as the language.
#lang cKanren
-
Hack away in cKanren!
Syndicated 2012-01-09 08:00:00 from Ramakrishnan Muthukrishnan