arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 1403.1477cs.PL
收藏

状态的线性使用

Linear usage of state

Rasmus Ejlers Møgelberg, Sam Staton

摘要:

我们研究了“每个单子都是线性状态单子”的现象。我们通过研究从不纯的按值调用语言到新的线性类型论的完全完整的状态传递转换来做到这一点:丰富的按值调用演算。结果并不特定于存储,但可以应用于任何使用代数运算可表达的计算效果,甚至是通常不被认为是有状态的效果。在源语言中的类属效果和丰富的按值调用演算中的状态访问操作之间存在双射对应。从范畴模型的角度来看,丰富的按值调用演算表明了有效的按值调用语言的传统Kleisli模型的改进。新的模型可以被理解为丰富的解释。

英文摘要:

We investigate the phenomenon that "every monad is a linear state monad". We do this by studying a fully-complete state-passing translation from an impure call-by-value language to a new linear type theory: the enriched call-by-value calculus. The results are not specific to store, but can be applied to any computational effect expressible using algebraic operations, even to effects that are not usually thought of as stateful. There is a bijective correspondence between generic effects in the source language and state access operations in the enriched call-by-value calculus. From the perspective of categorical models, the enriched call-by-value calculus suggests a refinement of the traditional Kleisli models of effectful call-by-value languages. The new models can be understood as enriched adjunctions.

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

↑