W3C home > Mailing lists > Public > public-owl-dev@w3.org > July to September 2010

negation as failure

From: Matthew Pocock <matthew.pocock@ncl.ac.uk>
Date: Mon, 2 Aug 2010 17:43:05 +0100
Message-ID: <AANLkTinV9yB9ZEnbgzatjfbO-LsE8LD0Bf0VaTrAn26e@mail.gmail.com>
To: public-owl-dev@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 27 March 2013 09:32:58 GMT