Skip to content

Fix preamble inheritance for instantiated reactors #2497

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Jakio815
Copy link
Collaborator

@Jakio815 Jakio815 commented Apr 26, 2025

This PR fixs this issuse here lf-lang/reactor-c#526.

This PR fixes a bug where instantiated reactors did not correctly inherit preambles when generating C code.

Also, fixed an example to test if this is working.

@Jakio815 Jakio815 changed the title Fix bug to inherit preamble on instantiated reactors. Fix preamble inheritance for instantiated reactors Apr 26, 2025
@Jakio815 Jakio815 requested a review from edwardalee April 26, 2025 09:25
@Jakio815
Copy link
Collaborator Author

@edwardalee I have this CI test error happening, even though I rerun it multiple times. Is this related to me, or is it a known error?

@edwardalee
Copy link
Collaborator

Looks to me like the test failures are related to this change, since they involve redefinitions of symbols that are presumably defined in preambles. It's interesting that only benchmark tests fail. These are older code. It may be that your fix is exposing a flaw in the benchmark code. At some point, we changed things so that you could no longer define function bodies in file-level preambles. Those have to be defined within reactors, although their interface could be declared in a file-level preamble. I think this requires a close look at the failing tests.

@Jakio815
Copy link
Collaborator Author

I see. I'll try having a look on the benchmark-tests. Is there a suggestion? Should I see the C/savina/src ?

@edwardalee
Copy link
Collaborator

I think the benchmark tests run programs in the benchmarks-lingua-franca repo: https://github.com/lf-lang/benchmarks-lingua-franca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants