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

Fix action is_present field not being reset #2409

Merged
merged 29 commits into from
Sep 28, 2024
Merged

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Sep 24, 2024

To correctly reset the is_present field of actions we must add a pointer to the status field of the associated trigger_t to the is_present_fields array. This is because, for actions (unlike input ports), the is_present field is always overwritten by the status field of the trigger_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 PR

Corresponding reactor-c PR: lf-lang/reactor-c#482

Closing #2300 #2291

@erlingrj
Copy link
Collaborator Author

@edwardalee, I believe it is correct now

Copy link
Member

@lhstrh lhstrh left a 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...

Copy link
Collaborator

@edwardalee edwardalee left a 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.

@edwardalee edwardalee added this pull request to the merge queue Sep 28, 2024
Merged via the queue into master with commit b10961d Sep 28, 2024
24 checks passed
@edwardalee edwardalee deleted the fix-action-present-bug branch September 28, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix c Related to C target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants