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

Q: Enum sort numerals #7001

Closed
wintersteiger opened this issue Nov 17, 2023 · 2 comments
Closed

Q: Enum sort numerals #7001

wintersteiger opened this issue Nov 17, 2023 · 2 comments

Comments

@wintersteiger
Copy link
Contributor

We've seen a change in behaviour while trying to upgrade to a more recent version of Z3. I bisected it down to b7169e2 which changed is_numeral_ext to return true for enum-sort constructors, here:

if (dt.is_enum_sort(c->get_sort()) && dt.is_constructor(c))

Is it intentional that this is considered a numeral, even if the user did not explicitly ask for an enum sort (but "accidentally" created one with 0-field constructors)?

@NikolajBjorner
Copy link
Contributor

This change was made for aligning internal behavior for the datalog engine. The external behavior seems affected because the function for checking whether an AST is a numeral then returns true for an enumeration sort, but the function for retrieving the numeric value will fail. I have updated the API behavior.

@wintersteiger
Copy link
Contributor Author

Awesome, many thanks!

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

No branches or pull requests

2 participants