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 条
  • [61] Mellies Paul-Andre, 2014, Rewriting and Typed Lambda Calculi. Joint International Conference, RTA-TLCA 2014, Held as Part of the Vienna Summer of Logic, VSL 2014. Proceedings: LNCS 8560, P334, DOI 10.1007/978-3-319-08918-8_23
  • [62] MILLER DA, 1986, LECT NOTES COMPUT SC, V225, P448
  • [63] Milner R., 1999, Communicating and Mobile Systems: the pi-Calculus
  • [64] NOTIONS OF COMPUTATION AND MONADS
    MOGGI, E
    [J]. INFORMATION AND COMPUTATION, 1991, 93 (01) : 55 - 92
  • [65] Small-step and big-step semantics for call-by-need
    Nakata, Keiko
    Hasegawa, Masahito
    [J]. JOURNAL OF FUNCTIONAL PROGRAMMING, 2009, 19 : 699 - 722
  • [66] On theories with a combinatorial definition of "equivalence"
    Newman, MHA
    [J]. ANNALS OF MATHEMATICS, 1942, 43 : 223 - 243
  • [67] Pawlewski Pawel, 2010, Petri Nets.
  • [68] Petri C. A., 1962, Kommunikation mit Automaten, P128
  • [69] Pitts A. M., 1993, Mathematical Foundations of Computer Science 1993. 18th International Symposium, MFCS '93 Proceedings, P122
  • [70] Power J., 1999, Automata, Languages and Programming. 26th International Colloquium, ICALP'99. Proceedings (Lecture Notes in Computer Science Vol.1644), P625