Giter Site home page Giter Site logo

Comments (4)

b-scholz avatar b-scholz commented on May 18, 2024

The compiled version of Souffle works; however, the interpreter seg-faults in visitStore() in the RamExecutor.cpp.

from souffle.

b-scholz avatar b-scholz commented on May 18, 2024

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.

b-scholz avatar b-scholz commented on May 18, 2024

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.

 avatar commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.