SWI-Prolog / issues

Dummy repository for issue tracking
7 stars 3 forks source link

dif/2 incorrect Ⅵ #128

Open UWN opened 1 year ago

UWN commented 1 year ago

?- dif(A,B),A=[[]|A],B=[C|D],D=[_|_],D=[[]|C].
false, unexpected.
?- dif(A,B),A=[[]|A],B=[C|D],        D=[[]|C].
A = [[]|A],
B = [C, []|C],
D = [[]|C].
UWN commented 1 year ago

Just noted that this is the very same of the first test https://github.com/SWI-Prolog/issues/issues/122

In any case, there is now a new version for finite terms:


?- dif(A,B),A=[[]|C],B=[D|A],C=[_|_],C=[[]|D].
   false, unexpected.
?-          A=[[]|C],B=[D|A],C=[_|_],C=[[]|D],dif(A,B).
   A = [[], []|D],
   C = [[]|D],
   B = [D, [], []|D].
UWN commented 1 year ago

All 9.1.12

hyperswine commented 9 months ago

interesting, the query system in SWI prolog is a bit strange as well in my experience. For this specific example it might be more related to the implementation of dif/2 though