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

First order logic and SPARQL

From: Jitao Yang <jitao.yang@gmail.com>
Date: Fri, 3 Sep 2010 22:30:55 +0200
Message-ID: <AANLkTikpLuoEh3TwdXA_B-QniTzFLDOc5G5eA=nEozRC@mail.gmail.com>
To: semantic-web@w3.org, public-sparql-dev@w3.org
Dear all,

Do you know if we can find the some connections between First order logic

SUCH AS, for the First order logic QUERY: DescPr(x, author,y) AND DescPr(y,
(DescPr(x, author,y) means that x's author is y)
we can map it to SPARQL like:

PREFIX dc: ...

                 ?x, dc:author,?y .
                 ?y, dc:country,'IT' .

It means that for this query we can map the 'AND' in First order logic to
the 'AND' in SPARQL.

However, if *we want to QUERY the books whose authors are ALL from ITALY.*

1/ we can express it using First order logic like:
*(note that: E* means Existential, *U* means Universal,
DescCl(x, book) means that x is an instance of CLASS book)

*(E* x) DescCl(x, book) AND (*U* y)(DescCl(y, author)) AND DescPr(x, author,
--> DescPr(y, country, 'IT')

2/ we can use SPARQL like:

PREFIX dc: ...
PREFIX vcard: ...

SELECT ?bookName
                ?x     vcard:fullname    ?bookName .
                                   ?x      dc:author      ?y .
                                   ?y      dc:country     ?z .
                                   FILTER (?z != "IT") .
                 FILTER(!bound(?y)) .

But, it seems that it is difficult to translate 1/ into 2/,
such as how to translate Existential in First order logic to SPARQL
what kinds of expressions in First order logic should be translated to
SPARQL using OPTIONAL, FILTER and so on...

Do you have any suggestions on the above problems?

Thank you!
Received on Friday, 3 September 2010 20:32:17 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:15:50 UTC