Refine the abstract domain of values#490
Merged
xavierleroy merged 2 commits intomasterfrom May 25, 2023
Merged
Conversation
Introduce a `Num p` abstract value that stands for any number (but no pointers), with provenance `p`. In non-strict mode, this makes the value analysis more precise than using `Ifptr p` for the same purpose, like we did before. Also: minor simplifications and cleanups in the management of provenance. In strict mode, instead of setting all provenances to `Pbot`, just propagate them but ignore them in `aptr_of_aval`. Simplify `vnormalize` and its proof consequently.
Contributor
Author
|
NB. This will need to be run against AbsInt's test suite to check that it does not cause over-optimization. |
Contributor
|
Indeed, this allows, for instance, to establish that a stack variable and |
One possible case (Ptr, Num) and many impossible cases (e.g. I, F) were sent to Vtop and are now given more precise upper bounds.
Contributor
Author
|
Testing shows no over-optimization. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a
Num pabstract value that stands for any number (but no pointers), with provenancep. In non-strict mode, this makes the value analysis more precise than usingIfptr pfor the same purpose, like we did before. (In particular, it should address the imprecision mentioned in #489, even though thevlubfunction remains non-monotonic.)Also: minor simplifications and cleanups in the management of provenance. In strict mode, instead of setting all provenances to
Pbot, just propagate them but ignore them inaptr_of_aval. Simplifyvnormalizeand its proof consequently.