Hi, On Feb 2, 3:42 pm, Timothy Pratley <timothyprat...@gmail.com> wrote: > Hi Jeffrey, > > On Feb 1, 4:50 am, Jeffrey Straszheim <straszheimjeff...@gmail.com> > wrote: > > > However, I'm not sure if you can built your own predicates in Java > > code (and therefore in Clojure code). That seems like a feature we'd > > want. I've sent an email to their support folks to find out if this > > is possible. > > I gave it a crack. It is definitely possible (perhaps even easy if you > are familiar with the nomenclature). Setting up the primitive support > is trivial, but combining the parts sent me into a spin - enter a DSL > which seems the logical aim (is this indeed the intention?)... > > http://github.com/timothypratley/strive/blob/80a3e41af4c8d882c0330ff1... > > Here is where I got to so far... does the cheats method (parse) to > demonstrate simple facts/rules/query, then exposes the underlying > primitives that could be used to build the same expression without > parsing. Then I got somewhat lost and figured I'd call it a night :)
Did the same thing some time ago. Iris has good (at least good enough) API docs in pdf and javadoc form. Inspired by the Allegro CL Prolog syntax i set up a little DSL for writing datalog programs and providing relations from clojure-sets and sql-queries. Unfortunately the whole package is currently broken while I'm completing the surrounding relational algebra library. But maybe someone wants to look at the code: http://github.com/hoeck/ra/blob/a018f2347fb409e7adc438f9c8b74fe8fecc57e9/hoeck/rel/iris.clj the simpsons example would then look like: (clear-universe) (<- (man '#{homer})) (<- (woman '#{marge})) (<- (hasSon '#{[homer bart]})) (<- (isMale ?x) (man ?x)) (<- (isFemale ?x) (woman ?x)) (<- (isMale ?y) (hasSon ?x ?y)) (?- (isMale ?x)) I hope to get it running again soon. > I couldn't find much info (any?) at all on the web about Datalog or > how to use IRIS in general... it certainly seems interesting as a > solver, but in practical terms how can I take advantage of it? Ok I > can think of some classic solver type problems (which are indeed > practical), but I get the impression Datalog is slated for greater > things, ie: general data modeling? Iris is hosted at the Semantic Technology Institute (STI) Innsbruck, reading through their research projects page leads to a new iris page, describing its goal as: "It is the mission of the IRIS research unit to define languages for describing data and Web services, and to build software components to reason about these data and service descriptions in order to make the vision of the Semantic Web a reality." (http://iris.sti-innsbruck.at) So you're probably right about it being for greater things. erik --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---