scryer-prolog: dif/2: unexpected redundant residuum
?- A = [_|_], dif([],A).
A = [_A|_B]. % expected
?- dif([],A), A = [_|_].
A = [_A|_B], dif:dif([],[_A|_B]), unexpected. % NOT solved
?- dif([],A), A = [_|_].
A = [_A|_B].
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (5 by maintainers)
Commits related to this issue
- add, implement and use the Unifier trait, use it to improve dif:attribute_goals//2 (#1382, #1433) — committed to mthom/scryer-prolog by mthom a year ago
The difs should go away as soon as possible. Otherwise Scryer will leak. (That is, it would leak even with a GC.) Projection should only show what is here. So it is good that projection shows this problem already.
Also,
\+ \+ X = Ymay trigger a side effect that would be intended in another place.