Comments (4)
The compiled version of Souffle works; however, the interpreter seg-faults in visitStore() in the RamExecutor.cpp.
from souffle.
I have further investigated the issue. The problem with that example is the following line
scc(A, C) :- C = min D : {mutually_reaching(A,B), id(B, D)}.
The issue is that here we assume that we not just compute the minimum value of the set
mutually_reaching(A,B), id(B, D)
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
minimum was observed. The witness issue could be semantically justified for min/max. However, for counting, it would make no sense.
scc(A, C) :- C = count : {mutually_reaching(A,B), id(B, D)}.
There is no single value of A that could produce a sensible value for the relation scc
.
from souffle.
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.
from souffle.
As of pull request #387, there is now a test in tests/evaluation/count_sccs2/count_sccs2.dl
for this issue. When this issue is solved, uncomment the line in evaluation.at
marked with # TODO (see issue #128) POSITIVE_TEST([count_sccs2],[evaluation])
and update the relevant output files in the test directory.
from souffle.
Related Issues (20)
- `magic` causes different result
- Insufficient checking on unground variable
- A problem about subsumption.
- `eqrel` doesn't work well with provenance
- Race condition suppresses helpful parse error messages HOT 1
- 64-bit values for 32-bit RAM_DOMAIN? HOT 4
- Build on Linux failed: filesystem: No such file or director HOT 3
- Maybe there is a clerical error in official doc. HOT 1
- Provenance gives `Relation not found` error for relations with record types. HOT 1
- Souffle 2.4 release? HOT 4
- A problem about souffle-2.3? HOT 2
- Unexpected type error when aliasing record type
- Compilation error in Mac HOT 2
- Parser: address boundary error HOT 2
- SQLite reader silently replaces empty strings with "n/a" HOT 1
- UNKNOWN Version HOT 2
- Segmentation fault caused by unconstrained count disjunction HOT 1
- More information about the structure of ADTs in SQLITE output?
- Registration may not run when using the C++ interface HOT 4
- Assertion failure on `Auto-Scheduling` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from souffle.