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

freeze/2 spooky backtracking #44

Closed
infradig opened this issue Sep 26, 2022 · 1 comment
Closed

freeze/2 spooky backtracking #44

infradig opened this issue Sep 26, 2022 · 1 comment

Comments

@infradig
Copy link
Contributor

infradig commented Sep 26, 2022

Correct...

$ tpl
?- freeze(Y,write(ok)),(X=Y;true),Y=123.
ok   Y = 123, X = Y
; ok Y = 123.
?- $ tpl

Incorrect...

?- _=[X,Y],freeze(Y,write(ok)),(X=Y;true),Y=123.
ok   X = 123, Y = X
; ok Y = 123, freeze:freeze(X,write(ok)).
?- 
@infradig infradig changed the title freeze/2 spooky behaviour freeze/2 spooky backtracking Sep 26, 2022
@infradig
Copy link
Contributor Author

More...

$ tpl
?- freeze(Y,write(ok)),(true;true).
   freeze:freeze(Y,write(ok))
;  true.
?-

On backtracking Y should still be frozen.

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

No branches or pull requests

1 participant