- From: Michael Kifer <kifer@cs.sunysb.edu>
- Date: Wed, 08 Mar 2006 13:56:43 -0500
- To: Hassan Aït-Kaci <hak@ilog.com>
- Cc: "Peter F. Patel-Schneider" <pfps@inf.unibz.it>, public-rif-wg@w3.org
> 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 UTC