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

wrap speculative mode around bounds computation #1649

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DrMichaelPetter
Copy link
Collaborator

during inspection of SV-comp results, we encountered some unnecessary overflow flagging, e.g.

//SKIP PARAM:  --enable ana.int.interval  --set sem.int.signed_overflow assume_none  --set ana.activated[+] lin2vareq
int s = 1;
void f(){
  unsigned int n,i;
  n = i%(s+2);  // unnecessary overflow flagging
}

due to bounds computations not being wrapped in speculative mode.

This is also relevant for affeq and other apron related analyses.

@DrMichaelPetter DrMichaelPetter added bug in progress precision relational Relational analyses (Apron, affeq, lin2var) labels Dec 19, 2024
@DrMichaelPetter DrMichaelPetter self-assigned this Dec 19, 2024
@sim642
Copy link
Member

sim642 commented Dec 19, 2024

Where exactly is the overflowing operation performed there? There's already a executing_speculative_computations wrapper a dozen lines above.

@DrMichaelPetter
Copy link
Collaborator Author

Where exactly is the overflowing operation performed there? There's already a executing_speculative_computations wrapper a dozen lines above.

There is a query to the value domain, that retrieves a range to bound the expression to cast in the non-injective case. This fragment might cause an overflow flag, if not done speculatively. I have now scoped the speculation a little bit more narrow now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug precision relational Relational analyses (Apron, affeq, lin2var)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants