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

Unknown sort 'Int' when using `QF_NRA theory #268

Open
chyanju opened this issue Oct 10, 2023 · 0 comments
Open

Unknown sort 'Int' when using `QF_NRA theory #268

chyanju opened this issue Oct 10, 2023 · 0 comments

Comments

@chyanju
Copy link

chyanju commented Oct 10, 2023

Hello!

I was trying to switch to a different theory when calling z3, but it seems that constants are preferably defined as "Int" at the backend under certain circumstances, which causes some theory (e.g., `QF_NRA) to fail. Here's an example:

(require rosette/solver/smt/z3)
(current-solver (z3 #:logic 'QF_NRA))
(output-smt #t)

(define-symbolic x real?)
(solve (assert (equal? -2.0 x)))

Executing the above code snippet results in:

 read-solution: unrecognized solver output: (error line 12 column 18: Invalid function definition: unknown sort 'Int')

As I looked into the generated smt, the line that caused the error is:

(define-fun e0 () Int (- 2))

where "Int" is not supported in z3 when `QF_NRA is used.

Would there be any workaround or potential fix?

Thank you!

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

Successfully merging a pull request may close this issue.

1 participant