Skip to content

Conversation

Heizmann
Copy link
Member

No description provided.

Heizmann added 2 commits July 11, 2025 23:27
Current behavior: If the entry function does not exist, the CHandler switches to library mode. However other parts of the translation expect the library mode only if the entry function is the empty string.
New behavior: If the entry function does not exists, we report an error.
@Heizmann Heizmann self-assigned this Jul 11, 2025
@schuessf
Copy link
Contributor

Thanks for this work! I think this setting is a bit odd and it is good to rethink it.
However, I see a potential issue with the proposed change. Previously, if the entry function specified in the settings (usually main) was not defined, we would fall back to library mode. With your change, however, we crash instead. I think a few of our regression tests expect this fallback, as they don't define a main-function, and they therefore the tests would fail.
Also, I'm wondering whether we actually ever need to specify an entry function other than main. If this is not the case, we could consider removing this setting instead and show a warning if we fall back to library mode.

@Heizmann
Copy link
Member Author

therefore the tests would fail.

Shortcomings in our test infrastructure should not be an argument for a confusing setting. But I agree that we should e.g., put these benchmarks in different folders.

Also, I'm wondering whether we actually ever need to specify an entry function other than main.

Yes, this was sometimes helpful. Especially if we want to understand a complex program better, but want to keep error-prone modifications of the input low.

@Heizmann
Copy link
Member Author

Results of discussion on Thu 2025-07-17:
We postpone the decision.
Questions that we had:

  • What is the library mode: that every function is an entry or that global variables are initialized deterministically? Or both?
  • Do we want a separate setting for both? Are all combinations relevant in practice?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants