W3C home > Mailing lists > Public > www-rdf-rules@w3.org > July 2005

Re: Web Rule Language - WRL vs SWRL

From: Ian Horrocks <horrocks@cs.man.ac.uk>
Date: Fri, 1 Jul 2005 21:03:29 +0100
Message-Id: <27b09d9dde7649b5f404c914e11752c6@cs.man.ac.uk>
Cc: www-rdf-rules@w3.org
To: Sandro Hawke <sandro@w3.org>

On 1 Jul 2005, at 05:33, Sandro Hawke wrote:

>
>
> Drew writes:
>> Here's the nub: We are in the presence of an unfortunate pun.  All of
>> these different "semantics" for LP concern the meaning of logic
>> programs _as programs_.  But for interoperability what we care about
>> is the semantics of logical expressions as _statements_.
>
> For my own sanity, I'm trying to stay focussed on test cases.  For RDF
> and OWL we had, for instance, PositiveEntailmentTests (PETs) and
> NegativeEntailmentTests (NETs), along with several other kinds of
> tests.   Ideally, the tests correspond to how people are actually
> going to use the language, and fit directly into a Conformance part of
> the language specification.
>
> The DAWG has Query Tests, which might work well for rules work.  For
> DAWG they say "The dataset gives the exact graph against which the
> query is evaluated (no further inference is used to determine the
> input graph)" [1]. For a rule language version, I imagine reversing 
> that
> parenthetical to say something like "all licensed inference is done,
> as necessary, to produce query results."   The test case might be
> parameterized (as OWL tests were) by which language
> profile/semantics/species applied.
>
> Working through a SPARQL interface probably covers the space of RDF
> rules pretty well; it's less clear whether and how more expressive
> queries should be addressed in test cases.... and I understand that
> fuzziness is helping fuel the Michael/Ian loop.   Ian?  Maybe you can
> propose a concrete test case which demonstrates the difference in
> semantics here?   Can you do it through a SPARQL query?   [Sorry if I
> missed it earlier in the thread; I'm still catching up.]

We gave an example in the paper [1]. I will try to explain it in a bit 
more detail here.

Assume that we have a theory, knowledge base, rule base, graph, or 
whatever we want to call it, consisting of the triples:

  <#pat><#knows><#jo>.
<#pat><type><#Person>.
<#jo><type><#Person>.

Now consider the query that asks for all Persons that, w.r.t. this 
theory, know exactly one Person (we assume that, regardless of the 
restrictions of our representation language, the query language 
supports this kind of query). Is pat in the answer to this query? The 
standard semantics for query answering says that pat is in the answer 
iff (the interpretation of) pat is in a "#knows" relationship with 
exactly one Person in *every* admissible model/interpretation of the 
theory. Under RDF, OWL (Lite/DL) and SWRL semantics, pat is not in the 
answer, because there are admissible models in which pat is also in a 
"#knows" relationship with a Person other than jo. Under Datalog 
semantics, pat is in the answer, because there is only one admissible 
model, and in that model pat is in a "#knows" relationship with exactly 
one Person (jo).

I will leave it as an exercise to the reader to determine if this can 
be rendered into SPARQL syntax.

BTW, it might be worth pointing out that if we actually *want* the 
"closed world" answer, we can easily get it from RDF/OWL/SWRL simply by 
checking if pat is in the answer to the query "Person who knows at 
least one Person", and *not* in the answer to the query "Person who 
knows more than one Person".

Regards,

Ian

[1] 
http://www.cs.man.ac.uk/~horrocks/Publications/download/2005/HPPH05.pdf


>
>       -- sandro
>
> [1] http://www.w3.org/2001/sw/DataAccess/tests/README.html
>
Received on Friday, 1 July 2005 20:03:38 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:53:12 GMT