Over the past decade, a number of languages for functional reactive programming (FRP) have been suggested, which use modal types to ensure properties like causality, productivity and lack of space leaks. So far, almost all of these languages have included a modal operator for delay on a global clock. For some applications, however, the notion of global clock is unnatural and leads to leaky abstractions as well as inefficient implementations. While modal languages without a global clock have been proposed, no operational properties have been proved about them, yet. This paper proposes Async RaTT, a new modal language for asynchronous FRP, equipped with an operational semantics mapping complete programs to machines that take asynchronous input signals and produce output signals. The main novelty of Async RaTT is a new modality for asynchronous delay, allowing each output channel to be associated at runtime with the set of input channels it depends on, thus causing the machine to only compute new output when necessary. We prove a series of operational properties including causality, productivity and lack of space leaks. We also show that, although the set of input channels associated with an output channel can change during execution, upper bounds on these can be determined statically by the type system.
翻译:过去十年来,有人提出了一些用于功能反应程序(FRP)的语言,这些语言使用模型类型来确保因果关系、生产率和缺乏空间泄漏等特性。到目前为止,几乎所有这些语言都包括了全球时钟延迟的模型操作器。但是,对于某些应用来说,全球时钟的概念是不自然的,导致抽象性以及执行效率低下。虽然提出了没有全球时钟的模型语言,但还没有对这些语言进行操作性特性的证明。本文提议了Async RaTTT,这是一个用于不同步FRP的新型模式语言,它配备了一个操作的语义图绘制完整程序,用于接收不同步输入信号并生成输出信号的机器。Async RaTT的主要新颖性是无同步延迟的新模式,允许每个输出渠道在运行时与其依赖的输入渠道相连,从而导致机器只在必要时对新输出进行编译。我们证明了一系列操作性特性,包括因果关系、生产率和空间泄漏的缺乏。我们还表明,尽管固定输入渠道的设置在系统运行期间是固定的,但固定输入渠道可以固定式连接。</s>