- From: Frank McCabe <frank.mccabe@us.fujitsu.com>
- Date: Wed, 8 Mar 2006 10:38:19 -0800
- To: public-rif-wg@w3.org
There may be hidden difference difference here in semantics. Here I am referring specifically to RETE rather than OPS5 A precondition in a RETE rule is closer to a Prolog-style pattern match than a predication. I.e., in (using my own made on the fly notation) when parent(x,y) and ancestor(y,z) assert ancestor(x,z) there is no sense in which, in RETE land, parent(x,y) can be said to be true. It is a pattern that should be matched by an object in the set of objects managed by the RETE engine. Re-expressing this in a form that is closer to RETE-speak, you get when {parent = x, child=y} and {ancestor=y, descendant=z} assert {ancestor=x, descendant=z} highlights this a little more clearly (I hope) The expressions {parent=x,child=y} etc are patterns that are applied to the objects in the pool. I.e., the semantics of RETE is inherently operational - the RETE inference rules express the kinds operations you can make on a set of objects. As we know, we *can* model such a semantics, in effect constructing a denotational semantics for RETE. But, this is not the same thing as mapping RETE rules into predicate logic; any mapping has to carry with it the operational semantics of RETE otherwise it will not be faithful to the RETE semantics. Frank On Mar 8, 2006, at 8:28 AM, Peter F. Patel-Schneider wrote: > > From: Francois Bry <bry@ifi.lmu.de> > Subject: Re: On production rules and phase I&II > Date: Wed, 08 Mar 2006 17:18:40 +0100 > >> Dear Peter, >> >> We are in a non-terminating loop because the argument Hassan gave >> does >> not seem to reach you - and you answers do not reach Hassan and me. >> >> Hassan's point was, as I understand it, that in the production >> rules you >> give below, there is nothing like a procedure or function call and >> therefore no recursion. Is this tentative explaination helping? >> >> Regards, >> >> Francois > > Not one tiny little bit. > > Rule sets don't have procedure or function calls. However, some > rules are > called "recursive", for example the second rule below: > > ancestor(A, B) :- parent(A, B). > ancestor(A, B) :- parent(A, X), ancestor(X, B). > > (See, for example, > http://en.wikibooks.org/wiki/Programming:Prolog_Recursive_Rules for > more about > recursive rules.) > > Given that the example above contains a recursive rule, then I see > every reason > to state that the pure production rule set > > (p (parent ^parent <x> ^child <y>) > --> > (make ancestor ^ancestor <x> ^descendant <y>)) > > (p (parent ^parent <x> ^child <y>) > (ancestor ^ancestor <y> ^descendant <z>) > --> > (make ancestor ^ancestor <x> ^descendant <z>)) > > also contains a recursive rule. > > Peter F. Patel-Schneider >
Received on Wednesday, 8 March 2006 18:38:26 UTC