Re: What is an RDF Query?

On Mon, Sep 17, 2001 at 10:54:13AM -0500, Pat Hayes wrote:
> >From: "Eric Prud'hommeaux" <eric@w3.org>
> >Subject: Re: What is an RDF Query?
> >Date: Fri, 14 Sep 2001 10:55:09 -0400
> >
> >>  Thanks for the clarification. I propose that we use a term for the
> >>  antecedent tthat is NOT "assertion". Furthur, I propose that this term
> >>  either be "query" or that the definition express the commonality with
> >>  queries.
> >
> >I propose that we do not do this.  I oppose calling the antecedant of a
> >rule anything other than the antecedant of a rule!  In particular, I
> >strongly oppose calling it a query, as there have been arguments that
> >the antecedant of a rule is not the same as a query.
> 
> I agree. Also, this proposed terminology embodies a confusion between 
> the idea of a syntactic part (of a rule) on the one hand, and a 
> propositional attitude (of being asserted or queried) on the other. 
> The point is that the *very same* expression can be both asserted and 
> queried; being an assertion or a query are not syntactic categories.
> 
> We already have a well-established and widely understood terminology 
> for talking about rules. Let's stick to it and avoid creating 
> confusion where none exists. Rules have antecedents and consequents, 
> and are often (though not always) understood to have the logical 
> force of implications, ie when asserted, they say that the 
> antecedents entail the (disjunction of the) consequent(s). (In 
> another sense of 'rule' they have no particular logical force, but 
> are simply thought of as process specifications, like productions in 
> a production system. Often, people switch back and forth between the 
> 'logical' and 'processing' ways of thinking, but the 
> antecedent/consequent terminology works in both cases.)
> 
> The term 'query' has several meanings as well. If we are thinking 
> logically, then an expression is a query just by virtue of being 
> posed as a goal to be proved; its not a syntactic matter so much as a 
> matter of pragmatics, so of course there is a "commonality" between 
> queries and consequents (not antecedents), i.e. they are the same 
> kinds of expressions; they can be unified by variable matching. 
> (Though even there one has to keep the assertion/querying distinction 
> clear since the same variables are treated differently in the two 
> cases.) But 'query' is also used in a broader sense to mean something 
> more complicated, a kind of description or specification of the data 
> that is being requested, and may require more complicated kinds of 
> processing than simply checking logical consequence. In this case it 
> isn't so clear that there is any straightforward commonality between 
> the query language and any part of the rule syntax.

I agree with the ambiguity of "query". In fact, I poked fun at it:
 >I think the reason it is/could be useful is that the query part of
 >rules can be expressed in the same language as the query part of
 >queries (which would be the greater part).

Antecedent is a specialized term in logic that has more of an ordering
implication to query and lay people as they (unclear antecedent?) are
likely to fall back on the dictionary definition. Perhaps both rule
antecedent and query selector could be described in terms of a
"pattern":

rule    ::= pattern assertion*
query   ::= pattern [more crap]
pattern ::= pTriple+
pTriple :   some grouping of symbols in predicate, subject and object
	    positions where each symbol may be a "variable"

RDQL would have a pattern made of the WHERE and AND clauses:
	WHERE  (?b, <rs:type>, <rs:Bag>), (?b, ?x, ?y)
	AND    ! ( ?x eq <rs:type> && ?y eq <rs:Bag> )
and algae's [1] would be make from the "ask" clause:
	ask '((http://...#type ?annot http://...#Annotation)
	      (http://...#Author ?annot "Joe")
	      (http://...#Annotates ?annot ?doc))
The RDQL above would be turned into a query with a SELECT:
	SELECT ?b, ?y
and the algae above would be turned into a query with a "collect":
	collect '(?annot ?doc)
or a rule with an "assert":
	assert '((http://...#Annotator ?doc "Joe")
or a more complex rule with created (anonymous) nodes:
	assert '((http://...#Annotator ?doc ?#genidFoo)
		 (http://...#name ?genidFoo "Joe"))

More pedantic issues:

 Would an antecedent be different from a pattern (in these examples or
 elsewhere)?

 Would a query constraint be different from a pattern?

 Are any of these terms universal enough to be use by both communities
 on this list?

 Perhaps "form" would be better than "pattern" - from wordmsyth [3]:
	"structure or shape, as opposed to substance"

I'm not trying to be a winer, just trying to get query and rule people
on the same page.
Thoughts?

> >  > I feel that vocabulary resolution saves a lot of time in the long run
> >>  and is worth some effort.
> >
> >I feel that the vocabulary conflation can only serve to stifle debate on
> >exactly what rule antecedants should be.
> 
> I agree with both of you.

even when we disagree?


[1] http://www.w3.org/1999/02/26-modules/User/Algae-HOWTO
[2] http://www.w3.org/1999/02/26-modules/User/Algae-HOWTO#Example_comprehensive
[3] http://www.wordsmyth.net/cgi-bin/search.cgi?matchent=form&matchtype=exact
-- 
-eric

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

Received on Monday, 17 September 2001 19:56:41 UTC