lf-lang / reactor-uc

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

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

Open erlingrj opened 3 weeks ago

erlingrj commented 3 weeks 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 3 weeks 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.