So, I implemented SPARQL CONSTRUCT queries in Julie yesterday ( along with ASK queries ( Really, the CONSTRUCT queries are pretty silly to have: who wants to see serialized triples on an IRC interface? but I was thinking: what if instead of spitting the triples into IRC, it sent them into the backend?

I’m sure that the people in charge of SPARQL thought of this long ago, but it just occured to me, that this is a simple way to achieve rules-like processing:

10:49:36 <crschmidt> ^q CONSTRUCT { ?a rel:childOf <>. } where { <> rel:parentOf ?a. }
10:49:37 <+julie> {[], [], []},
{[], [], []}

Feeding these kind of results back into julie could let people create the equivilant of rules, passing them back into julie to add to the triplestore.

Man, I thought I gave up on this RDF stuff. Looks like maybe I wasn’t as done as I thought I was.

One Response to “SPARQL CONSTRUCT as Rules”

  1. Rich Says:

    Very smart idea!

    I had an unrelated innovation while doing twinql — “faux construct”, where variable bindings are plugged straight back into the query pattern, returning a minimal serialisation which will, when queried again, return exactly the same bindings. I actually use it for something, but I can’t remember what!