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

A potential bug in z3.parse_smt2_file #7085

Closed
JulyChen728 opened this issue Jan 16, 2024 · 2 comments
Closed

A potential bug in z3.parse_smt2_file #7085

JulyChen728 opened this issue Jan 16, 2024 · 2 comments

Comments

@JulyChen728
Copy link

Hi all,
we have found a potential bug in z3.parse_smt2_file.

For the smt2 file griggio/fmcad12/f23.smt2 in SMT-LIB-benchmarks/QF_FP, z3.parse_smt2_file returns a combination of caluses where the third one is x * x + y * y * y * y + x * x + fpFP(0, 127, 0) <= x * y * fpFP(0, 129, 0), different from the actual constraint in the smt2 file, which is (x * x + y * y) * (y * y + x * (x + fpFP(0, 127, 0))) <= x * y * fpFP(0, 129, 0).

Thank you very much for your time and effort! We look forward to hearing from you.

@wintersteiger
Copy link
Contributor

I'm not sure whether we should print floating point operations in this "pretty" form at all. For instance, each of the * and + also depend on a rounding mode, which is not present in the output at all. Further, floating point addition is not associative, requiring lots of parentheses.

@NikolajBjorner
Copy link
Contributor

This is a valid point. I take it as the Python pretty print is for visual inspection where details can be elided.
There is e.sexpr() that prints the expression in SMTLIB format where the relevant details are there.

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

3 participants