core.logic

bring pldb into core.logic

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major 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.

Activity

Hide
Norman Richards added a comment - - edited

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

Show
Norman Richards added a comment - - edited This patch (0001-remove-old-defrel.patch) is from the current master (335226f).
Hide
David Nolen added a comment -

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

Show
David Nolen added a comment - Can we get a new Patch 2 updated to apply to HEAD? Thanks.
Hide
Norman Richards added a comment - - 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.

Show
Norman Richards added a comment - - 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.
Hide
Norman Richards added a comment -

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

Show
Norman Richards added a comment - Craig Brozefsky is the only other pldb contributor. He does have a CA.
Hide
David Nolen added a comment -

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.

Show
David Nolen added a comment - 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.
Hide
Norman Richards added a comment -

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.

Show
Norman Richards added a comment - 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.
Hide
Norman Richards added a comment -
Show
Norman Richards added a comment - My working branch: https://github.com/orb/core.logic/tree/pldb

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: