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

Wrong result of z3 datalog with predict #6447

Closed
DerZc opened this issue Nov 9, 2022 · 2 comments
Closed

Wrong result of z3 datalog with predict #6447

DerZc opened this issue Nov 9, 2022 · 2 comments
Labels

Comments

@DerZc
Copy link

DerZc commented Nov 9, 2022

Hi,

Consider the following program:

Z 64

fbnd(A:Z) printtuples
szra(A:Z) input

szra(1).

fbnd(F) :- szra(F), 72 != F, 97 = F.

As there is only one fact in szra and not equals to 97, so the result should be empty.
But I run the program and get the result:

Tuples in fbnd: 
        (A=97(1))
Time: 0ms
Parsing: 0ms, other: 0ms

If I remove the 72 != F in the rule, it will become fbnd(F) :- szra(F), 97 = F.. The result will become:

Tuples in fbnd: 
Time: 0ms
Parsing: 0ms, other: 0ms

But both of these two results should be same and equal to empty.
The version of z3 is cbc5b1f.

@NikolajBjorner
Copy link
Contributor

NikolajBjorner commented Nov 9, 2022

you are hitting functionality that nobody else exercised in 10 years. I don't have bandwidth to go through such functionality. The other use cases for the datalog engine have been to associate unique strings with identifiers. I have fixed #6446 but will punt on other reports.

Given that z3 is open source you and others are of course invited to fix such bugs.

@DerZc
Copy link
Author

DerZc commented Nov 9, 2022

Thanks for fixing #6446 and the clarification! We still stop testing Z3's Datalog functionality assuming that this functionality is not actively used, even though we believe to have found other likely unreported bugs. Let us know in case you want us to resume our testing efforts in the future.

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

No branches or pull requests

2 participants