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

程序块和Tlön嵌入

Program Adverbs and Tlön Embeddings

Yao Li, Stephanie Weirich

摘要:

自由单子(及其变体)已经成为一种流行的通用工具,用于在证明助手中表示有效程序的语义。这些数据结构支持由未解释事件参数化的语义的组合定义,同时承认丰富的等价等式理论。但是单子并不是构造有效计算的唯一方法,我们为什么要限制自己呢?在本文中,应用函子,选择函子,和其他结构的启发,我们定义了一个集合的数据结构和理论,我们称之为程序副词,捕捉各种计算模式。程序副词本身是可组合的,允许它们用于指定具有多种计算模式的语言的语义。我们使用程序副词作为一类新的语义嵌入的基础,称为Tlön嵌入。与基于自由单子的嵌入相比,Tlön嵌入在效果的计算建模方面具有更大的灵活性,同时保留了更多关于程序语法结构的信息。

英文摘要:

Free monads (and their variants) have become a popular general-purpose tool for representing the semantics of effectful programs in proof assistants. These data structures support the compositional definition of semantics parameterized by uninterpreted events, while admitting a rich equational theory of equivalence. But monads are not the only way to structure effectful computation, why should we limit ourselves? In this paper, inspired by applicative functors, selective functors, and other structures, we define a collection of data structures and theories, which we call program adverbs, that capture a variety of computational patterns. Program adverbs are themselves composable, allowing them to be used to specify the semantics of languages with multiple computation patterns. We use program adverbs as the basis for a new class of semantic embeddings called Tlön embeddings. Compared with embeddings based on free monads, Tlön embeddings allow more flexibility in computational modeling of effects, while retaining more information about the program's syntactic structure.

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

↑