(no subject)


csaba1 (csaba1@umbc.edu)
Wed, 5 Mar 2003 14:09:50 -0500


Poonam,

I am not sure I understand what you are asking, see Pranam's e-mail below I
hope that will clear things up. Just change the definition of closure as per
my last e-mail, and define ancestor(X,Y) :- closure(parent)(X,Y).

Csaba

-----------------------------------------
Hi,

This is regarding the use of generic predicate - "Transitive Closure"

Is this wrong? Doesn't seem to work on XSB !

  closure(R)(X,Y) :- R(X,Y).
  closure(R)(X,Y) :- R(X,Z), closure(R)(Z,Y).
  :- hilog parent.
  ancestor(X,Y) :- closure(parent)(X,Y).
Thanks,Pranam Kolari



This archive was generated by hypermail 2.0b3 on Wed Mar 05 2003 - 14:12:49 EST