lingua-franca icon indicating copy to clipboard operation
lingua-franca copied to clipboard

Simplify dealings with `reactor-c` files and scheduler selection

Open lhstrh opened this issue 3 years ago • 4 comments

Wouldn't it suffice to select the scheduler in the cmake configuration if we had all reactor-c source file copied?

Originally posted by @lhstrh in https://github.com/lf-lang/lingua-franca/pull/743#r808695441

lhstrh avatar Feb 26 '22 06:02 lhstrh

Why make the scheduler selection a compile time decision? If all the schedulers implement the same API, they can all be compiled and the appropriate scheduler can be chosen by the user (or automatically based on some heuristics)

cmnrd avatar Feb 28 '22 06:02 cmnrd

Why make the scheduler selection a compile time decision? If all the schedulers implement the same API, they can all be compiled and the appropriate scheduler can be chosen by the user (or automatically based on some heuristics)

That sounds fine to me. In that situation, too, we should copy all reactor-c files rather than a handpicked set of files depending which scheduler was selected.

lhstrh avatar Apr 20 '22 07:04 lhstrh

For embedded applications, this could have a serious cost in memory footprint, particularly as we do more research into alternative schedulers.

edwardalee avatar Apr 20 '22 13:04 edwardalee

That's a good point. The reason for this issue, however, is the handling of the source files, which--even if we keep the scheduler a compile-time decision--should be sorted out in the build configuration rather than being replicated in the file copy operation as it is now.

lhstrh avatar Apr 20 '22 14:04 lhstrh