negation as failure

Hi,

Sorry in advance if this is not the right forum for this question. I didn't
know where else to send it.

I am trying to write a sparql query (sparql 1.0) that pulls back things
where a triple is *not* asserted between two resources. So far, I've not
been able to achieve this. I've seen the OPTIONAL/FILTER/!BOUND
pattern<http://www.w3.org/TR/rdf-sparql-query/#func-bound>but I can
only make this work for asserting that a resource does not exist,
not for asserting that a triple is unsaid. The pattern I'm trying to encode
is:

select * where {
  ?a <r> ?b .
  ?b <s> ?c .
  filter(unsaid { ?a <s> ?c })
}

where unsaid is true if the child expression doesn't match the graph.
However, in sparql 1.0 there is no 'unsaid' function. I've tried a whole
heap of optional/filter/!bound variations but simply can not get this
expressed. I feel that this must be either a well-known unexpressible, or
have a well-known kludge.

Thanks,

Matthew

Received on Monday, 2 August 2010 16:43:47 UTC