dif/2: Omit entailed residual goals, if the arguments are not unifiable.

This addresses #135.
This commit is contained in:
Markus Triska
2020-08-22 17:49:02 +02:00
parent e75ebd9b6e
commit cc77ef680d

View File

@@ -49,7 +49,9 @@ dif(X, Y) :-
gather_dif_goals([]) --> []. gather_dif_goals([]) --> [].
gather_dif_goals([(X \== Y) | Goals]) --> gather_dif_goals([(X \== Y) | Goals]) -->
[dif(X, Y)], ( { X \= Y } -> []
; [dif(X, Y)]
),
gather_dif_goals(Goals). gather_dif_goals(Goals).
attribute_goals(X) --> attribute_goals(X) -->