E-FRP with priorities

Roumen Kaiabachev, Walid Taha, Angela Zhu
2007 Proceedings of the 7th ACM & IEEE international conference on Embedded software - EMSOFT '07  
E-FRP is declarative language for programming resourcebounded, event-driven systems. The original high-level semantics of E-FRP requires that each event handler execute atomically. This requirement facilitates reasoning about E-FRP programs, and therefore it is a desirable feature of the language. But the original compilation strategy requires that each handler complete execution before another event can occur. This implementation choice treats all events equally, in that it forces the upper
more » ... nd on the time needed to respond to any event to be the same. While this is acceptable for many applications, it is often the case that some events are more urgent than others. In this paper, we show that we can improve the compilation strategy without altering the high-level semantics. With this new compilation strategy, we give the programmer more control over responsiveness without taking away the ability to reason about programs at a high level. The programmer controls responsiveness by declaring priorities for events, and the compilation strategy produces code that uses preemption to enforce these priorities. We show that the compilation strategy enjoys the same properties as the original strategy, with the only change being that the programmer reasons modulo permutations on the order of event arrivals.
doi:10.1145/1289927.1289963 dblp:conf/emsoft/KaiabachevTZ07 fatcat:sh65k6zx6vbrtndhs6qpm4ugnq