Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dif/2 weak with occurs_check #1382

Closed
UWN opened this issue Mar 31, 2022 · 0 comments · Fixed by #2027
Closed

dif/2 weak with occurs_check #1382

UWN opened this issue Mar 31, 2022 · 0 comments · Fixed by #2027

Comments

@UWN
Copy link

UWN commented Mar 31, 2022

?- set_prolog_flag(occurs_check, true).
   true.
?- dif(-X,X).
   true. % expected
?- dif(Y,X),Y= -X.
   Y = - X, dif:dif(- X,X). % unexpected ; no dif expected
?- dif(Y,X),Y= -X, X\= Y.
   Y = - X, dif:dif(- X,X). % they are no longer unifiable, and thus the dif is redundant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant