lf-lang / reactor-uc

A lightweight reactor runtime targeted at resource-constrained embedded systems
BSD 2-Clause "Simplified" License
2 stars 2 forks source link

Does all federates/programs need an implicit startup trigger? #109

Open erlingrj opened 1 day ago

erlingrj commented 1 day ago

@edwardalee might be able to answer this. Is it necessary to have all federates (and in general all reactor programs) start by advancing their tag to the start tag, regardless of whether the program actually has any startup triggers?

If we do this, then it is possible to check if current_tag > NEVER_TAG to know whether we are properly initialized and have started execution.

edwardalee commented 1 day ago

I think that reactor-c does advance to the start tag, even if there are no reactions to startup. However, I don't think this is necessary. I do recall that execution at the start tag has to be handled specially in a number of places, and that getting it right was not trivial.