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

Invalid model for QF_FP formula #3794

Closed
muchang opened this issue Apr 6, 2020 · 6 comments
Closed

Invalid model for QF_FP formula #3794

muchang opened this issue Apr 6, 2020 · 6 comments

Comments

@muchang
Copy link

muchang commented Apr 6, 2020

Hi,
For this formula:

(define-sort FPN () (_ FloatingPoint 50 53))
(declare-fun a () FPN)
(declare-fun b () FPN)
(declare-fun c () FPN)
(assert (= (fp.add roundTowardPositive b a) c))
(check-sat)

Z3 gives an invalid model:

[634] % z3 model_validate=true small.smt2
sat
(error "line 6 column 10: an invalid model was generated")
[635] % 
[635] % cat small.smt2
(define-sort FPN () (_ FloatingPoint 50 53))
(declare-fun a () FPN)
(declare-fun b () FPN)
(declare-fun c () FPN)
(assert (= (fp.add roundTowardPositive b a) c))
(check-sat)
[636] %

OS: Ubuntu 18.04
Commit: 9e7af79

@NikolajBjorner
Copy link
Contributor

there are too many invalid model for FP open at this point. They are extremely likely to be duplicates. So I will just close newbies. You can append to the older bugs if you want.

@zhendongsu
Copy link

Okay, that makes sense, Nikolaj, but it would be nice to get them fixed as the first ones were reported quite a while ago. Thanks.

@NikolajBjorner
Copy link
Contributor

Wintersteiger has no cycles for FP related work until mid May.
Z3 is open source and takes contributions such as bug fixes, so yes "it would be nice" and there is an even nicer way to ensure it happens.

@zhendongsu
Copy link

I appreciate the encouragement, Nikolaj :), but it's probably best to leave you folks to do the harder work, at least for now.

@martin-cs
Copy link

@zhendongsu : FWIW I am working on the equivalent issues for CVC4. Fixing them is a non-trivial amount of work and has very little pay-off as the vast majority of use-cases for the theory of floating-point use just a handful of formats. Completely agree that it would be nice but these are just not a high-priority issue until there is demand for (50 53) floats.

@martin-cs
Copy link

@zhendongsu : if you want to help, identifying the minimum number of formats / equivalence classes of format that exhibit unusual behaviour (for example, where sqrt can return subnormal numbers, subnormal range of exponents larger than normal, etc.) would make fixing these much easier.

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

4 participants