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

Reading undefined memory locations #539

Open
SamirDroubi opened this issue Dec 8, 2023 · 0 comments
Open

Reading undefined memory locations #539

SamirDroubi opened this issue Dec 8, 2023 · 0 comments
Labels
C: Prog Analysis Related to formal analysis, SMT, etc. C: Scheduling The scheduling language and APIs S: Needs Discussion This needs discussion to decide if important to work

Comments

@SamirDroubi
Copy link
Collaborator

There is two potential views on this from a front-end prespective:

  1. A strict view: Any read to an undefined memory location, makes the program undefined and by extension unacceptable.
  2. A more relaxed view: A read to an undefined memory location as long as the undefined values don't propagate to the arguments.

Same views on this from the rewrite presepctive:

  1. A stricit view: a rewrite isn't allowed to introduce reads to undefined memory locations.
  2. A more relaxed view: A read to an undefined memory location is okay from an equivelance point of view as long as the side effects on the arguments are the same before and after the rewrite.

I think (1) is much safer to uphold in the compiler and I don't have an example why (2) might be useful.

There is also the issue where currently neither the frontend or the rewrites currently uplhold either.

For example, this is an acceptable program by the front-end:

def foo(a: f32 @ DRAM):
    b: f32 @ DRAM
    a = b

stage_mem can propagate undefined values to proc arguments: #527 (comment)

We need anaylsis support for this. @yamaguchi1024 @gilbo can you take a look this to consider it for the analysis revamp?

@SamirDroubi SamirDroubi added C: Scheduling The scheduling language and APIs C: Prog Analysis Related to formal analysis, SMT, etc. S: Needs Discussion This needs discussion to decide if important to work labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Prog Analysis Related to formal analysis, SMT, etc. C: Scheduling The scheduling language and APIs S: Needs Discussion This needs discussion to decide if important to work
Projects
None yet
Development

No branches or pull requests

1 participant