SIGPRO142 Talk

Posted on January 12, 2023

Responsibilities of Responses in Functional Reactive Programming

Sosuke Moriguchi, Takuo Watanabe
情報処理学会第142回プログラミング研究会(SIGPRO142), 広島市立大学/オンライン, 2023年1月12-13日.

Abstract

Functional Reactive Programming (FRP) describes systems using time-varying values, which are abstractions of values that change over time. Since actual time-varying values cannot be computed in a moment, the result of another time-varying value may change during the computation of one time-varying value. This problem is called a glitch. A glitch can be seen as data races in concurrent processing and is often discussed in FRP in the context of asynchronous processing and distributed systems. While system-wide synchronization is costly, it is important to allow programmers to choose whether or not to synchronize, since some references do not need to be strictly synchronized. In this presentation, we introduce the FRP language MPFRP, in which time-varying values to be computed synchronously are grouped. In MPFRP, each time-varying value belongs to a party. Time-varying values belonging to the same party are computed synchronously and are not synchronized with the computation of time-varying values belonging to different parties. A party is defined in a module and is used as the starting point for computation in the system. This makes it easy to switch between and mix push-based (data-driven) and pull-based (demand-driven) models.