W3C home > Mailing lists > Public > public-rif-wg@w3.org > March 2006

Re: On production rules and phase I&II

From: Michael Kifer <kifer@cs.sunysb.edu>
Date: Wed, 08 Mar 2006 13:56:43 -0500
To: Hassan At-Kaci <hak@ilog.com>
Cc: "Peter F. Patel-Schneider" <pfps@inf.unibz.it>, public-rif-wg@w3.org
Message-ID: <24910.1141844203@kiferserv.kiferhome.com>


> Ok, then: do not bother with Prolog. Let us retrict Pure Horn to Datalog
> (already a substantial concession, but never mind!) and now your (or anyone's)
> exercise is to do recursive transitive closure in pure PRs (i.e., using only
> asserts and no meta-rules) as in:
> 
> 	ancestor(X,Y) :- parent(X,Y).
> 	ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y).
> 
> -hak

I would say this (in a stylized language):

        parent(X,Y) -> assert(ancestor(X,Y))
	parent(X,Z), ancestor(Z,Y) -> assert(ancestor(X,Y))

Note that RETE-style languages are not the only known production rule
languages.


	--michael  
Received on Wednesday, 8 March 2006 18:56:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:27 GMT