-
Notifications
You must be signed in to change notification settings - Fork 193
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
Aggregate Semantic Check Missing #128
Comments
The compiled version of Souffle works; however, the interpreter seg-faults in visitStore() in the RamExecutor.cpp. |
I have further investigated the issue. The problem with that example is the following line
The issue is that here we assume that we not just compute the minimum value of the set
but also request the witness environment for the minimum value. In this case, the witness environment would constitute of values for variables A, B, and D at the time when the
There is no single value of A that could produce a sensible value for the relation |
I forgot to say because we don't have a semantic check that stops witnesses (and we don't store them at the moment), the above program produces either invalid results for variable A or crashes converting the invalid value of A to a symbol. The easiest solution for the problem would be to check for witnesses and report warnings. Note that a witness is basically an unground variable in the outer scope of the aggregation. We would need a semantic check that prohibits unground variables in the outer scope that become grounded in the aggregation scope. Alternatively, we permit witnesses for min/max and extend the interpreter and compiler for storing the witness environment. The runtime for aggregation may increase if a witness environment is stored. However, for this solution, we need still need the semantic check for the count-aggregation. For a count-aggregation, witnesses do not make sense and must not be permitted. I would suggest to enforce the witness check first, i.e., no witnesses are permitted and later add the extension if required by some users. |
As of pull request #387, there is now a test in |
Program crashes while writing data to a file.
segfault_count_sccs.zip
The text was updated successfully, but these errors were encountered: