core.logic

Details

Type:
Enhancement

Status:
Closed

Priority:
Major

Resolution:
Completed

Affects Version/s:
None

Fix Version/s:
None

Component/s:
None

Labels:

None

Patch:

Code and Test

Description

This patch integrates pldb into core.logic, using the technique suggested by David Nolen of adding the pldb db to the substitution metadata. This worked really well. I've tested this integration against the threatgrid codebase, and with the exception of a couple edge cases where we were using facts-for directly for testing, it is a drop in replacements for pldb, requiring only the namespace change of pldb -> clojure.core.logic.pldb.

I moved logic-dbs into the clojure.core.logic so that they could automatically be included in the various run macros and the existing pldb/with-db bindings. I've also added run-db macros that allow explicit declarations where that is desirable. This seems reasonable to me, but I'm open to suggestions.

Norman Richards
added a comment - 06/Oct/13 2:27 PM This doesn't remove the old rel/fact code. I'm not sure what way you want to take that. Also, I need to add docs when we're happy with the look of things.

Would prefer to just switcheroo if possible, and then ask people to give the new stuff a spin. If everyone is OK with then we can cut a release. Has anyone else contributed code to pldb besides yourself? Just need to make sure we have CAs for everyone. Might need to get a verbal something from them on clojure-dev as well.

David Nolen
added a comment - 06/Oct/13 2:37 PM Would prefer to just switcheroo if possible, and then ask people to give the new stuff a spin. If everyone is OK with then we can cut a release. Has anyone else contributed code to pldb besides yourself? Just need to make sure we have CAs for everyone. Might need to get a verbal something from them on clojure-dev as well.

Patch 2 removes all the old rel code/tests. I forgot to turn off emacs whitespace cleanup, so I trivially touched a lot of lines with trailing whitespace that didn't need to be. I usually go back and fix up the commits, but if it's ok, maybe we can just put in the whitespace cleanup too so it'll be easier to work with in the future.

Norman Richards
added a comment - 07/Oct/13 9:26 AM - edited Patch 2 removes all the old rel code/tests. I forgot to turn off emacs whitespace cleanup, so I trivially touched a lot of lines with trailing whitespace that didn't need to be. I usually go back and fix up the commits, but if it's ok, maybe we can just put in the whitespace cleanup too so it'll be easier to work with in the future.
I'll send a patch 3 with the doc updates later.