Maybe somebody can help me with this? I have the code below where i want to know which clauses are involved in deducing a certain conclusion. For example, for
?path(X, Y, ID) then one solution is
ID = [clause1, clause2, clause3], X = a, Y = d. But i would like to drop the last argument about clause in the
link/3 predicate in the facts section for space reasons. I.e. instead of
link(a, b, [clause1]). i would like
Is there any way to this?
link(a, b, [clause1]). link(b, c, [clause2]). link(c, d, [clause3]). link(b, e, [clause4]). path(X, Y, ID):- link(X, Y, ID). path(X, Y, ID):- link(X, Z, ID1), path(Z, Y, ID2), append(ID1, ID2, ID).