next up previous contents index
Next: Limitation and Guidelines for Up: Using the Interface Previous: Interface Flags   Contents   Index

Datalog

Users can write recursive Datalog queries with exactly the same semantics as in XSB using imported database predicates or database rules. For example assuming odbc_parent/2 is an imported database predicate, the following recursive query computes its transitive closure.


:- table(ancestor/2).
ancestor(X,Y) :- odbc_parent(X,Y).
ancestor(X,Z) :- ancestor(X,Y), odbc_parent(Y,Z).



Baoqiu Cui
2000-04-23