<< Back to previous view

[LOGIC-143] bring pldb into core.logic Created: 06/Oct/13  Updated: 15/Oct/13  Resolved: 15/Oct/13

Status: Closed
Project: core.logic
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Norman Richards Assignee: David Nolen
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0001-integrate-pldb.patch     Text File 0001-remove-old-defrel.patch    
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.



 Comments   
Comment by Norman Richards [ 06/Oct/13 11:32 AM ]

My working branch: https://github.com/orb/core.logic/tree/pldb

Comment by Norman Richards [ 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.

Comment by David Nolen [ 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.

Comment by Norman Richards [ 06/Oct/13 2:46 PM ]

Craig Brozefsky is the only other pldb contributor. He does have a CA.

Comment by Norman Richards [ 07/Oct/13 9:26 AM ]

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.

Comment by David Nolen [ 11/Oct/13 10:51 AM ]

Can we get a new Patch 2 updated to apply to HEAD? Thanks.

Comment by Norman Richards [ 13/Oct/13 9:57 AM ]

This patch (0001-remove-old-defrel.patch) is from the current master (335226f).

Comment by David Nolen [ 15/Oct/13 10:50 PM ]

fixed, http://github.com/clojure/core.logic/commit/1cdb5393aa9b5cac53de76e66d09b2555a1cd002

Generated at Wed Oct 22 08:58:55 CDT 2014 using JIRA 4.4#649-r158309.