On Feb 9, 8:46 am, Jeffrey Straszheim <straszheimjeff...@gmail.com>
wrote:
> No, but I'm really learning as I go here. I'll look into it.
>
> On Mon, Feb 9, 2009 at 7:58 AM, Rich Hickey <richhic...@gmail.com> wrote:
>
> > Looks like you're moving apace!
>
> > Have you considered query/subquery optimization instead of magic sets?
>
> > Rich
>
> > On Feb 8, 7:51 pm, Jeffrey Straszheim <straszheimjeff...@gmail.com>
> > wrote:
> > > By the way, if anyone on this list has experience implementing bottom-up
> > > optimizations for logic programs, particularly from the magic set family,
> > > and is willing to assist, please contact me.
>
> > > On Sun, Feb 8, 2009 at 7:47 PM, Jeffrey Straszheim <
>
> > > straszheimjeff...@gmail.com> wrote:
>
> > > > Stratified negation is working and in trunk.
>
> > > > I have some cool ideas of a simple, but powerful, way to implement
> > > > evaluable predicates. They'll likely make it in by midweek.
>
> > > > The the hard part (magic sets) begins.
>
> > > > On Feb 8, 11:43 am, Jeffrey Straszheim <straszheimjeff...@gmail.com>
> > > > wrote:
> > > > > I now have recursive queries working. My next 3 milestones are
> > > > stratified
> > > > > negation, evaluable predicates, and then some version of magic sets
> > > > > optimization. But now, as long as your queries are non-negated it is
> > > > > working.
>
> > > > >http://code.google.com/p/clojure-datalog/
I got a chance to look at your docs:
http://code.google.com/p/clojure-datalog/wiki/BasicSyntax
I think your choice of using maps (we don't call them hashes in
Clojure as they might not be hash tables) is right on the money for
Clojure, especially set-of-maps-is-relation, just like clojure.set.
Two thoughts:
I wonder though if the map of rel-names to rels isn't a wart though.
It's a pet peeve of mine that relation names don't end up in the db
like any other attribute. Yes, they'll need to be indexed, but
eventually you'll want to support indexing on any desired attributes
as well. Putting relation names in the db gives you a uniform meta-
query capability. I haven't thought this all the way through, but you
might want to think about it.
I didn't know how to interpret this:
(logic-rule (:fred :x ?x :y ?y) - (:sally :x ?x :z ?z) ("becky" :y ?y)
(not! :janet :qqq ?z) (if < ?x ?
y))
Overall, it looks very promising!
If you weren't aware of it:
Foundations of Databases: The Logical Level
Serge Abiteboul, Richard Hull, Victor Vianu
http://www.amazon.com/gp/product/0201537710
has good coverage of Datalog, including QSQ.
Rich
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---