clojure/core.logic — pull request #13 by jamii (2012-12-18 00:01:53+00:00)
Title: Flexible search

Replaces the core stream data-structure with a lazy tree of continuations (ITake becomes ISearchTree).

Adds optional fair conjunction (via bind-fair and all-fair).

Adds new search algorithms: bfs-lazy (the original algorithm), bfs-strict, dfs-lazy, dfs-strict, dfs-par (using fork-join).

Unfortunately, introduces performance regressions for lazy search. For example, for bench/zebrao I see:

* original branch w/ ```(run* ...)```: ~30ms
* original branch w/ ```(run 1 ...)```: ~8.5ms
* this branch w/ ```(run* ...)```: ~25ms
* this branch w/ ```(run 1 ...)```: ~27ms

I suspect that this is simply a missing thunk somewhere but I've run out of time to work on this. Given that laziness is now largely controlled by the search algorithm

As a consolation prize:

* this branch w/ ```(binding [*search* dfs-par] (run* ...))```: ~18ms