1-s2.0-S1571066120300517-main.pdf (382.61 kB)
Download file

Equational Logic and Categorical Semantics for Multi-Languages

Download (382.61 kB)
conference contribution
posted on 08.07.2021, 10:15 by Samuele Buro, Roy Crole, Isabella Mastroeni

Programming language interoperability is the capability of two programming languages to interact as parts of a single system. Each language may be optimized for specific tasks, and a programmer can take advantage of this. HTML, CSS, and JavaScript yield a form of interoperability, working in conjunction to render webpages. Some object oriented languages have interoperability via a virtual machine host (.NET CLI compliant languages in the Common Language Runtime, and JVM compliant languages in the Java Virtual Machine). A high-level language can interact with a lower level one (Apple's Swift and Objective-C). While there has been some research exploring the interoperability mechanisms (Section 1) there is little development of theoretical foundations. This paper presents an approach to interoperability based around theories of equational logic, and categorical semantics.

We give ways in which two languages can be blended, and interoperability reasoned about using equations over the blended language. Formally, multi-language equational logic is defined within which one may deduce valid equations starting from a collection of axioms that postulate properties of the combined language. Thus we have the notion of a multi-language theory and much of the paper is devoted to exploring the properties of these theories. This is accomplished by way of category theory, giving us a very general and flexible semantics, and hence a nice collection of models. Classifying categories are constructed, and hence equational theories furnish each categorical model with an internal language; from this we can also establish soundness and completeness. A set-theoretic semantics follows as an instance, itself sound and complete. The categorical semantics is based on some pre-existing research, but we give a presentation that we feel is easier and simpler to work with, improves and mildly extends current research, and in particular is well suited to computer scientists. Throughout the paper we prove some interesting properties of the new semantic machinery. We provide a small running example throughout the paper to illustrate our ideas, and a more complex example in conclusion.



Electronic Notes in Theoretical Computer Science Volume 352, 1 October 2020, Pages 79-103

Author affiliation

Department of Informatics


The 36th Mathematical Foundations of Programming Semantics Conference, 2020 — MFPS 2020


VoR (Version of Record)

Published in

Electronic Notes in Theoretical Computer Science









Acceptance date


Copyright date


Available date


Spatial coverage

Paris, France

Temporal coverage: start date


Temporal coverage: end date