W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > September 2001

RE: What is an RDF Query?

From: Pat Hayes <phayes@ai.uwf.edu>
Date: Wed, 19 Sep 2001 10:08:21 -0500
Message-Id: <p0510100db7ce61e0c8e5@[]>
To: "Wagner, G.R." <G.R.Wagner@tm.tue.nl>
Cc: w3c-rdfcore-wg@w3.org
>  > -----Original Message-----
>>  From: Pat Hayes [mailto:phayes@ai.uwf.edu]
>>  Sent: Tuesday, September 18, 2001 5:48 PM
>>  To: Wagner, G.R.
>>  Cc: www-rdf-rules@w3.org
>>  Subject: RE: What is an RDF Query?
>>>  Notice that in a KR system,
>>>  the query language is generally more expressive than the
>>>  input/assertion language.
>>>  E.g. in Prolog you may pose a
>>>  disjunctive query, but you must not assert a disjunction.
>>  Ah, I see what you mean. This is almost entirely a debate about
>>  terminology, and you seem to have introduced another usage. I would
>>  say that the languages of queries and rules in Prolog were
>>  *identical*: both consist of Horn clauses. The asymmetry that you see
>>  is built into the definition of 'Horn clause'. I actually disagree
>>  with what you say; every Prolog clause is asserted, and all the
>>  non-atomic clauses are disjunctions. A standard Prolog interpreter
>>  propagates queries by backward chaining, and never makes new
>>  assertions. What you are calling an 'assertion' is the consequent of
>>  a Horn clause, which must be atomic by definition.
>Yes, but in a relational/deductive database one typically
>considers the intensional knowledge, i.e. the rules/views to
>be quite stable once defined (or "asserted", if you wish), and
>the extensional knowledge, i.e. the set of facts that may be
>asserted, as subject to frequent changes.

Ah, that is a very controversial view, and we could argue about it at 
length. But in any case, I don't see anywhere in any semantic theory 
where this kind of distinction can be expressed, so it seems 
irrelevant to the discussion.

>Please notice that Prolog rules (as well as SQL views) are
>*not* Horn clauses! They are, for good reasons, more expressive,
>allowing for negation

Maybe Prolog has morphed into something else since the last time I 
looked at it. Can you characterize what subset of logic *is* captured 
by Prolog? I'm not sure what you mean by 'allowing for negation'.

>(and other things as in the case of SQL

Ah, yes; SQL isnt what I would call a logical query language at all. 
There is a different tradition of query languages in which one things 
of the query as a specification of the information required, rather 
than a logical goal, a sentence to be proved. I realise this 
distinction isn't sharp, and Prolog seems to be somewhere in the 
blur, but SQL is more clearly to one side. Which is why....

>We should consider the concept of a rule as a basic one
>that is not derived from that of a Horn clause (which happens
>to be a very restricted/simplified type of rule).

...I would suggest that there are in fact two slightly different 
notions of 'rule', so to claim that there is a single basic idea may 
lead to more confusion than clarity. I agree that there are kinds of 
rules that are not best thought of as Horn clauses.

>>>  In SQL, you may ask a universally quantified query, but you
>>>  cannot assert a universally quantified sentence. Exactly
>>>  the same applies to the languages of antecedents and consequents
>>>  in rules of the form (if P then Q) in a KR system. P may be
>>>  more expressive than Q in the same way as a query may be more
>>>  expressive than an assertion.
>>  Yes, I agree. And that is not surprising, of course, since if one is
>>  using the rule in backward chaining, then its consequent should match
>>  (part of) a query and its antecedent then become a new query; so one
>>  would expect that the formats of queries and antecendents should line
>>  up in this way. But that is only one way to use a rule, even if it is
>>  a very common one.
>I don't know of any other way where this would not hold.

Well, how about reasoning forward rather than backward? Then one 
matches the antecedents of the rule with assertions to generate new 
assertions. Same rule, but it can be used either way by a 
sufficiently powerful inference engine, and it doesn't change in 
meaning or syntax. (This is in the logical-implication sense of 
'rule', of course.)


IHMC					(850)434 8903   home
40 South Alcaniz St.			(850)202 4416   office
Pensacola,  FL 32501			(850)202 4440   fax
Received on Wednesday, 19 September 2001 11:08:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:51 UTC