论文标题
程序副词和tlön嵌入
Program Adverbs and Tlön Embeddings
论文作者
论文摘要
免费的单调(及其变体)已成为一种流行的通用工具,用于代表证明助手的有效程序的语义。这些数据结构支持通过未解释的事件参数参数的语义的组成定义,同时承认了富裕的等价方程理论。但是,单调并不是构建有效计算的唯一方法,为什么我们要限制自己? 在本文的启发下,受应用函数,选择性函数和其他结构的启发,我们定义了数据结构和理论的集合,我们称之为程序副词,这些副词捕获了各种计算模式。程序副词本身是可以组合的,可以使用它们来指定具有多种计算模式的语言语义。我们使用程序副词作为称为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.