Emfrp, a functional reactive programming (FRP) language for small-scale embedded systems, is a DSL designed for execution in resource-constrained environments.
The execution model of Emfrp provides a reactive behavior of the system through repeated actions such as waiting for inputs from sensors, updating all time-varying values, and outputting them to the actuators.
Such polling-based execution consumes unnecessary energy due to frequent update processing.
For this reason, the extended language EvEmfrp was proposed to reduce unnecessary update processing and improve energy consumption.
EvEmfrp statically determines and schedules the update period of the whole system by annotating the timing of the time-varying value updates and the input interrupts.
Since time-varying value updates are performed at periodic timing, the system is put into sleep mode when no update processing is required, thereby saving energy.
However, because the timing annotations and the update intervals are set statically, executing a program that updates a specified time-varying value after a fixed time starting from an interrupt signal without unnecessary updates is impossible.
This causes frequent wake-up from sleep mode and prevents power saving.
We propose a mechanism for extending timing annotations and dynamically changing the update intervals to solve this problem.
We also show the usefulness of the proposed mechanism through an example of debouncing for button presses.