-
Notifications
You must be signed in to change notification settings - Fork 53
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
Done conditions are distinguished #1326
Conversation
I'm not sure if this incarnation of solving #864 is a good idea. A couple of problems:
I think solving #864, or even attempting to solve it, requires a more thoughtful plan than this PR. I'll try to extract the useful changes from this PR to solve #1119 but undo the change that makes |
Done conditions are special and not quite like assignments. This PR updates the
ir::Group
structure to make done conditions a field so that we don't have to do the janky "iterate over the group assignments to find the done condition" nonsense.Also, more importantly, we no longer allow a group's done condition to have guards. The textual programs can still write something like:
But the compiler immediately canonicalizes it to:
There are a couple of benefits of this change. First, we don't need the
group[done]
hole anymore; we can simply inline the group's done condition directly into the location since the condition is guaranteed to be a port. It also makes sure that figuring out if a group is done straightforward since it does not require any computation.Finally, w.r.t. undefined behavior, it clarifies the responsibility of the port–it must always have a non-
x
value. The guard does not play a role in defining the "doneness" of a group.Fixes #1119 and fixes #864.
TODO
ReadWriteSet::uses
on group assignments returns different results