-
Notifications
You must be signed in to change notification settings - Fork 171
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
Add >=0 constraints to quot_round_zero and rem_round_zero #553
Comments
I had a go at doing this. It should be possible, but there are a few places where we will need to add explicit asserts for divisors, even if it looks somewhat obvious:
This is never division by zero, but it requires reasoning about non-linear arithmetic to prove it which the SMT solver can't do. |
Hmm isn't the output of |
Yes, but in practice the SMT solver just gives up whenever it sees |
That does mean the other solution is to really understand the vector spec and add tight bounds to every variable. |
The type declarations for those division operators are missing
>0
and>=0
constraints.See https://github.com/riscv/sail-riscv/pull/552/files#r1768223964
The text was updated successfully, but these errors were encountered: