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

Suggestion: integer division and linearization could be more precise #88

Open
rmonat opened this issue Jul 7, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@rmonat
Copy link
Contributor

rmonat commented Jul 7, 2023

Let us consider this simple program:

int m = rand(2, 9);
int y = rand(0, 2020);
int y2 = y + ((m + 1) / 12);

The relational numerical domain is able to infer that 12y + m ≤ 12y2 + 11 /\ 12y2 ≤ 12y + m + 1. I would have expected y2 = y since m+1 < 12 => (m+1)/12 = 0 over integers.

I guess the linearization could be improved in that case.

@antoinemine antoinemine added the enhancement New feature or request label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants