TY - GEN
T1 - The Relational Machine Calculus
AU - Barrett, Chris
AU - Castle, Daniel
AU - Heijltjes, Willem B.
PY - 2024/7/8
Y1 - 2024/7/8
N2 - 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.
AB - 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.
KW - categorical semantics
KW - hypergraph category
KW - Kleene algebra
KW - krivine abstract machine
KW - lambda-calculus
KW - logic programming
KW - non-determinism
KW - operational semantics
KW - reversible programming
UR - http://www.scopus.com/inward/record.url?scp=85199017115&partnerID=8YFLogxK
U2 - 10.48550/arXiv.2405.10801
DO - 10.48550/arXiv.2405.10801
M3 - Chapter in a published conference proceeding
AN - SCOPUS:85199017115
T3 - Proceedings - Symposium on Logic in Computer Science
BT - Proceedings of the 39th Annual ACM/IEEE Symposium on Logic in Computer Science
PB - IEEE
CY - U. S. A.
T2 - 39th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2024
Y2 - 8 July 2024 through 11 July 2024
ER -