Query:

     ?-  reachable(a).

Answer:


Model:

{ reachable(a),      in(d,a),      reachable(d),      in(b,d),      reachable(b),      in(a,b) }

Justification: