Open jeshan opened 10 months ago
Thank you a lot for looking into this, I greatly appreciate your help!
pred1
is the only minimal test case that I can find so far :sweat:
The fix for scryer seems to work: https://github.com/mthom/scryer-prolog/pull/420 Should I submit a PR that copies that fix into this repo?
Yes please do, thank you a lot!
I've found that we have a situation where unification could fail if a custom attribute is added before a clpz constraint is posted.
Consider this code
Running this on sicstus, we see that only
pred1
fails. However swapping a goal (like pred3) or declare the var as a clpz constraint first (like pred4) works!Output:
I'm not familiar with the clpz code but could it be because you assumed that
variables_same_queue([Var,Other])
would always hold here?https://github.com/triska/clpz/blob/281aaf0841729e159bb0e978c61e990781889132/clpz.pl#L7385-L7388
Am I reading this correctly or should the bug be fixed in my code?
_Update: I've found that it makes a difference if the clpz var is either on left-hand side of X#=Y or right-hand side. If I have a specific example, I'll add it but I think you'll know that it's about
verify_attributes
implementation which may not have been tested for ifVar
andOther
have been swapped inverify_attributes(Var, Other, Gs)
._