http://www.infoq.com/presentations/miniKanren
miniKanren is an embedding of logic programming in Scheme. In this interactive presentation, William E. Byrd and Dan Friedman introduce miniKanren, from the basic building blocks to the methodology for translating regular programs to relational program, which can run "backwards". Their examples are fun and convincing: a relational environment-passing interpreter that can trivially generate quines, a relational type checker that doubles as a generator of well-typed terms and a type inferencer.