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

关系机演算

The Relational Machine Calculus

Chris Barrett, Daniel Castle, Willem Heijltjes

AI总结:

本文提出一阶关系编程基础模型关系机演算(RMC),其源自函数机演算(FMC),利用FMC一阶片段的潜在对偶性构建语法对合,对应Frobenius幺半群弦图的可靠完备演算,以合一为β归约的对称推广,嵌入Kleene代数后可涵盖多种计算模型且等式理论保守合流。

摘要:

本文提出了关系机演算(Relational Machine Calculus,RMC):一种简洁的一阶关系编程基础模型。RMC源自函数机演算(Functional Machine Calculus,FMC),FMC从两个方向推广了λ演算及其标准的按名调用栈机。其一为“位置(locations)”,引入了多个栈,使得效应算子能够被编码到抽象与应用构造中。其二为“序列(sequencing)”,引入了“跳过(skip)”和“序列(sequence)”的命令式概念,类似于κ演算和连接式编程语言。RMC的核心观察是,FMC的一阶片段存在一种潜在的对偶性,通过对相关构造子进行简单分解,这种对偶性可以具体表示为语法上的对合。在语义层面,这催生了一种针对Frobenius幺半群弦图的可靠且完备的演算。我们将合一(unification)视为β归约的对应对称推广。通过进一步加入Kleene代数的标准算子,RMC可嵌入一系列计算模型:包括κ演算、逻辑编程、自动机、交互网(Interaction Nets)和Petri网等。这些嵌入都保持操作语义,而RMC的操作语义同样是通过对λ演算的标准栈机进行推广得到的。RMC的等式理论(支持对其操作语义进行推理)对一阶λ演算和Kleene代数都是保守的,并且可以被定向以得到一个合流的归约关系。

英文摘要:

This paper presents the Relational Machine Calculus (RMC): a simple, foundational model of first-order relational programming. The RMC originates from the Functional Machine Calculus (FMC), which generalizes the lambda-calculus and its standard call-by-name stack machine in two directions. One, "locations", introduces multiple stacks, which enable effect operators to be encoded into the abstraction and application constructs. The second, "sequencing", introduces the imperative notions of "skip" and "sequence", similar to kappa-calculus and concatenative programming languages. The key observation of the RMC is that the first-order fragment of the FMC exhibits a latent duality which, given a simple decomposition of the relevant constructors, can be concretely expressed as an involution on syntax. Semantically, this gives rise to a sound and complete calculus for string diagrams of Frobenius monoids. We consider unification as the corresponding symmetric generalization of beta-reduction. By further including standard operators of Kleene algebra, the RMC embeds a range of computational models: the kappa-calculus, logic programming, automata, Interaction Nets, and Petri Nets, among others. These embeddings preserve operational semantics, which for the RMC is again given by a generalization of the standard stack machine for the lambda-calculus. The equational theory of the RMC (which supports reasoning about its operational semantics) is conservative over both the first-order lambda-calculus and Kleene algebra, and can be oriented to give a confluent reduction relation.

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

↑