Re: rev and the costs of inverses/aliases in SPARQL

On 8 Mar 2010, at 17:36, Dan Connolly wrote:

> On Mon, 2010-03-08 at 16:16 +0000, Bijan Parsia wrote:
>> On 8 Mar 2010, at 15:00, Dan Connolly wrote:
[snip]
>> [snip]
>>> Doesn't that just gum up the works when doing SPARQL queries? Which
>>> do you query for, abridgement or abridgementOf? Or do you use
>>> a UNION?
>>
>> Or add the requisite rule/owl axiom.
>
> Would you elaborate on that, please?
> (a) do any/many/most widely-used SPARQL engines support adding
> OWL axioms this way?

Any,yes (see Pellet and anything that lets you use rules or several  
owl fragments); many, probably not; all, not.

> (b) what are the costs of this approach in time/space?

If you are just RDF+inverses in this way then it can be (I would  
think) reducible to query expansion (since that's what you can do  
manually). Inverses, however, are costly wrt other language features,  
so this use could be not worth it in the end.

> One project I worked on used forward chaining in virtuoso, so
> it increased the storage costs (doubled the storage for statements
> with properties that have inverses)...

You could normalize them at load time...that's basically what you do  
with rev (which isn't a true inverse operator since it doesn't appear  
in any class expressions...it's "just syntax"; well, having two  
spellings is "just syntax" as well; you could always add magic syntax  
inside rel).

> I'm not sure about the
> impact on query run time,

I'd be surprised if it were non-negligible....well, ok, if you really  
put both directions in manually and then union them back...eww.

But, ahem, may I suggest that this is clearly not a remotely optimal,  
or even sensible, approach :)

> but it took a few hours to do the
> pre-query forward chaining. I think our KB had a few million
> statements in it.


"Semantic" inverses are a pretty heavyweight way to do this, in general.

I'm pretty skeptical about the overall utility. I remember ---...--->  
and <---...--- from N3 and I was so happy the day they went away :) I  
just find it hard to read the  linear syntax in reverse reliably. (I  
find inv(foo) easier than foo^- (superscripted minus), but rev and  
rel are *so* close and not natural inverses).

It took me a couple of hours to encode two simple owl statements into  
RDFa this morning (including some tool induced hellstorm). Now, maybe  
I just suck! but I would have definitely had a better suggest mode if  
I hadn't been led down the path of being too clever. (But then, href  
semantics hurt me a lot, so there you go.)

(This is my second attempt to do something with RDFa, so it's not  
like I'm very experienced.)

Cheers,
Bijan.

Received on Monday, 8 March 2010 18:47:23 UTC