Display program code

transitive_closure_2.pl : Transitive Closure w/candidates
Computes the transitive closure path for a binary relation edge, e.g. all the paths along the edges of a graph. After creating all possible candidates for closure from the given nodes, the inappropriate ones are removed afterwards.
Terminates even under abstract semantics.

How to use:
For a relation over the set N1, .., Np containing the pairs (A1,B1), .., (An,Bn), you enter node(N1), .., node(Np), 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: 

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