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

[Abstract Domains, V] Intervals to Track #1124

Open
EagleoutIce opened this issue Nov 7, 2024 · 0 comments
Open

[Abstract Domains, V] Intervals to Track #1124

EagleoutIce opened this issue Nov 7, 2024 · 0 comments
Labels
abstract interpretation Related to abstract interpretation enhancement New feature or request

Comments

@EagleoutIce
Copy link
Member

Thanks to #1107 we can query flowR for the values of variables which (should, #1106) work great for aliases! Yet resolving aliases is insufficient for our desires! We want to gain information on intervals and this issue shall help us representing ranges like [1,42) and domains like {(-inf,-pi), [pi,12]} although we will handle them later.

  1. For this let's start with a simple interface to represent a single interval (with an in/exclusive upper and lower bound). Make sure to add checks with which we may use to ensure that these intervals [a,b] are proper (i.e., a <= b) or to construct these intervals to be correct by-construction.
  2. Now, let's add basic interval arithmetic! Support for adding, subtracting, multiplying and dividing intervals should be fine! Please note that without domains we have to over-approximate results like {(-2,1),(4,5]} to (-2,5]. Please add tests for these calculations.
  3. With basic calculations for numeric values... we still require top and bottom! Top is easily represented as (-inf,inf) in this domain, yet for bottom it is probably better to add an explicit emptyset marker to force checking for bottom when analyzing.
  4. As the final operation on intervals, it would be great to have intersection and union as interval operations! (we probably require both frequently in the future) as well as a order function for intervals (telling us that [1,2] < [3,4] is true but [1,4] < [3,5] only maybe true! - maybe would be then just the uncertain "interval"/set {false,true})
@EagleoutIce EagleoutIce added the abstract interpretation Related to abstract interpretation label Nov 7, 2024
@EagleoutIce EagleoutIce added this to the Abstract Domains milestone Nov 7, 2024
@EagleoutIce EagleoutIce added the enhancement New feature or request label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abstract interpretation Related to abstract interpretation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant