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

Shared-memory access counting too conservative #14

Closed
jaylorch opened this issue Mar 18, 2021 · 1 comment
Closed

Shared-memory access counting too conservative #14

jaylorch opened this issue Mar 18, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jaylorch
Copy link
Member

Armada makes sure that concrete levels are compilable. One of the ways it does this is by ensuring that each instruction accesses no more than one shared-memory location. However, the code to do this is too conservative, sometimes considering an instruction to access multiple shared-memory locations when it actually doesn't.

For instance, if m and n are shared-memory locations, then it's not appropriate to read both m and n in the same instruction. But it should be legal to read their addresses in the same instruction, like MethodCall(&m, &n). Nevertheless, this is currently flagged as an illegal multiple shared-memory access. In other words, expressions like &m, &n, &arr[3], and &((*p).f) are counted as shared-memory accesses even when they don't involve accesses to shared memory.

Another instance of overcounting is when a method call accesses shared memory during both the call and the assignment of return variables. Currently, the instruction m := MethodCall(n) is flagged as an illegal multiple shared-memory access. But it would be fine to allow this, since the call step is modeled as a separate step from the assignment-of-return-variables step.

@jaylorch jaylorch added the bug Something isn't working label Mar 18, 2021
@LukeXuan LukeXuan self-assigned this Mar 18, 2021
LukeXuan added a commit that referenced this issue Apr 20, 2021
@LukeXuan
Copy link
Collaborator

closed by pull request #29.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants