- From: Harold Boley <boley@informatik.uni-kl.de>
- Date: Tue, 04 Nov 2003 02:59:49 +0100
- To: "Butler, Mark" <Mark_Butler@hplb.hpl.hp.com>
- Cc: "'Dan Brickley'" <danbri@w3.org>, www-rdf-rules@w3.org
Hi Dan, Mark, and All, > - there are not just overlaps between rdf-query and rdf-rules, but also > potentially with XSLT, XPath and XQuery, and of course RuleML. Unfortunately > this may not make things easier from an organizational perspective. RuleML has acted as an umbrella keeping these approaches together. Consider Dan's Sesame example (with another art:Painting type added): CONSTRUCT {Artist} <rdf:type> {<art:Painter>}; <art:hasPainted> {Painting} <rdf:type> {<art:Painting>} FROM {Artist} <rdf:type> {<art:Artist>}; <art:hasCreated> {Painting} <rdf:type> {<art:Painting>} A directly corresponding version would be a (functional) query that for successful hasCreated calls returns hasPainted terms: <query> <_body> <atom> <_opr><rel>art:hasCreated</rel></_opr> <var rdf:type="art:Artist">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> <_foot> <cterm> <_opc><ctor>art:hasPainted</ctor></_opc> <var rdf:type="art:Painter">Artist</var> <var rdf:type="art:Painting">Painting</var> </cterm> </_foot> </query> This could be extended to Mark's recursive function perspective by defining a trans[formation] rule that for hasDone calls again tests hasCreated and on success returns hasPainted terms: <trans> <_head> <nano> <_opf><fun>act:hasDone</fun></_opf> <var rdf:type="being:Human">Artist</var> <var rdf:type="act:Deed">Painting</var> </nano> </_head> <_body> <atom> <_opr><rel>art:hasCreated</rel></_opr> <var rdf:type="art:Artist">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> <_foot> <cterm> <_opc><ctor>art:hasPainted</ctor></_opc> <var rdf:type="art:Painter">Artist</var> <var rdf:type="art:Painting">Painting</var> </cterm> </_foot> </trans> The example can also be defined as an imp[lication] rule ('view') that for hasCreated facts derives hasPainted facts: <imp> <_body> <atom> <_opr><rel>art:hasCreated</rel></_opr> <var rdf:type="art:Artist">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> <_head> <atom> <_opr><rel>art:hasPainted</rel></_opr> <var rdf:type="art:Painter">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_head> </imp> This can also be used backward in the equivalent form <imp> <_head> <atom> <_opr><rel>art:hasPainted</rel></_opr> <var rdf:type="art:Painter">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_head> <_body> <atom> <_opr><rel>art:hasCreated</rel></_opr> <var rdf:type="art:Artist">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> </imp> to reduce the (relational) query <query> <_body> <atom> <_opr><rel>art:hasPainted</rel></_opr> <var rdf:type="art:Painter">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> </query> to another query, which might succeed via facts ('table rows'): <query> <_body> <atom> <_opr><rel>art:hasCreated</rel></_opr> <var rdf:type="art:Artist">Artist</var> <var rdf:type="art:Painting">Painting</var> </atom> </_body> </query> The Description Logic flavor of the example could be captured using the OWL RuleML combination currently developed in the JC (http://www.daml.org/listarchive/joint-committee/1499.html). Best, Harold
Received on Monday, 3 November 2003 21:09:24 UTC