-
Notifications
You must be signed in to change notification settings - Fork 52
Add explicit cast in mixed integer-real term #466
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 explicit cast in mixed integer-real term #466
Conversation
It is not clear why this change is required. Please add useful tests that show your contribution, i.e., tests need to fail upfront and show a violation the official interfaces or documentation, and pass with your changes. |
Did you already try running If you want to avoid explicit casts we could still report this to the solver developers and ask them for help? |
src/org/sosy_lab/java_smt/solvers/princess/PrincessRationalFormulaManager.java
Outdated
Show resolved
Hide resolved
…nd do not depend on RationalFormula. And shorten some code that was added for overriding theory-independent default behaviour. Only Princess seems to need separate handling for Integers and Rationals.
I'm surprised that the issues in this PR have not been reported earlier, particularly the potentially breaking casts in multiple solver bindings and the invalid formula comparisons (LESS_THAN, LESS_EQUAL, GREATER_THAN, GREATER_EQUAL) in Princess for Real/Rational theory. The PR looks completely valid from my side. |
…iven-mixed-integer-real-arguments-for-division
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
@daniel-raffler Thanks for reporting this issue and providing a solid basis and tests for the fix. Well done. |
Hello,
several solvers fail when integer terms and rational terms are used together in
RationalFormulaManager
. This PR adds explicit casting operations for solvers that don't convert implicitly.