-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix action is_present field not being reset #2409
Conversation
@edwardalee, I believe it is correct now |
777043b
to
4cfd1ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos for getting this fixed but I'll leave review to @edwardalee -- I can't quite follow the magic in the code generator...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks right to me now. I pushed a couple of simplifications and elaborated one of the tests to cover more cases. If the tests pass, this is ready to merge.
To correctly reset the
is_present
field of actions we must add a pointer to thestatus
field of the associatedtrigger_t
to theis_present_fields
array. This is because, for actions (unlike input ports), theis_present
field is always overwritten by thestatus
field of thetrigger_t
in the reaction preambles.UPDATE:
This exposed also an issue with the code-generated setup of the
is_present_fields
array for banks and multiport which is also fixed in this PRCorresponding reactor-c PR: lf-lang/reactor-c#482
Closing #2300 #2291