Open butterunderflow opened 11 months ago
I am not an expert of this part of the code, but it looks more like a bug of the ResolveAliases
pass that may not behave correcly in presence of such circular constraints.
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.
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.