arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.06162cs.PL
收藏

带效应的函数式响应式编程:一种更宽松的方法

Functional Reactive Programming with Effects, A More Permissive Approach

Frédéric Dabrowski, Jordan Ischard

AI总结:

本文提出一种扩展 WORMHOLES 的函数式响应式编程语言,将资源分为输入/输出资源与内部资源,放宽单次使用限制,并证明程序可翻译为等价的无效应 YAMPA 程序。

摘要:

我们引入一种函数式响应式编程语言,它扩展了 WORMHOLES——后者是 YAMPA 的一个支持效应的增强版本。我们的方案放宽了 WORMHOLES 中限制所有资源只能单次使用的约束。资源被分为两类:输入/输出资源和内部资源。输入/输出资源对与环境的交互进行建模,并遵循与 WORMHOLES 中类似的约束。另一方面,内部资源支持程序组件之间的通信,并且可以被多次使用。我们证明,用我们的语言编写的程序可以翻译成等价的无效应 YAMPA 程序,从而确保我们的方法仍然与现有的函数式响应式范式兼容。

英文摘要:

We introduce a functional reactive programming language that extends WORMHOLES, an enhancement of YAMPA with support for effects. Our proposal relaxes the constraint in WORMHOLES that restricts all resources to single-use. Resources are categorized into two kinds: input/output resources and internal resources. Input/output resources model interactions with the environment and follow constraints similar to those in WORMHOLES. Internal resources, on the other hand, enable communication between program components and can be used multiple times. We demonstrate that programs written in our language can be translated into equivalent effect-free YAMPA programs, ensuring that our approach remains compatible with existing functional reactive paradigms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑