Skip to content
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 witness question/documentation issue? #1801

Closed
TomasPuverle opened this issue Dec 16, 2020 · 1 comment
Closed

Aggregate witness question/documentation issue? #1801

TomasPuverle opened this issue Dec 16, 2020 · 1 comment

Comments

@TomasPuverle
Copy link
Contributor

In the docs, here: Aggregates it states that aggregates can't produce witness variable instantiations. The specific example in that section,

.decl family(name:symbol, age:number)
.decl youngest(name:symbol, age:number)

family("Alissa", 10).
family("Maria", 46).
family("Mark", 50).

youngest(p, n) :- n = min x : family(p, x).

says "This will raise a Witness Problem Error"; however, in the current master of Souffle this succeeds and runs, producing "Allysa, 10", which is correct.

Is the documentation incorrect, or is there a bug in the compiler? Also note that if I add family("John", 10), the result will contain both witnesses, so it seems that the aggregate works and the documentation is incorrect. Before I start reading the code, what is the expected behavior?

@b-scholz
Copy link
Member

We have not updated the documentation. Rachel has written a transformer that permits witnesses in Aggregates.
We need to update the documentation of Souffle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants