Display program code

transitive_closure_1.pl : Transitive Closure
Computes the transitive closure path for a binary relation edge, e.g. all the paths along the edges of a graph.
Terminates only under refined semantics.

How to use:
For a relation containing the pairs (A1,B1), .., (An,Bn), you enter edge(A1,B1), .., edge(An,Bn),
and get the pairs (C1,D1), .., (Cm,Dm) of its transitive closure path(C1,D1), .., path(Cm,Dm).

See also:
Thom Fruehwirth. Rule-Based Programming with CHR. 2006.

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

Select example query: 

CHR
WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007