pat hayes wrote:
> OK, I took a look at http://lists.w3.org/Archives/Public/www-rdf-rules/#terms
> and found this:
> ----
> rule
> Expression of query and assertion that causes the automatic
> insertion of asserted statements wherever the query is matched.
> -----
> which may help to explain the (my) confusion. This notion of 'rule'
> doesn't make sense to me. Why would matching a *query* produce the
> insertion of *statements*? If we were to use a rule (in the usual
> sense, now, not Eric's) in forward inference, then it would match an
> assertion and produce a new assertion (as in inferring Q from P and
> (if P then Q) ) , and if we are using it in backwards mode then it
> would match a query and produce a new query (as in going from ?Q and
> (if P then Q) to ?P). These are really the 'same' inference,
> logically speaking - modus ponens - but done in different
> 'directions'. But I can't think of any way to take a rule, match it
> to a query, and get an assertion.
No, nobody's saying one should match a _rule_ against a _query_, I
think.
As Pat says, the antecedent of a rule matches assertions. I think some
people regard the antecedent as a query over the fact base ("Is this
assertion in the fact base? If so, assert the consequent").
In implementation terms, the antecedent may literally involve a query,
because to match it against an assertion one has to extract assertions
from a fact base (i.e. query a database looking for matching
assertions). One might then speak of "matching the query" i.e.
succeeding in matching the rule's antecedent with an assertion. I think
this is common (though clearly confusing) usage...
Perhaps the confusion lies in "query" as an expression (where some
syntax, such as a question mark, indicates a question), and "query" as a
implicit process, where assertions are compared.
Regards,
David Allsopp
--
/d{def}def/u{dup}d[0 -185 u 0 300 u]concat/q 5e-3 d/m{mul}d/z{A u m B u
m}d/r{rlineto}d/X -2 q 1{d/Y -2 q 2{d/A 0 d/B 0 d 64 -1 1{/f exch d/B
A/A z sub X add d B 2 m m Y add d z add 4 gt{exit}if/f 64 d}for f 64 div
setgray X Y moveto 0 q neg u 0 0 q u 0 r r r r fill/Y}for/X}for showpage