-
Notifications
You must be signed in to change notification settings - Fork 200
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
Weird "Ungrounded variable" error reporting #2435
Comments
I am not an expert of this part of the code, but it looks more like a bug of the |
Thank you for responding. Does souffle team have any plan to fix this? |
Currently the Souffle project has few active developers. Any help would be appreciated if you want to work on this issue and submit a fix. |
Thank you, I'll look further into it later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! Thank you for building this powerful language!
I've been learning and hacking about souffle recently.
When I try to feed the above Fibonacci program to souffle, it blames a ungrounded error like the below:
That's kind of weird for me, since the "grounded constraints" of
result
are satisfied as following:Reported error depends on the order of atoms
What's more weird is, when tweaking the order of some atoms, the souffle's error reporting also changes.
temp = r2
at the end won't trigger error:temp = r2
tor2 = temp
and putting it at the end, the error still reported:Some exploration of souffle internal
After some exploration, I found that the original program passed the
SemanticChecker.cpp
, butResolveAliases.cpp
transformed the original program as follows.It folds the variable
temp
intoresult = r1 + temp
andtemp = r2
withresult - r1
, which breaks thegrounded constraint
betweenresult
andtemp
! Then theGroundedTermsChecker.cpp
can't recognize that theresult
is grounded anymore, and then report the ungrounded error.Is this a bug or it's an expected "feature"? Thanks for any help or advice.
The text was updated successfully, but these errors were encountered: