Pranam Kolari (kolari1@umbc.edu)
Tue, 4 Mar 2003 22:42:32 -0500
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 Tue Mar 04 2003 - 22:42:53 EST