.type Node <: symbol
.decl edge (node1:Node, node2:Node)
.input edge

.decl source (node:Node)
.input source
.decl sink (node:Node)
.input sink

.decl path_from_source (node1:Node, node2:Node)

path_from_source(X,Y) :-
     source(X),
     edge(X,Y).
path_from_source(X,Z) :-
     path_from_source(X,Y),
     edge(Y,Z).

.decl source2sink(source:Node, sink:Node)
.output source2sink

source2sink(Source,Sink):-
     path_from_source(Source,Sink),
     sink(Sink).
