Skip to content

Implement global integer interval analysis #79

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

Open
alastairreid opened this issue May 8, 2025 · 0 comments
Open

Implement global integer interval analysis #79

alastairreid opened this issue May 8, 2025 · 0 comments

Comments

@alastairreid
Copy link

In theory, the ASL constraint feature allows programmers to annotate functions with their range.
In practice, the constraints needed on some functions are quite noisy and not likely to help readers of the specification.

Proposal:

  1. Build a simple interval analysis that can be applied to functions to infer their return type intervals.
  2. Visit functions in reverse dependency order (i.e., leaves first) using the inferred intervals for callees functions already visited to infer the return type interval for each layer of the tree.

Note that this will not be sufficient to infer intervals on function arguments. To do that, we need a top-down analysis that propagates interval information from callers to callees.
The best solution would be a conventional global analysis that refines intervals on all functions at once.
But it may be sufficient to write this as a separate analysis and alternate the bottom up and top down analyses a few times?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant