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

Unsafe variable error #95

Closed
nrueh opened this issue Mar 20, 2025 · 1 comment
Closed

Unsafe variable error #95

nrueh opened this issue Mar 20, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@nrueh
Copy link

nrueh commented Mar 20, 2025

I get the following error

INFO:waitress:Serving on http://127.0.0.1:5050
<block>:37:1-273: error: unsafe variables in:
  h(20,"8b3ea9ef14a7448366742cf1285f325d476bbdff",satisfied(C,ID),(column(C,ID,ANON_154_155_,ANON_156_157_),allow(Idx,(#Anon0,Row),ANON_138_139_))):-[#inc_base];column(C,ID,ANON_154_155_,ANON_156_157_);#p_allow(#b(Idx),(#p,#b(Row)),#b(ANON_138_139_));satisfied(C,ID);(Idx,#Anon1)=C;not not_hit(C,ID,Row);C=(Idx,#Anon1).
<block>:37:118-119: note: '#Anon0' is unsafe

which I believe stems from this (safe) rule

satisfied(C,ID) :- allow(Idx,(_,Row),_), column(C,ID,_,_), C=(Idx,_), not not_hit(C,ID,Row).
``
@stephanzwicknagl
Copy link
Collaborator

This happens due to the Anon variable in the nested Tuple of the rule. As a temporary workaround, you can name them, e.g.

satisfied(C,ID) :- allow(Idx,(TEMPANON,Row),_), column(C,ID,_,_), C=(Idx,_), not not_hit(C,ID,Row).

stephanzwicknagl added a commit that referenced this issue Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants