The Relational Machine Calculus

被引:0
作者
Barrett, Chris [1 ]
Castle, Daniel [2 ]
Heijltjes, Willem [2 ]
机构
[1] Univ Oxford, Oxford, England
[2] Univ Bath, Bath, England
来源
PROCEEDINGS OF THE 39TH ANNUAL ACM/IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, LICS 2024 | 2024年
关键词
lambda-calculus; Kleene algebra; logic programming; reversible programming; non-determinism; hypergraph category; Krivine abstract machine; categorical semantics; operational semantics; SEMANTICS; CATEGORIES; LAWS;
D O I
10.1145/3661814.3662091
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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-byname 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.
引用
收藏
页数:15
相关论文
共 78 条
  • [1] [Anonymous], 1941, J. Symbolic Logic, DOI [10.2307/2268577, DOI 10.2307/2268577]
  • [2] [Anonymous], 2009, Semantic Techniques in Quantum Computation, DOI DOI 10.1017/CBO9781139193313.005
  • [3] Datafun: A Functional Datalog
    Arntzenius, Michael
    Krishnaswami, Neelakantan R.
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (09) : 214 - 227
  • [4] CALL-BY-VALUE, CALL-BY-NAME AND THE VECTORIAL BEHAVIOUR OF THE ALGEBRAIC λ-CALCULUS
    Assaf, Ali
    Diaz-Caro, Alejandro
    Perdrix, Simon
    Tasson, Christine
    Valiron, Benoit
    [J]. LOGICAL METHODS IN COMPUTER SCIENCE, 2014, 10 (04)
  • [5] Barrett Chris, 2023, LIPICS, V252
  • [6] Barrett Chris, 2023, PhD thesis,
  • [7] Differential categories
    Blute, R. F.
    Cockett, J. R. B.
    Seely, R. A. G.
    [J]. MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2006, 16 (06) : 1049 - 1083
  • [8] Deconstructing the Calculus of Relations with Tape Diagrams
    Bonchi, Filippo
    Di Giorgio, Alessandro
    Santamaria, Alessio
    [J]. PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (POPL): : 1864 - 1894
  • [9] String diagram rewrite theory II: Rewriting with symmetric monoidal structure
    Bonchi, Filippo
    Gadducci, Fabio
    Kissinger, Aleks
    Sobocinski, Pawel
    Zanasi, Fabio
    [J]. MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2022, 32 (04) : 511 - 541
  • [10] String Diagram Rewrite Theory I: Rewriting with Frobenius Structure
    Bonchi, Filippo
    Gadducci, Fabio
    Kissinger, Aleks
    Sobocinski, Pawel
    Zanasi, Fabio
    [J]. JOURNAL OF THE ACM, 2022, 69 (02)