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

Cpp: fix triggering of reactions in multiple nested reactors #1286

Merged
merged 4 commits into from
Jul 13, 2022

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented Jul 8, 2022

The reactor-cpp runtime did not correctly handle multiple reactions in different nested reactors that are triggered by the same upstream port. This change pulls in a fix in reactor-cpp and adds an LF test.

Related reactor-cpp PR: lf-lang/reactor-cpp#16

The reactor-cpp runtime did not correctly handle multiple reactions in different
nested reactors that are triggered by the same port upstream port. This change
pulls in a fix in reactor-cpp and adds an LF test.

Related reactor-cpp PR: lf-lang/reactor-cpp#16
@cmnrd cmnrd added bug Something isn't working cpp Related to C++ target labels Jul 8, 2022
@cmnrd
Copy link
Collaborator Author

cmnrd commented Jul 8, 2022

@edwardalee, @Soroosh129 Do you know if we have a similar test for C?

@lhstrh lhstrh requested a review from edwardalee July 11, 2022 19:20
@cmnrd cmnrd added this to the 0.3.0 milestone Jul 12, 2022
@cmnrd cmnrd requested review from Soroosh129 July 13, 2022 08:10
@edwardalee
Copy link
Collaborator

@edwardalee, @Soroosh129 Do you know if we have a similar test for C?

I'm not sure, but I just added a C version of this test to the branch.

@Soroosh129
Copy link
Contributor

I couldn’t find a test that exactly matches what’s here (where you have two reactions at two different levels of the hierarchy be triggered by the same upstream port).

I did, however, find an apparent mistake in Hierarchy.lf, where in the main reactor we have:

container.out -> print.in;
container.out -> print2.in;

I think this should be:

container.out -> print.in;
container.out2 -> print2.in;

@edwardalee
Copy link
Collaborator

I just pushed a fix to this mistake to this branch.

I did, however, find an apparent mistake in Hierarchy.lf, where in the main reactor we have:

container.out -> print.in;
container.out -> print2.in;

I think this should be:

container.out -> print.in;
container.out2 -> print2.in;

@cmnrd
Copy link
Collaborator Author

cmnrd commented Jul 13, 2022

Thanks for providing the C test! I will merge it then.

@cmnrd cmnrd merged commit e3c7fb4 into master Jul 13, 2022
@cmnrd cmnrd deleted the fix-nested-reactions branch July 13, 2022 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cpp Related to C++ target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants